![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Mar 2009
Posts: 477
Thanks: 11
Thanked 1 time in 1 post
|
It states in the release notes that we can now handle multi-colored plots in NT 7 with a single plot. Previously, we had to use code in NT 6.5 as follows:
// Plot green if the SMA is rising // Rising() returns true when the current value is greater than the value of the previous bar. if (Rising(SMA(Period))) { // Connects the rising plot segment with the other plots RisingPlot.Set(1, SMA(Period)[1]); // Adds the new rising plot line segment to the line RisingPlot.Set(SMA(Period)[0]); } // Plot red if the SMA is falling // Falling() returns true when the current value is less than the value of the previous bar. else if (Falling(SMA(Period))) { // Connects the new falling plot segment with the rest of the line FallingPlot.Set(1, SMA(Period)[1]); // Adds the new falling plot line segment to the line FallingPlot.Set(SMA(Period)[0]); } Where we set the previous bar's value to the same plot. What is the new way of doing this properly in NT 7 with a single plot? I searched but I can't seem to find a code sample. |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strategy Plots Multi Instrument | raz0rback | Strategy Development | 25 | 08-23-2011 10:11 AM |
| Double EMA Multi Colored | Rollins | NinjaScript File Sharing Discussion | 14 | 01-13-2009 07:18 AM |
| Multi Colored Plots | mrlogik | Indicator Development | 5 | 07-08-2008 07:52 AM |
| Indicator: Multi-Colored Plots | NinjaTrader_Josh | Reference Samples | 0 | 09-06-2007 01:28 PM |
| Multi Colored plots. | higler | General Programming | 6 | 05-10-2007 12:05 PM |