This is very messy and if at the time you can see that the strat position is near to exiting you would not want to enter. Are there any plans to clear up this problem programatically? A method would be nice, could be called EnterHistoricalPositions(false) or true of course.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Position vs. Account Position
Collapse
X
-
Strategy Position vs. Account Position
Reference the post of the same title in the 'Tips' section, where a mismatch occurs because the Strategy is started part way through a session. The solution to the problem is given as - manually enter an account position to make it match the strat position.
This is very messy and if at the time you can see that the strat position is near to exiting you would not want to enter. Are there any plans to clear up this problem programatically? A method would be nice, could be called EnterHistoricalPositions(false) or true of course.Tags: None
-
Note Dave. This is not to say just not place historical trades. This really influences when your strategy starts processing.
If your strategy would be in a certain state if it did calculate historical data points, this same state would not necessarily be achieved as you neglect historical data and just start from a blank state with if (Historical) return;.Josh P.NinjaTrader Customer Service
Comment
-
Dave,
There can be cases where it does matter. It is a chicken-egg situation. Many strategies prevent entering additional trades if they already held a position. If you prevent all historical processing you will not hold a position and when the next condition comes you would place in a trade which may have otherwise been ignored by the original strategy.Josh P.NinjaTrader Customer Service
Comment
-
Yes, I think I see what you mean. My code has prevented any historical entries but would have held a position otherwise, (strategy position only, not account). So when real time data arrives and yields a signal, an entry occurs which would have been prevented by the strat position, had there been one. It is a bit difficult to talk about, isn't it.
I will take care to avoid that situation.
Thanks fo your help Josh.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
331 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
549 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
549 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment