Calculating .... Loading

Does anyone know of any way to detect when the “Calculating…” or “Loading…” text is on the chart? I figure it must be possible because if you have ‘show date range’ enabled, it moves out of the way while these messages appear.

If you only need to know when your own indicator has finished historical processing, the documented route is OnStateChange(): DataLoaded means the data series have loaded, Historical starts historical processing, and Transition is reached after that processing finishes, before realtime processing begins. Those are different checkpoints.

That does not establish whether the chart’s literal “Calculating…” or “Loading…” overlay is visible, especially if another indicator is still working. The date-range label moving shows that the chart renderer knows about the overlay; it does not by itself establish a public NinjaScript property for it. Lifecycle reference: NinjaScript > Language Reference > Common > OnStateChange() 

Are you trying to wait for your own indicator to finish, or detect the actual overlay across the whole chart?

Yea I’m trying to detect when the chart is loading data and still calculating because I have some graphical elements up there and the messages overlay on it.

For bars loading, the older NT8 guide lists ChartPanel.IsWaitingForBars. It does not confirm that every indicator finished calculating. Check availability in your build. For overlap, I would reserve a header strip and offset your graphics below it.

Reference: https://ninjatrader.com/support/helpGuides/nt8.pdf (ChartPanel, page 2078).

Are you using Draw.TextFixed, OnRender or WPF?

Link doesn’t work but google AI mentions something about it: ChartPanel.IsWaitingForBars I’ll have a look.

I’m using OnRender. The problem is… these texts are aware of each other also. So they stack on top of each other when both are on the chart, and if you have the date on the chart also that’s 3 lines…

Thanks, that explains the three-line stack. IsWaitingForBars only covers bars loading, not that stack’s bounds. Here is the HTML reference instead of the failed PDF: NinjaScript > Language Reference > Common > Charts > ChartPanel

For OnRender, a fallback is a configurable header gap covering all three lines, with your graphics starting at ChartPanel.Y plus that gap. Size it for the chart font and display scaling. This reserves space permanently, rather than detecting the overlays.

I have not verified a public API for their current bounds. Dynamic reflow remains unresolved. Would a small simulation-only example of the adjustable gap help?

I’m trying to avoid spacing something 3 texts worth of lines away from the top of the chart just to accommodate for messages that appear only for a short time.