Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
plot vs line priority
Collapse
X
-
Hello ballboy11,
Thank you for the post. You will need to use SetZOrder to set the z-order of your plot to a higher value than the z-order of the lines. You can also set the z-order once the script is running by clicking on the plot to select it, then hold Shift and scroll up or down on your mouse.
https://ninjatrader.com/support/help...?setzorder.htm - SetZOrder
Please let me know if I can assist further.
-
Thanks I read the info and am still a little confused.
here are the 2 plots
AddPlot(new Stroke(eRangeColor, eRangeLineStyle, nLineThickness), PlotStyle.Bar, "A");
AddPlot(new Stroke(Brushes.Red, eRangeLineStyle, nLineThickness), PlotStyle.Bar, "B");
I need Plot A on top of Plot B
Comment
-
Hello ballboy11,
Thanks for the reply.
The z-order will be set by the order you call AddPlot. The BuySellVolume indicator adds the DarkCyan plot first, then the red one. If you load it onto the chart you will see that the DarkCyan bar is behind the red bar. So you would need to call AddPlot on B first, then A.
Please let me know if I can assist further.
Comment
-
Hello ballboy11,
Thank you for the reply.
You can change the z-order property if you save your line as a class level variable. Set the z-order to a very large negative number to ensure it will always be in the background.
Please let me know if I can assist further.Code:public class MyIndicator: Indicator { HorizontalLine HZ; ... protected override void OnBarUpdate() { ... HZ = Draw.HorizontalLine(this, "MYLINE", (Sells[0]+Buys[0])/2,Brushes.Ivory); HZ.ZOrder = Int16.MinValue; }
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
578 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment