Need code for backtesting in pi trade script

I want to used if condition:

​I want to know is that is possible. My strategy is exit buy long want to used two condition ..

​if close>ema100 used crossover psar(0.2,0.02)

​if close<ema100 used crossover psar(0.5,0.05)

​time period-daily


(((( (((((( (

For the above condition

Buy Script:

CLOSE > EMA(CLOSE,100) AND CROSSOVER(CLOSE, PSAR(0.02, 0.2)) = TRUE

Sell Script:

CLOSE < EMA(CLOSE,100) AND CROSSOVER(CLOSE, PSAR(0.2, 0.02)) = TRUE