text: NT indicator script compiling issuses / error while importing - NinjaTrader Programming | futures io social day trading
  NT indicator script compiling issuses / error while importing
  Updated: July 20th, 2010 (12:56 AM) Views / Replies: 2,936 / 8
  Created: July 6th, 2010 (11:39 PM) by skyfly Attachments: 0
  July 6th, 2010, 11:39 PM #1 (permalink)
  I downloaded the ZigZagUTC_TL_BarCount_Fibs.zip which can be found here at the top of the page
  Downloads - NinjaTrader 7 Indicators - Big Mike's Day Trading Forum
  Now I followed these directions on this page that some was kinda enough to give to me again, since I know you guys get this question a lot. That can be found here again at the top of the page.
  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
  July 6th, 2010, 11:39 PM #2 (permalink)
  July 7th, 2010, 12:39 AM #3 (permalink)
  this is a zip file, you are not supposed to unzip it. copy it down then file, utility, import ninjascript, then point to the zip file to import it.
  July 8th, 2010, 12:07 AM #4 (permalink)
  Oooo...ok. Thank you for the help!
  July 13th, 2010, 01:52 AM #5 (permalink)
  yah that did not fix it, I still get the same error messages
  July 13th, 2010, 02:42 AM #6 (permalink)
  This is an error generated by the C# compiler.
  CS0101 - "A namespace has duplicate identifiers. Rename or delete one of the duplicate identifiers.".
  Can you show the complete error message ? From your clip, I can't tell which identifier is already defined.
  July 13th, 2010, 08:13 PM #7 (permalink)
  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.
  /// 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
  privateint span = 2; // Default setting for Span
  Last edited by skyfly; July 13th, 2010 at 09:20 PM. Reason: more information about the problem
  July 14th, 2010, 12:52 AM #8 (permalink)
  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.
  July 20th, 2010, 12:56 AM #9 (permalink)
  So did this work ?
  futures io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > NT indicator script compiling issuses / error while importing