NexusFi: Find Your Edge


Home Menu

 





NT indicator script compiling issuses / error while importing


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one skyfly with 4 posts (0 thanks)
    2. looks_two kandlekid with 3 posts (0 thanks)
    3. looks_3 cory with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 4,174 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread

NT indicator script compiling issuses / error while importing

  #1 (permalink)
 skyfly 
Texas
 
Posts: 113 since Jun 2010

I downloaded the ZigZagUTC_TL_BarCount_Fibs.zip which can be found here at the top of the page

Downloads - [AUTOLINK]NinjaTrader[/AUTOLINK] 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

Thanks for any help, it's appreciated.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
What broker to use for trading palladium futures
Commodities
 
  #3 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


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.

Reply With Quote
  #4 (permalink)
 skyfly 
Texas
 
Posts: 113 since Jun 2010

Oooo...ok. Thank you for the help!

Reply With Quote
  #5 (permalink)
 skyfly 
Texas
 
Posts: 113 since Jun 2010

yah that did not fix it, I still get the same error messages

Reply With Quote
  #6 (permalink)
kandlekid
College Point, NY (Queens)
 
Posts: 63 since Nov 2009
Thanks Given: 5
Thanks Received: 20

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.

Reply With Quote
  #7 (permalink)
 skyfly 
Texas
 
Posts: 113 since Jun 2010

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.
namespace NinjaTrader.Indicator
{
///<summary>
/// 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
///</summary>
[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
{
#region Variables
// Wizard generated variables
privateint span = 2; // Default setting for Span

Reply With Quote
  #8 (permalink)
kandlekid
College Point, NY (Queens)
 
Posts: 63 since Nov 2009
Thanks Given: 5
Thanks Received: 20

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 !

Reply With Quote
  #9 (permalink)
kandlekid
College Point, NY (Queens)
 
Posts: 63 since Nov 2009
Thanks Given: 5
Thanks Received: 20

skyfly,

So did this work ?

Reply With Quote




Last Updated on July 20, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts