A few of my clients had all the same issue a few days back. The strategy was in a position without a profit target or stop loss, both of which are set inside the OnStateChange method once and not changed at any other point. Further, based on the logs I've received what I see is that everything was working correctly until ExitOnSessionClose was executed which caused the position to be reversed and leaving it without said exits. This never happened before and of course I suspect it has something do to with the strategy, but I'm unable to reproduce this issue. I've attached one of the logs and would be very thankful for the support to take a look. At 21:39 a long entry has occurred and at 22:59 the ExitOnSessionClose was executed. The strategy does not handle session close exits manually, this is always done only by this setting.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Exit On Session Close reversed position
Collapse
X
-
Exit On Session Close reversed position
Hello there,
A few of my clients had all the same issue a few days back. The strategy was in a position without a profit target or stop loss, both of which are set inside the OnStateChange method once and not changed at any other point. Further, based on the logs I've received what I see is that everything was working correctly until ExitOnSessionClose was executed which caused the position to be reversed and leaving it without said exits. This never happened before and of course I suspect it has something do to with the strategy, but I'm unable to reproduce this issue. I've attached one of the logs and would be very thankful for the support to take a look. At 21:39 a long entry has occurred and at 22:59 the ExitOnSessionClose was executed. The strategy does not handle session close exits manually, this is always done only by this setting.Tags: None
-
Hello Human#102,
From the given log information I see that there was an account position update to flat at 22:59 at the same time the stop and target were cancelled. There is also an execution event at that time which lists an order id that is marked as external. For this question I would suggest to contact the brokers order desk to review the order ids in question and see if there was some outside factor which caused the orders to cancel and position to exit. The exit on session close appears to have submitted the close order at the same time which resulted in reversing the position.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
71 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
43 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
25 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
28 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
56 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment