Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Compile error message with namespace
Collapse
X
-
Compile error message with namespace
I'm getting the following error message: "The namespace 'NinjaTrader.Strategy' already contains a definition for 'xyz' " ,where xyz is the name of the strategy that I'm trying to compile. Any ideas on how to get rid of this compile error? I haven't changed the namespace line of the strategy.Tags: None
-
I got it! I had renamed the xyz stategy and recreated another one. The original still had the xyz strategy name in the code. Thanks so much for the reply back and getting me to look at the right thing!
Comment
-
This is an older thread but it has the same problem as I am facing so I thought I should add to it.
I am having the same problem as tradervick, getting the same message when trying to compile a strategy. I have created a new strategy with a new name but I am still getting the message. I have run search for the name in the new strategy document and it is not to be found. Like tradervick, I have not changed the namespace line of the strategy.
The only thing I can think of to try is to empty the directory of all other strategies except the new one but I am reluctant to do that as I am running one of those other strategies on demo forward test.
Any help would be appreciated.
Thanks
Karl
Comment
-
Karl, how did you create the new strategy? Was it a 'save as' of the old one or did you create completely new from the wizard? If you double click on the error > to which offending script would it take you then?
Are you working perhaps with a public enum in the strategies that would now collide with a previously created one using the same name?
Comment
-
Bertrand, thanks for your reply. I did as I suggested in my post - I reluctantly deleted all strategies except the new one and the new one compiled without error. It means that there is an error in one of the other ones. I have copied and changed existing strategies to create new ones and I guess I will have to go back and look at each one - as soon as I have time. I will import each in turn and see which is the offender. Your suggestion to double click the error to see the offender is great, thanks - I shall do that. In the meantime, my new strategy is running and I have now found a new way to lose money!! Where is that Holy Grail - I'm sure I put it down somewhere but I cannot find it?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
659 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
374 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
579 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment