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 Waxavi, Today, 02:10 AM
|
0 responses
6 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
||
Started by TradeForge, Today, 02:09 AM
|
0 responses
11 views
0 likes
|
Last Post
by TradeForge
Today, 02:09 AM
|
||
Started by Waxavi, Today, 02:00 AM
|
0 responses
2 views
0 likes
|
Last Post
by Waxavi
Today, 02:00 AM
|
||
Started by elirion, Today, 01:36 AM
|
0 responses
4 views
0 likes
|
Last Post
by elirion
Today, 01:36 AM
|
||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 01:30 AM |
Comment