But all my strategies that used Position won't compile since upgrading to the latest version. Position is now a function that takes an index? It might just be a namespace collision or something. Please advise.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Did Position in Strategy Change?
Collapse
X
-
Did Position in Strategy Change?
The docs seem to be the same: https://ninjatrader.com/support/help...l?position.htm
But all my strategies that used Position won't compile since upgrading to the latest version. Position is now a function that takes an index? It might just be a namespace collision or something. Please advise.Tags: None
-
Also: it would be nice if the docs would list the namespaces that things belonged to. A stretch goal of that would be the NInjaScript editor offering resolutions to missing types that it knows are provided by NinjaScript. Like IExecution, I still haven't found what namespace that lives in and Visual Studio can't resolve it and it's not in the docs.
-
Hello andrewmac,
Thanks for your post and welcome to the NinjaTrader forums!
When used in a single time frame or single series strategy you should be able to use Position as shown in the helpguide. If you have multiple time frames or series you would need to use Positions[n].
Please post a short example strategy that demonstrates the issue requiring Position to be Positions[n] and the steps to recreate the error.
Comment
-
Thanks for the response.
Hmm I just tried using Position on my computer at work and it works fine. I will check on it again in a few hours when I'm on my home PC. It's looking like it's just a namespace collision and the Position I'm referencing in my Strategy at home is a different one than I'm referencing in my test I just did.
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
87 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
134 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
118 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
67 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

all sorted now, thanks.
Comment