NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support > Historical Version 7 Beta Threads > Version 7 Beta General Questions & Bug Reports

Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 10-27-2009, 01:28 PM   #1
JS999
Senior Member
 
Join Date: Mar 2009
Posts: 477
Thanks: 11
Thanked 1 time in 1 post
Default How to do multi-colored plots in NT 7

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.
JS999 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 07:26 PM.