In writing automated strategies for Ninjatrader, I have often come across situations where I have identified highest high or lowest low over the previous X number of bars, both the price and the # of bars ago. However, when I am looking for a lower high or higher low, I've been pretty dissatisfied with everything I've tried.
Say I find 56.66 as the recent highest high in CL, but want to find a subsequent lower high as a condition for an expected drop in price. I have tried using Swing, HighestBar/LowestBar, ZigZag, MAX/MIN and maybe some other things, but have not been pleased, either with failing to identify the 'correct' lower high or higher low, or with having to arbitrarily pick a number of bars to wait before defining a new LH or HL.
Has anyone else dealt with this question and, if so, resolved it to your satisfaction? Also if so, how?