I'm using the standard Ninja CurrentDayOHL Indicator and have integrated two of its variables into my strategy, namely:
Low[0] == CurrentDayOHL().CurrentLow[0]
High[0] == CurrentDayOHL().CurrentHigh[0]
This works great as long as I'm using defined candles, but I'm having trouble with one very simple thing: I'd like to compare the CURRENT daily high/low of a candle with the PREVIOUS daily high/low, no matter how many candles prior it occurred. I'm attaching a picture to illustrate the point. The difficulty comes from the fact that since I don't know how many candles I have to go back until the second most recent daily high/low, I can't use the command posted above.
The two red arrows in the picture are highlighting the current daily high and the daily high prior to this one.
What I'd like to do is to include a filter in my code that when the current daily high is higher than x ticks compared to the prior daily high, then my entry condition is invalid.
Thanks for any pointers.
PS: please ignore all candles to the right of the second red arrow. The candle with the second red arrow shall be the most recent one in this example, ie High[0] == CurrentDayOHL().CurrentHigh[0]

Comment