How can i store one or two reference value of any previous candle and use latter on current candle?

Hi All,

I am creating one strategy which required store value of end current candle and if next candle cross that value then buy that immediately. if not cross then check for next current candle. it will continue once current price not cross with store value.

Any help appreciated.

Hi! As per our understanding, you want to take a trade if current candle crosses above/below the open/high/low/close if the previous candle. An example comdition of current candle being higher than previous candle is shown in the screenshot. Please verify the transaction details to check if it matches your requirement.