JSParticipant
Senior
Hi @benkunz
The labels are tied to the “BarIndex” (the last bar) so when you zoom in or out or scroll back in time they can disappear…
I think in the new PRT version (12) there is an instruction that you can “pin” labels to the screen… but I don’t know if you’re working with this version…
(Peter’s solution was “almost right”)
JSParticipant
Senior
Hi @benkunz
The “BarIndex” depends on the “units” you load in your chart, zooming in or out has no effect on the “BarIndex”…
As I said, I don’t think there is any possibility in PRT version 11 to “fix” the labels in any other way…
Ah, Yes, disappearing labels in the left-hand side is what you mean … No, that won’t get solved with what I said in my last post.
I am not sure whether it is V12 specific (I would not think so) but since a year or so we have the Anchor directives. So you can anchor something 20 pixels from the left border etc. etc. It is quite “large” for applications.
Anchoring in pixels
I think that is what you mean, Jaap ?
If Yes, this still requires the solution in my last post, and that would be “undoable” (the whole of the price graph will be squeezed into a horizontal line). And what remains is the lacking logic for the High and Low. This is for benkunz to solve; to me there is no logic in the high of the last 1L, 10K, 100K etc. bars (hence the content of the chart, be that the visible content after (un)zooming or be that internal. Instead, there must be functionality in it. Like “High (and Low) since last double top (or double bottom). Or since the last Session-end. Or what I do : the past 2 hours (etc.). In any event, unrelated to zooming (which the chart always is subject to).
But that is my
opinion …
JSParticipant
Senior
Hi,
Thought it was something new for V12 but is also in this version…
This allows you to “pin” the text to your screen so that it no longer disappears when zooming or scrolling…
DefParam DrawOnLastBarOnly=True
xHigh=Highest[BarIndex+1](High)
xLow=Lowest[BarIndex+1](Low)
DrawText("High=#xHigh#",-100,-100,SansSerif,Bold,16)Coloured("Green")Anchor(TopRight)
DrawText("Low=#xLow#",-100,100,SansSerif,Bold,16)Coloured("Red")Anchor(BottomRight)
Return
JSParticipant
Senior
@PeterSt
Thanks for the “pixel” tip…