Hi all,
I'm working on a DeMark indicator which places text above and below the price bars. Sometimes it's necessary to place a few items (e.g. a number and an arrow) one above the other.
The Problem
The TextOutput:set method allows you to specify the vertical placement of the text as a price level. A one hour chart usually has a couple of hundred pips from top to bottom, so placing one line of text roughly 5 or 6 pips above the other looks fine. However, on a one minute chart there might only be 30 pips from top to bottom, so placing one line of text 5 or 6 pips above the other looks really widely spaced. Then the daily or weekly chart has maybe 1 000 pips top to bottom, so only 5 or 6 pips between lines means that the text appears over the top of the other text.
My Thoughts for a Solution
IF I could find out the number of pips currently showing on the vertical scale of the chart then I could easily scale the spacing to be (for example) one twentieth of the chart. That way the line spacing would appear consistent on all charts.
However, I can't find any function that allows me to 'get' the vertical scaling of the chart.
Can anyone help? Is there
a) a way to find out the current vertical scaling of the chart, or
b) some other way to set the text a certain distance above or below the bar's high or low, instead of at a certain price?
As always, any help would be greatly appreciated.
Best regards.