I am trying to draw a verticle line on the price graph and I need to figure out what the currently displayed scale is. I am attempting with drawLineRelative(bar, price, bar, nScaleHt ....) where nScaleHt equals: for example if the price scale ranges from 12.50 to 12.75 I want nScaleHt = .15 but if the scale is 100 to 110 I want nScaleHt = 7.50. Can someone help?
Announcement
Collapse
No announcement yet.
price scale
Collapse
X
-
I don't believe it can be done (yet).
Sorry to say... But I don't believe we have access to the price scale yet.
You could create a "lookback" feature in your code that waited till the current bar, then looked back X number of bars to identify the HIGH/LOW price scale range. From there, you can attempt to draw your lines.
Would this help you out at all?? If so, then I can show you how to do it.
BradBrad Matheny
eSignal Solution Provider since 2000
-
I've got a H-L scan now in the main(). (lines 52-64) If I understand correctly this means it executes on every bar. For H-L probably need this. But from a computing standpoint I'd rather find a way to set my scale once in premain(). I would really appreciate it if you took a look.Attached Files
Comment
Comment