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 ninza33, Today, 07:16 AM
|
1 response
4 views
0 likes
|
Last Post
by ninza33
Today, 07:47 AM
|
||
Started by ellington, Today, 07:40 AM
|
0 responses
1 view
0 likes
|
Last Post
by ellington
Today, 07:40 AM
|
||
Started by Atticus20, Today, 07:27 AM
|
0 responses
5 views
0 likes
|
Last Post
by Atticus20
Today, 07:27 AM
|
||
Started by linkcou, Today, 07:01 AM
|
0 responses
7 views
0 likes
|
Last Post
by linkcou
Today, 07:01 AM
|
||
Started by brunoviveiros, 02-17-2020, 05:31 AM
|
4 responses
66 views
0 likes
|
Last Post Today, 06:25 AM |
Comment