I tried to get around this by choosing a Y value based on the chart's displayed Y range up to that point, but this often makes the problem worse because volatility, and thus the chart's displayed Y range, often changes and the nicely positioned text will suddenly move off the chart or over the bar as the chart moves or scrolls.
The only solution as far as I can tell is for NinjaTrader to add the capability to anchor text at the bottom of the text in addition to what it currently does, which is anchoring at the top. If you do this, which I sincerly hope that you do, you will probably want to do it via adding an extra argument to the DrawText() method. This way you can always add other anchoring options (now or in the future) for anchoring in other spots too (for example: left, right, center). You may also want to consider adding a pixel offset argument so that you could, for example, keep the text consistently 7 pixels above the price bar.
Thanks!
Comment