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 > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 02-10-2009, 06:38 PM   #1
ramckay
Member
 
Join Date: Mar 2008
Location: Denver, CO
Posts: 50
Thanks: 9
Thanked 0 times in 0 posts
Default Compile Error

I'm brand new at creating indicators. I used the New Indicator Wizard and pressed the "Generate" button to look at the code. Without changing anything I compiled the default code. It resulted in errors in line 51 which is in the Properties section:

Indicator\rangeStpHi.cs Invalid expression term '['
Indicator\rangeStpHi.cs ) expected
Indicator\rangeStpHi.cs ; expected
Indicator\rangeStpHi.cs Invalid expression term ')'
Indicator\rangeStpHi.cs ; expected

I assumed that the default indicator would compile and then I could start to add the code I wanted. What am I missing?

Thanks,
ramckay is offline  
Reply With Quote
Old 02-10-2009, 07:07 PM   #2
Newshues
Member
 
Join Date: Jan 2009
Posts: 40
Thanks: 0
Thanked 0 times in 0 posts
Default

Um, show us the complete line of code and maybe we can be of more help?

From the look of the errors you used a [ where you wanted a (
Newshues is offline  
Reply With Quote
Old 02-10-2009, 07:25 PM   #3
ramckay
Member
 
Join Date: Mar 2008
Location: Denver, CO
Posts: 50
Thanks: 9
Thanked 0 times in 0 posts
Default

Hi Newshues,

This is the line of code that that the indictor wizard installs and causes a compile error:


[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove


Thanks
ramckay is offline  
Reply With Quote
Old 02-10-2009, 07:36 PM   #4
ramckay
Member
 
Join Date: Mar 2008
Location: Denver, CO
Posts: 50
Thanks: 9
Thanked 0 times in 0 posts
Default

Hi Newshues,

I think I must have another problem. I tried to compile a couple of the indicators that are are installed with NT and I get the same compile errors. Could my installation to NT be corrupteed?

Thanks,

ramckay
ramckay is offline  
Reply With Quote
Old 02-10-2009, 08:56 PM   #5
Newshues
Member
 
Join Date: Jan 2009
Posts: 40
Thanks: 0
Thanked 0 times in 0 posts
Default

You'll get the compile error until the bug code is fixed no matter what you compile. Ninja attempts to compile everything changed when you compile.

Perhaps you're missing a } above the line the gives the error.
Newshues is offline  
Reply With Quote
Old 02-11-2009, 03:17 AM   #6
ramckay
Member
 
Join Date: Mar 2008
Location: Denver, CO
Posts: 50
Thanks: 9
Thanked 0 times in 0 posts
Default

Hi Newshues,

I know I'll get a compile error for errors. My question is "Is the line of code correct?" My editor is giving me the same error on indicators that NT installed and run OK when I open and try to compile them , same as the example that I posted which is from the boiler plate code that the Indicator Wizard creates when you add nothing to the Wizard and select "Generate."

Thanks,

ramckay
ramckay 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
Compile error mktrend General Programming 3 01-07-2009 05:28 AM
Compile error ghoti General Programming 5 05-27-2008 06:18 AM
compile error deanldavis475 General Programming 1 11-23-2007 10:35 AM
Strange error on compile maxpi Indicator Development 4 07-24-2007 07:20 AM
Compile error with UserDefinedMethods NinjaTrader_Josh Indicator Development 6 06-06-2007 08:34 AM


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