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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
42 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
29 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
46 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
38 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment