NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 07-08-2008, 07:20 AM   #1
mrlogik
Certified NinjaScript Consultant
 
mrlogik's Avatar
 
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
Default Multi Colored Plots

Hey guys.

I have been working on a multiple colored plot based on one MA above / below another MA. I have read a few posts and tried different coding techniques to try and get this to work to no avail.

Basically, all I'm trying to do is have the MA lines plot one color if MA1 > MA2, and another color if MA1 < MA2. I am able to get this to work using 4 different indicator plots. MA1up, MA2up, MA1dn, MA2dn.

My problem is that on the initial change in color I have all 4 plots showing at once, and since you have to connect the plots using the .Set(1, MA[1]), I get the change in color displayed one bar earlier before the cross takes place.

I have attached the indicator.

Thanks for your help.
Anthony
Attached Files
File Type: zip xMAxOverv2.zip (5.2 KB, 10 views)
mrlogik is offline  
Reply With Quote
Old 07-08-2008, 07:29 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Didn't the reference sample work for you? http://www.ninjatrader-support.com/v...ead.php?t=3227
NinjaTrader_Dierk is offline  
Reply With Quote
Old 07-08-2008, 07:32 AM   #3
mrlogik
Certified NinjaScript Consultant
 
mrlogik's Avatar
 
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
Default

Yes sir.

It works except when it changes color, it plots back 1 bar (.Set(1, MA[1])), which gives the new color 1 bar back over the previous color. Know what I mean?
mrlogik is offline  
Reply With Quote
Old 07-08-2008, 07:34 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Hmm, this then would appear to be a limitation. NT7 will come with next multi color support.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 07-08-2008, 07:48 AM   #5
mrlogik
Certified NinjaScript Consultant
 
mrlogik's Avatar
 
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
Default

Thanks for the reply Dierk.

Do you have any idea around when NT7 is slated for release?
Also, is added Oanda brokerage support part of this release?

Thanks
mrlogik is offline  
Reply With Quote
Old 07-08-2008, 07:52 AM   #6
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

NT7 beta is scheduled for end of this year. Right now we don't have anything scheduled on Oanda support.
NinjaTrader_Dierk is offline  
Reply With Quote
Reply

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
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
Plots[?].Min & Plots[?].Max Don't work AlohaBob Indicator Development 6 01-06-2007 08:31 PM


All times are GMT -6. The time now is 05:41 PM.