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 06-23-2008, 04:57 AM   #1
raz0rback
Member
 
Join Date: May 2008
Posts: 43
Thanks: 0
Thanked 0 times in 0 posts
Default Trend backcolor

Hi all,

I am using a TEMA to set the background color depending on whether rising or falling. I can get the rising and falling colors to work. But I cant seem to get it to work on the bars where the TEMA is same as previous bar.

Here is code:

if (TEMA(100)[0] < TEMA(100)[1])
{
BackColor = Color.MistyRose;
FlagTEMA.Set(-1);
}
if (TEMA(100)[0] > TEMA(100)[1])
{
BackColor = Color.MintCream;
FlagTEMA.Set(1);
}

if ( (TEMA(100)[0]) == (TEMA(100)[1]) )
{
BackColor = Color.White;
}

Any suggestions?
raz0rback is offline  
Reply With Quote
Old 06-23-2008, 05:06 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

I suggest debugging your NinjaScript as per here: http://www.ninjatrader-support.com/v...ead.php?t=3418
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
TTm Trend Sidhartha Indicator Development 19 02-25-2009 06:06 AM
3 State BackColor daven Indicator Development 1 05-17-2008 03:54 PM
Trend line channels - Oscillator trend lines ? fryguy General Programming 1 05-16-2008 10:20 AM
BackColor in panel 2 ATI user Indicator Development 4 09-01-2007 09:39 AM
BackColor in Strategy NinjaTrader_Josh Strategy Development 11 05-31-2007 02:17 PM


All times are GMT -6. The time now is 08:25 AM.