Coding required for Screener in Zerodha Pi Trade Script

Sir

I am using Zerodha Pi

I want Screener code which follows following conditions

I want to apply this screener to Nifty Stocks

Conditions are

1 Stock CMP ( Current Market Price ) is above yesterdays high

AND

2 Stock CMP is above ATP ( Average traded price )

AND

3 ATP is above days Open and yesterdays high

All the above conditions to be satisfied and result is to be displayed.

Please help to build this screener

Amogh

As per the above condition

SET A = (HIGH+LOW)/2
LAST>REF(HIGH,1) AND
LAST>REF(A,1) AND
A>OPEN AND A>REF(HIGH,1)