NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Charting

Charting Support for NinjaTrader Advanced Charting.

Reply
 
Thread Tools Display Modes
Old 02-24-2009, 08:28 AM   #1
barrosco
Member
 
Join Date: Nov 2008
Location: Rio de Janeiro
Posts: 90
Thanks: 0
Thanked 1 time in 1 post
Default Is there an error in this code?

Dear friends,
I made this code for an indicator for SMA to change color if:
Close[0]>Close[1]; Close[0]>Close[2]; Close[0]<Close[1];Close[0]<Close[2].
After I looked in "Indicators" and the "SlopofSMA" did not appear on it.
Could someone help me, please?
Attached Files
File Type: cs SlopofSMA.cs (7.2 KB, 2 views)
Last edited by barrosco; 02-24-2009 at 08:32 AM. Reason: Attach de code
barrosco is offline  
Reply With Quote
Old 02-24-2009, 08:43 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Did you press F5 to compile your code? Also, please see this tip because you will have errors when you run that script: http://www.ninjatrader-support2.com/...ead.php?t=3170
NinjaTrader_Josh is offline  
Reply With Quote
Old 02-24-2009, 10:53 AM   #3
barrosco
Member
 
Join Date: Nov 2008
Location: Rio de Janeiro
Posts: 90
Thanks: 0
Thanked 1 time in 1 post
Default ???

Thanks Josh, but I fell very complicate to make this code.
Last edited by barrosco; 02-24-2009 at 10:53 AM. Reason: correction
barrosco is offline  
Reply With Quote
Old 02-24-2009, 11:04 AM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

barrosco,

Let us say your indicator is called someIndicator.

Create another indicator and just do this:
Plot0.Set(SMA(someIndicator, 20)[0]);
NinjaTrader_Josh is offline  
Reply With Quote
Old 02-25-2009, 05:33 AM   #5
barrosco
Member
 
Join Date: Nov 2008
Location: Rio de Janeiro
Posts: 90
Thanks: 0
Thanked 1 time in 1 post
Default Thans, I got another solution

Dear Josh,
Thanks for your gentle help.
I found (forum) the Indicator Double MA Multi Colored, by JOSH. Thanks again.
barrosco 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
error in code skynetman Indicator Development 5 10-02-2008 07:12 AM
IB Order rejected error code 201 TraderEyal ATM Strategies (Discretionary Trading) 7 07-21-2008 01:10 PM
multi-time frame code and entry code Mark_486 General Programming 1 05-15-2008 11:54 AM
Help code error ATI user Historical NinjaTrader 6.5 Beta Threads 9 12-22-2007 04:48 AM
New and Fun error code bobby1001 General Programming 3 10-02-2007 11:35 PM


All times are GMT -6. The time now is 11:39 AM.