First off, I need to figure the number of bars since the last 40 bar high. Not the price, the number of bars ago since it happened.
Second, the same thing for the number of bars since the last 40 bar low. Same as above, not the price, but the number of bars ago since it happened.
That's pretty much it. Please post the equation for each for an easy cut n paste.
Comment