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 algospoke, Yesterday, 06:40 PM
|
2 responses
23 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
45 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
22 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment