Hi Nicolas,
I have the highest high during intraday being drawn on current bar. If for example the highest high bar occurred x bars ago and that particular bar had another value drawn on it by a private indicator.
How do I make reference to that highest high bar (x bars ago) and have the code also show on current bar the value of the indicator on that x bar?
You need to code the detection of the intraday HIGHEST high and save that high AND the other X value you are interested in (not tested):
DEFPARAM DrawOnLastBarOnly = True
ONCE HighestHIGH = high
ONCE Xdatum = CALL "MyIndicator"
IF IntraDayBarIndex = 0 THEN //0=a new day just started
HighestHIGH = high
Xdatum = CALL "MyIndicator"
ENDIF
IF High > HighestHIGH THEN
HighestHIGH = high
Xdatum = CALL "MyIndicator"
ENDIF
DrawText("Highest=#HighestHIGH# X=#Xdatum#",BarIndex,HighestHIGH + range)
RETURN