Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ZOrder on Plots/Lines?
Collapse
X
-
Hello,
Although there is the SetZOrder() helper method available for an entire indicator, there is not a way to set the z-order of individual plots within an indicator via NinjaScript. You should be able to accomplish this by separating the plots you wish to be above the others into a separate indicator, then using SetZOrder() on the two indicators within the same panel.Dave I.NinjaTrader Product Management
-
You could try re-arranging the order in which you add the plots in state.setdefaults.. Add the histo one first and then anything you want on top latter.. The last one added will be on top of all the others and so forth.. This will unfortunately change your values series and you might need additional code changes to accommodate that.. But I believe that should work for you..Originally posted by funk101 View PostMy custom indicator has 4 elements, 3 lines and a histogram. Currently the lines are plotted underneath the histogram, I would like them to be on top of the histogram. How is this achieved?
Comment
-
Don't like the way that sounds ;-(Originally posted by NinjaTrader_Dave View PostHello,
Although there is the SetZOrder() helper method available for an entire indicator, there is not a way to set the z-order of individual plots within an indicator via NinjaScript. You should be able to accomplish this by separating the plots you wish to be above the others into a separate indicator, then using SetZOrder() on the two indicators within the same panel.Last edited by funk101; 11-04-2015, 01:32 PM.
Comment
-
FYI Edge was right, it was the order with which my plots were at. It works like this:
Values[0] will be below Values[1], etc. So in my case I made the histogram Values[0], [1], [2] and the two lines (which I want on top, and which *used to be* [0] and [1]) are now Values[3] and Values[4]. Now the order is correct.
Comment
-
You can manually set the "ZOrder" of an indicator by following the instructions listed here:Originally posted by marci02 View PostI have one indicator which is plotting above or on top of price bars. How do I get it to plot behind price bars? Thanks in advance!
If you are the developer of the indicator, you should be able to use the SetZOrder() method to the desired ZOrder level:
MatthewNinjaTrader Product Management
Comment
-
Thanks Matthew!
Is there a way to setup the ZOrder for Plots in an indicator? For example, the Macd indicator has the Macds, connectors, and bands. How would I get the Macds to plot on top of the connectors and on top of the bands? Is there something else besides the ZOrder to set this up? Thanks!
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
668 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
377 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
110 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
575 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
580 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment