if (State == State.Historical) { SetZOrder(-1); }
However, when I apply that indicator to a secondary panel, the indicator plots do not show but NinjaTrader throws an error message "Failed to call OnRender for 'indicator'. 'Sequence contains no elements'. Draw.Region shades the price panel as expected, while the secondary panel remains empty.
The problem only occurs, when both ZOrder is set to a negative value and DrawOnPricePanel is set to 'true' (or not set at all). No problem when either ZOrder is zero/positive or DrawOnPricePanel is set to 'false'.
Nota: I have used SetZOrder within State.SetDefaults. The new user manual suggests to use it within State.Historical. Why is that? The bug occurs in both cases.
Comment