Need help to find a code for Maximum value of previous candle

Hello All,
I started coding today and I am from a noncomputer background. I wanted to test a few strategies that I have developed over the past one month. Will be really grateful for any help provided.

I needed to find code for this condition
Maximum of previous bullish candle<close of following bull candle
what I did was,

SET A = MAX(CLOSE,2)
SET B = REF(CLOSE,1)
SET B<SET A
But it is not working.
EDIT1:- GAVE another try
REF(HIGH,2)< REF(CLOSE,1)
Still showing an error
Thank you very much In advance it self.

I have tried both above scripts on sbin 1min chart for 22 day backtesting and its working fine

max(close,2)<ref(close,1)

ref(high,2)<ref(close,1)

signals will get generated when the condition matches you can retry with different scrip