thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to control Z order of plots within Indicator
Collapse
X
-
How to control Z order of plots within Indicator
If I have an Indicator plotting a Line( PlotStyle Line) and a Histogram ( PlotStyle Bar ) How do I keep the line plot on top of the Histogram plot. I seem to remember it had to do with which is plotted first or last. But I tried reversing them and it made no difference.
thanksTags: None
-
Hello JerryWar,
The z-order of the plots will be determined by the order in which the plots are added to the indicator code. The last one added will have the top most z-order.
For example,
Code:AddPlot(new Stroke(Brushes.Red), PlotStyle.Bar, "PlotC"); AddPlot(new Stroke(Brushes.Blue),PlotStyle.Line, "PlotA");
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
-
Thank you, One Follow up question. So in Your example "PlotC" is added first. It would be Value[0] and be on top and "PlotA" would be Value[1] and be on the bottom. Assuming "PlotC" has a public Name "PlotC" and the same for "PlotA" if I Now reverse the order the order of the add statements will "PlotC" now be behind PlotA and be shared out under Value[1] because we haven't changed anything else ?
Comment
-
Originally posted by NinjaTrader_AlanP View PostHello JerryWar,
The z-order of the plots will be determined by the order in which the plots are added to the indicator code. The last one added will have the top most z-order.
For example,
Code:AddPlot(new Stroke(Brushes.Red), PlotStyle.Bar, "PlotC"); AddPlot(new Stroke(Brushes.Blue),PlotStyle.Line, "PlotA");
Please let us know if you need further assistance.
Comment
-
Hello JerryWar,
So in Your example "PlotC" is added first. It would be Value[0] and be on top
It would be the reverse.
In my example the Blue PlotA would always be over the Red Plot C.
I have attached a sample you can test by switching the order of the AddPlot calls and removing the indicator and reapplying.
Please let us know if you need further assistance.Attached FilesAlan P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by RubenCazorla, 08-30-2022, 06:36 AM
|
3 responses
77 views
0 likes
|
Last Post
by PaulMohn
Today, 04:44 AM
|
||
Started by f.saeidi, Yesterday, 12:14 PM
|
9 responses
23 views
0 likes
|
Last Post
by f.saeidi
Today, 04:39 AM
|
||
Started by Tim-c, Today, 03:54 AM
|
0 responses
3 views
0 likes
|
Last Post
by Tim-c
Today, 03:54 AM
|
||
Started by FrancisMorro, Today, 03:24 AM
|
0 responses
4 views
0 likes
|
Last Post
by FrancisMorro
Today, 03:24 AM
|
||
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
10 responses
1,772 views
0 likes
|
Last Post
by Leafcutter
Today, 03:01 AM
|
Comment