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 andrewtrades, Today, 04:57 PM
|
1 response
5 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
3 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
7 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM |
Comment