Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.Chris L.NinjaTrader Customer Service
-
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.Chris L.NinjaTrader Customer Service
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.
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; }
Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
10 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
57 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
8 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
18 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
5 responses
47 views
0 likes
|
Last Post Today, 02:36 PM |
Comment