NexusFi: Find Your Edge


Home Menu

 





Errors when compiling indicators (using cjbooth's system)


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one bnichols with 12 posts (2 thanks)
    2. looks_two processing with 8 posts (0 thanks)
    3. looks_3 Zondor with 4 posts (1 thanks)
    4. looks_4 pepbosch with 3 posts (0 thanks)
      Best Posters
    1. looks_one Silvester17 with 1.5 thanks per post
    2. looks_two Fat Tails with 1 thanks per post
    3. looks_3 Abde with 1 thanks per post
    4. looks_4 bnichols with 0.2 thanks per post
    1. trending_up 10,083 views
    2. thumb_up 10 thanks given
    3. group 7 followers
    1. forum 32 posts
    2. attach_file 12 attachments




 
Search this Thread

Errors when compiling indicators (using cjbooth's system)

  #1 (permalink)
 
processing's Avatar
 processing 
Sydney, NSW
 
Experience: Beginner
Platform: Quantower
Frequency: Other
Duration: Other
Posts: 102 since Feb 2011
Thanks Given: 247
Thanks Received: 124

Hi all,

I get the following error: "CS0101 - click here for more info".

In the description it says that there is "already" a definition for "....."

See the attached picture.

Please advise me how to fix this problem, and/or explain what is causing this?

Attached Thumbnails
Click image for larger version

Name:	compile errors nt7.jpg
Views:	273
Size:	194.6 KB
ID:	95405  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Exit Strategy
NinjaTrader
Futures True Range Report
The Elite Circle
Deepmoney LLM
Elite Quantitative GenAI/LLM
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
27 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #2 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460

This is the kind of NT error that wore me down when I used it. Guessing either the indicator (or attached DLL) redefines the stock indicators referred to (e.g., in a helper file perhaps). Can you post what you imported or cut/paste into the indicator?

Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 
processing's Avatar
 processing 
Sydney, NSW
 
Experience: Beginner
Platform: Quantower
Frequency: Other
Duration: Other
Posts: 102 since Feb 2011
Thanks Given: 247
Thanks Received: 124


I didn't import or cut/paste anything. I only double-clicked on it, and clicked compile, and it came up with the errors.

*scratches head*

Started this thread Reply With Quote
  #4 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460

Ah so. Assuming the code is free and in the public domain (since otherwise you would be petitioning the provider rather than futures.io (formerly BMT) ) can you post a link to the code?

Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
 
processing's Avatar
 processing 
Sydney, NSW
 
Experience: Beginner
Platform: Quantower
Frequency: Other
Duration: Other
Posts: 102 since Feb 2011
Thanks Given: 247
Thanks Received: 124

Code can be downloaded from here:

It's a bit past halfway down the page, post #29.

Thanks.

Started this thread Reply With Quote
  #6 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460

Alrighty...I downloaded all 4 indicators in the post and imported (hence compiled them) into NT with no issues (screenshot with all 4 indicators installed below). I'm familiar with all of them and already had a newer version of SuperTrend installed, which was overwritten for the purpose of this experiment.

This is where the fun begins. Since the problem is not with the indicators it is either with your NT installation (which might have become corrupt in one way or another for one reason or another) or with the environment in which NT is running.

I've run into the same error often myself after making changes to NT and IIRC was able to resolve the problem by reversing recent changes (deleting indicators perhaps, in this case) until I got the right one, then retrying to install & looking for clues or patterns in the way it fails, if necessary. It's been a while but sometimes the actual cause of the error is (or may seem) unrelated to the indicators themselves, but to reiterate usually related to any recent change to the system or to NT (including changes made by gremlins it seems to me).

Failing that, you might try what I used to do as a last resort after a suitable amount of hair tearing; namely, blow away the NT installation and reinstall from scratch.

Hopefully someone more knowledgeable (and less jaded) about NT will chime in Good luck!


Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

The problem is obvious and is not addressed in the previous responses, which you would do well to disregard.

Those errors PROBABLY mean that you have more than one cs file for each of those indicators EMA, LinReg, ATR, etc.

If you look in your Indicator

(..MyDocuments\Ninjatrader 7\bin\Custom\Indicator)

folder you will probably find two files for EMA, two files for LinReg, two files for ATR, etc.

They won't all have the same name. For example you might find one called @EMA and another one called EMA.

In any case like that where you have two cs files with the same name except that one has a leading ampersand @, delete the one without the leading ampersand. The error probably happened because somebody put misnamed files for system indicators, missing the ampersand, into an installation package that you imported.

Technically the problem is that for the EMA example, both files EMA.cs and @EMA.cs will be trying to implement a CLASS called EMA. However, every CLASS implemented within the Indicator NAMESPACE must have a unique name.

Also, make sure you do not have any copies of those EMA or @EMA, ATR or @ATR, etc .cs files in the ...\Ninjatrader 7\bin\Custom folder.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #8 (permalink)
 
processing's Avatar
 processing 
Sydney, NSW
 
Experience: Beginner
Platform: Quantower
Frequency: Other
Duration: Other
Posts: 102 since Feb 2011
Thanks Given: 247
Thanks Received: 124

OK, so I've deleted all the indicators in the custom/indicator folder and have only the ones for the cjbooth system in there.

I get some different errors this time, see attached picture.

Attached Thumbnails
Click image for larger version

Name:	compile errors no. 2.jpg
Views:	209
Size:	167.3 KB
ID:	95424  
Started this thread Reply With Quote
  #9 (permalink)
 dimitri 
Athens - Greece
 
Experience: Intermediate
Platform: Metastock
Posts: 76 since Jul 2010
Thanks Given: 202
Thanks Received: 36


bnichols View Post
Alrighty...I downloaded all 4 indicators in the post and imported (hence compiled them) into NT with no issues (screenshot with all 4 indicators installed below). I'm familiar with all of them and already had a newer version of SuperTrend installed, which was overwritten for the purpose of this experiment.

This is where the fun begins. Since the problem is not with the indicators it is either with your NT installation (which might have become corrupt in one way or another for one reason or another) or with the environment in which NT is running.

I've run into the same error often myself after making changes to NT and IIRC was able to resolve the problem by reversing recent changes (deleting indicators perhaps, in this case) until I got the right one, then retrying to install & looking for clues or patterns in the way it fails, if necessary. It's been a while but sometimes the actual cause of the error is (or may seem) unrelated to the indicators themselves, but to reiterate usually related to any recent change to the system or to NT (including changes made by gremlins it seems to me).

Failing that, you might try what I used to do as a last resort after a suitable amount of hair tearing; namely, blow away the NT installation and reinstall from scratch.

Hopefully someone more knowledgeable (and less jaded) about NT will chime in Good luck!


Dear bnichols, I would like to ask you the favor to address me where to find the indicators you are using in your chart .... with prefix ... TD ... TDMACD , TDStochastics , TDSMA ....
Thank you in advance for your cooperation.

Best Regards
Dimitri

Reply With Quote
  #10 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731



Quoting 
OK, so I've deleted all the indicators in the custom/indicator folder and have only the ones for the cjbooth system in there.

I get some different errors this time, see attached picture.


Since your screen shot does not show the complete error messages and I lack psychic ability, I do not know what those errors are.

You were only supposed to delete DUPLICATE files that did not belong in that folder. If you deleted all of the files in the folder, you will now have a big problem.

If that is the case, probably best for you to reinstall Ninjatrader and not use any custom indicators at all.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on September 15, 2014


© 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