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 | ||
---|---|---|---|---|
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
10 responses
1,767 views
0 likes
|
Last Post
by Leafcutter
Today, 03:01 AM
|
||
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, 04-23-2024, 07:51 PM
|
2 responses
30 views
0 likes
|
Last Post
by Max238
Today, 02:25 AM
|
||
Started by Shansen, 08-30-2019, 10:18 PM
|
24 responses
943 views
0 likes
|
Last Post
by spwizard
Today, 01:29 AM
|
||
Started by Max238, Today, 01:28 AM
|
0 responses
9 views
0 likes
|
Last Post
by Max238
Today, 01:28 AM
|
||
Started by rocketman7, Today, 01:00 AM
|
0 responses
7 views
0 likes
|
Last Post
by rocketman7
Today, 01:00 AM
|
Comment