Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Error: PlaceOrder: entry execution for existing position missing
Collapse
X
-
Error: PlaceOrder: entry execution for existing position missing
I have a strategy that was working fine in live data but fails in Playback data. It is a strategy that only swaps from long to short and always has a stop loss, so it is always in a position. Also, for the reverse position code I make sure that the Exit*() finishes by testing in OnOrderUpdate that the contract count for the order and for the stop loss has gone to zero, only then do I submit another SetStopLoss() and Enter*() in the opposite direction. So it should be back to a flat position when I enter again. What does this error message mean? Thanks for any help. See image:
Tags: None
-
To fix this I simplified things a bit and made the SetStopLoss() call once in OnStateChange(), changing it from using a calculated Price to simply a Ticks offset. That still didn't fix it. But moving the Enter*() call from OnOrderUpdate to OnBarUpdate right after the call to Exit*() seems to have done the trick. I'll try it out again on live data when the futures open up again. It seems to be working now with Playback data.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
62 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
134 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment