I am getting this one error in a strategy I am working on and can't find anything online to help correct the issue. It is a CS0266 code on line 5. ( using NinjaTrader.NinjaScript.Strategy; // Ensure this is added for Strategy class ) Does anyone have any ideas? This is my first time creating a strategy.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
The type or namespace name 'Strategy' does not exist
Collapse
X
-
The type or namespace name 'Strategy' does not exist
The type or namespace name 'Strategy' does not exist in the namespace 'NinjaTrader.NinjaScript' (are you missing an assembly reference?)
I am getting this one error in a strategy I am working on and can't find anything online to help correct the issue. It is a CS0266 code on line 5. ( using NinjaTrader.NinjaScript.Strategy; // Ensure this is added for Strategy class ) Does anyone have any ideas? This is my first time creating a strategy.Tags: None
-
Hello terryreeves_,
Thank you for your post.
"using NinjaTrader.NinjaScript.Strategy" is not a valid using statement.
Are you using NinjaTrader 7 or NinjaTrader 8? This is posted in the NinjaTrader 7 section of the forums.
If you are using NinjaTrader 8 we would recommend simply using the NinjaScript Wizard to generate the correct and necessary code.
-
-
I think, you're trying to use NinjaTrader.NinjaScript.Strategy, but that namespace doesn’t exist. In NinjaTrader, strategies are defined under NinjaTrader.NinjaScript.Strategies, not Strategy. Remove using NinjaTrader.NinjaScript.Strategy; and ensure your class properly inherits from StrategyBase. Also, check if you have the correct references added in your project. If you're using NinjaTrader 8, you may need to add using NinjaTrader.NinjaScript; instead.Originally posted by terryreeves_ View PostThe type or namespace name 'Strategy' does not exist in the namespace 'NinjaTrader.NinjaScript' (are you missing an assembly reference?)
I am getting this one error in a strategy I am working on and can't find anything online to help correct the shop now issue. It is a CS0266 code on line 5. ( using NinjaTrader.NinjaScript.Strategy; // Ensure this is added for Strategy class ) Does anyone have any ideas? This is my first time creating a planetpokies strategy.
What are the necessary references and inheritance requirements for creating a strategy in NinjaTrader 8?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
547 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
323 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
99 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
543 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
545 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment