Accessing the previous candle on the timeframe


So, i wanted to buy the next candle when

Close (of the current candle) > open (of the previous candle) , is there any feature to do that?


Yes, the following code will work:
(close > delay(open,1))
Delay function returns the previous values of the parameter filled in. The standard format is : delay(parameter, candles to skip)
In case of delay(open,1), it will return the value of open price of prior candle.