Psar exit not workiing

The highlighted code is not working can anyone with code knowledge help
i wish to exit buy when below condition happens also crossover(psar(0.02, 0.2),close) is not working on live ea.

CROSSOVER(PSAR(0.02, 0.2),CLOSE) AND
PSAR(0.02, 0.2) < REF(PSAR(0.02, 0.2),1)

Use the following corrected version

CROSSOVER(PSAR(0.02, 0.2),CLOSE) AND REF(PSAR(0.02, 0.2),1) < REF(PSAR(0.02, 0.2),2)

1 Like

thanks working in backtest now
CROSSOVER(PSAR(CLOSE,0.02, 0.2), CLOSE)
CROSSOVER(PSAR(0.02, 0.2),CLOSE)

DOES THE HIGHLIGHTED CLOSE MAKES A DIFFERENCE N WHAT

Close applied to psar on close value and not last.