SetZOrder is declared as -1 according to sample from the documentation.
// Make sure our object plots behind the chart bars SetZOrder(-1);
NinjaTrader.NinjaScript.DrawingTools.Rectangle myBox = Draw.Rectangle(
this, //Owner
recName + index, //Tag
barsAgoTime, //dateTime date
High.GetValueAt(index), //double
endBarsTime, //dateTime date
Low.GetValueAt(index), //double
ShowGlobalLines, //Show on global charts
"recTemplate" //Templatename
);
myBox.AreaBrush = lineBrush;
myBox.AreaOpacity = opacity;
Then I change the parameter ShowGlobalLines to true and all rectangles are drawn on top of the bars instead.
I can't figure out what I'm missing here. Are isGlobal objects always drawn on top?

Comment