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 > Application Technical Support > Miscellaneous Support

Miscellaneous Support Miscellaneous support issues.

Reply
 
Thread Tools Display Modes
Old 07-14-2010, 01:04 PM   #1
Maxthink
Junior Member
 
Join Date: Jul 2010
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default newbie: Ninnja Trader Tutorial 2 problem

NinjaScript Tutorial 2 in the help file says:

Plots.Add(new Plot(Color.OrangeRed, PlotStyle.Line, "Plot0"));
Period =10;

In compiling, I get the following error:

'System.Array' does not contain a definition for 'Add'

Any suggestions?
Maxthink is offline  
Reply With Quote
Old 07-14-2010, 01:42 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello Maxthink,

Welcome to the NinjaTrader forums!

I'm looking for the snippet you posted but have been unable to locate. Do you have the link or can provide more information on where it can be found?


Add(new Plot(Color.OrangeRed, PlotStyle.Line, "Plot0"));

Above is a complete statement. It belongs in the Initialize() method and doesn't need the Plots. before it

If you have any variable declarations like Period = 10, these belong in the variables region.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 07-14-2010, 02:19 PM   #3
Maxthink
Junior Member
 
Join Date: Jul 2010
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default

The problem code for me in the Ninja Trader tutorial is found at:

Help - NinjaScript - Tutorial: Indicator on Indicator (Level 2) - Setup

The first line in the area noted by number 2 produces the problem described in thread #1
Maxthink is offline  
Reply With Quote
Old 07-14-2010, 02:45 PM   #4
Maxthink
Junior Member
 
Join Date: Jul 2010
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default

Problem solved!

In entering the tutorial code, if it didn't work ... I started a new NinjaScript code file under a new name.

In the compiling phase, rather than reporting errors in the just the current code, the compiler reported errors in each of the non-working files. I missed that point.

After I deleted the non-working scripts, the tutorial compiled and ran as desired.
Maxthink is offline  
Reply With Quote
Old 07-14-2010, 02:51 PM   #5
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Thanks for the update and glad to hear you have sorted it out. Looks like the screenshot has already been corrected in our version 7 documentation for this.

http://www.ninjatrader.com/support/h...t7/set_up5.htm
NinjaTrader_RyanM 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
Basic Automated Trade Tutorial - Strategy tonyh Automated Trading 3 03-10-2010 07:25 AM
VMWare Fusion NT Install Tutorial watchhillian Installation and Licensing 0 01-03-2010 05:34 PM
Conditions not being met? - newbie problem Drew Strategy Development 1 10-19-2008 09:01 AM
tutorial no longer available? Futures_Shark General Programming 1 08-11-2007 11:07 PM
Indicator Tutorial - ROC SuzyG Indicator Development 2 12-27-2006 08:38 PM


All times are GMT -6. The time now is 09:03 AM.