Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
NT MultiColor Plot Approach
Collapse
This is a sticky topic.
X
X
-
NT MultiColor Plot Approach
With NinjaTrader 7, you no longer have to have multiple plots of different colors in order to simulate having a single multi-color plot. The attached reference sample demonstrates the new multi-color plot concept for NT7. Comments are included in the script.RayNinjaTrader Customer ServiceTags: None
- Stuck
-
With .Net 3.5 at your disposal it would be so easy to create an extension method on DataSeries to do this without the need for nested indices..
There is absolutely no reason that you can't do
Upper.PlotColor[0] = (Rising(Middle)) ? Color.Black : Color.Blue;
(in the case that Upper is a dataseries without associated plot object, just use the NullObject pattern to act upon a static dummy Plot)
That is IMO much cleaner..
Comment
-
I think this is MUCH better than in 6.5. Nice to be able to get rid of the extra plots data series that were needed for every color change.Last edited by eDanny; 11-03-2009, 11:46 AM.
Comment
-
Originally posted by sefstrat View PostWith .Net 3.5 at your disposal it would be so easy to create an extension method on DataSeries to do this without the need for nested indices..
There is absolutely no reason that you can't do
Upper.PlotColor[0] = (Rising(Middle)) ? Color.Black : Color.Blue;
(in the case that Upper is a dataseries without associated plot object, just use the NullObject pattern to act upon a static dummy Plot)
That is IMO much cleaner..
PlotColors[0][0] works perfectly for me. Thanks NT staff.Last edited by roonius; 11-03-2009, 10:05 AM.
Comment
-
Originally posted by roonius View Post"Upper" might not necessarily be a plot, it could be simple DataSeries without Plot associated with it, so Upper.PlotColor[0] will not be so easy to implement even with extension methods.
PlotColors[0][0] works perfectly for me. Thanks NT staff.
In other words, if using extension methods and this is a DataSeries without a plot, simply do nothing. Or an alternative way to implement it is to have all freshly instantiated DataSeries assigned a singleton or static 'dummy' plot which is never really used, ie NullPlot.
Comment
-
Above, I said this was kind of clumsy, but after using it today, I think it is fine. The main issue I had was that the color series is not associated with the plot name, so you have to remember which plot index is which. This is easily gotten around though with a simple enum though if you care.
Comment
-
Please provide a link to download Beta 3 for those who (like me) downloaded Beta 4 and were unaware of this issue. I use various indicators with the Multi Plot feature and now find myself unable to trade because I can't downgrade anymore (the Beta 3 link in the mail announcing Beta 3 availability downloads Beta 4 now).
Thanks
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by martini, Yesterday, 04:45 PM
|
1 response
10 views
0 likes
|
Last Post Today, 06:45 AM | ||
Started by proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
26 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
6 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
310 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
Comment