Now once I have copy and pasted and I hit the compile button I get this error message " The following Ninja Script file [s] have programming errors and must be resolved before compiling.
First in the download their are three seperate cs files. Do I place these all on the same sheet one after the other. Or do I open different sheets, and compile them seperately.
And if I do compile them seperately, on the first cs file, I'm receving the above error message.
Also I'm unsure of the name I'm supposed to copy. I think that it is in line 2, but the directions say it is "mostly" found in line 20 to 30. Is the copying of the name such a big deal? I mean would that make the code not work right? And if it is not such a big deal then the only problem I'm having is the above "error message" In detail is says
"Indicator\saedfhjasdhf.cs........The namespace "NinjaTrade.Indicator' already c....CS101 click for info...22.....18
"Indicator\ZigZagagnew.cs.......The namespace "NinjaTrader.Indicator'already c....CS101 click for info...52.....18
So their ya go, I hope someone can help, cause I have no clue
Ok through talking with someone at NJ, through email, I figured out how to figure out where the "error" is. So here is a copya and psate of what the program is high lighting when I double click on the error message. The part that I'm being told is the "error message" is in red and underlined.
And this is just a snipit of the indicator script, just to show where the "error message" is.
// This namespace holds all indicators and is required. Do not change it.
/// ZigZag indicator from the Ultimate Trading Guide by Hill, Pruitt, and Hill. A swing high occurs when price takes out the low of the highest bar. A swing low occurs when price takes out the high of the lowest bar. Span setting determines how many bars to look back for highest highs and lowest lows; i.e. span=5 on daily bars find weekly swings.
/// add HH/LL trend lines and rays 11/14/09 -Cory
/// add fib suite 11/25/09 - cory
[Description("ZigZag indicator from the Ultimate Trading Guide by Hill, Pruitt, and Hill. A swing high occurs when price takes out the low of the highest bar. A swing low occurs when price takes out the high of the lowest bar. Span setting determines how many bars to look back for highest highs and lowest lows; i.e. span=5 on daily bars find weekly swings.")]
publicclassZigZagUTC_TL_BarCount_Fibs_v5_1 : Indicator
// Wizard generated variables
privateint span = 2; // Default setting for Span
Last edited by skyfly; July 13th, 2010 at 09:20 PM.
Reason: more information about the problem
The red above is not an error message, it's a class name. But I digress. I downloaded the zip file and it compiled fine (NT 7 beta 18).
Here's what I think happened to you ... you most likely created another .cs file containing the class name above (which you highlighted in red), by following the import directions in your first post. Can you check something out ? Is there another file in the indicators directory
with this filename ... ZigZagUTC_TL_BarCount_Fibs.cs ?
Which got there via the unzip ? If so, and the file you created is also there, this is the problem. In this case, you should probably move the file you created to another directory
(maybe a subfolder under indicators ... myfiles ?), and then recompile (you just need to open one file
... say ZigZagUTC_TL_BarCount_Fibs.cs and hit F5). The NinjaScript compiler will compile all the source files in the indicators directory into the dll.
If this works, the takeaway from this is ... for the zip files, don't create a new file (unless you need to modify the indicator), just unzip the source into the indicators dir (assuming it's an indicator and not a strategy) and compile. Voila !
BTW, cool indicator !
Last edited by kandlekid; July 14th, 2010 at 01:15 AM.