NinjaTrader Support Forum  

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 11-08-2009, 03:44 PM   #1
suprsnipes
Senior Member
 
Join Date: Aug 2008
Posts: 233
Thanks: 19
Thanked 5 times in 5 posts
Default Error received when trying to add an additional plot

Hi,

I'm trying to add another plot to an indicator, the two lines of code below work fine but I'm running into problems adding an additional plot.

Code:
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
Code:
Plot0.Set(CurrentDayOHL().CurrentHigh[0] + 20 * TickSize);
The lines of code I am trying to add are as follows;

Code:
Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "Plot1"));
Code:
Plot1.Set(CurrentDayOHL().CurrentOpen[0] + 40 * TickSize);
I am getting the following error and I'm not sure why. It is my first attempt at coding using NinjaScript.

Error: The name 'Plot1' does not exist in the current context.

Thank you in advance,
suprsnipes
suprsnipes is offline  
Reply With Quote
Old 11-08-2009, 04:47 PM   #2
eDanny
Senior Member
 
eDanny's Avatar
 
Join Date: Jul 2008
Location: East Rochester, NY
Posts: 899
Thanks: 0
Thanked 19 times in 17 posts
Default

You may want to check out the properties section and make an entry for your second plot there.
eDanny is offline  
Reply With Quote
Old 11-08-2009, 06:32 PM   #3
suprsnipes
Senior Member
 
Join Date: Aug 2008
Posts: 233
Thanks: 19
Thanked 5 times in 5 posts
Default

Thanks alot
suprsnipes 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
How to add additional/optional parameters to an indicator? isitpossible Indicator Development 2 08-11-2009 06:42 AM
License Key not received... Pipskateer Installation and Licensing 3 03-17-2009 07:51 AM
Add a PlaySound() compilation error Jim W. Suggestions And Feedback 3 01-24-2008 08:35 PM
About the support I've received HelloHello Automated Trading 1 09-14-2007 10:13 PM
License Key not received fanus Installation and Licensing 1 05-19-2006 12:30 AM


All times are GMT -6. The time now is 12:24 PM.