How can I force a flat strategy position, or what settings do I need to change to make sure the strategy position persists during disconnects?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Non-flat strategy position after exit on close
Collapse
X
-
Non-flat strategy position after exit on close
I have several strategies (both live and simulated) that run in regular trading hours. Most of my strategies are exiting at close, and they normally do that properly in my IB account. What I noticed however, is that if I get disconnected after the market close e.g. IB shuts down and I reconnect, or I disable the strategy to check/adjust something and then turn it back, I will see a non-flat strategy position associated with my strategy now. It should be flat, as the rule was to exit at the end of trading.
How can I force a flat strategy position, or what settings do I need to change to make sure the strategy position persists during disconnects?Tags: None
-
mic414, this is one of the limitations unfortunately working of the default ExitOnClose orders, as you reload the bars would be processed as historical backtest data and thus the last bar of the day still open, as no open tick for a new bar would be seen yet. In realtime the PC clock would be used as reference to submit those orders in, so there's a difference in handling. You could workaround that be implementing a custom time exit for example on a bar before the session end that would historically then trigger as well as you would expect. This generally is an item we have on the list to further improve for our next major platform update.BertrandNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by helpwanted, Today, 03:06 AM
|
1 response
12 views
0 likes
|
Last Post Today, 03:35 AM | ||
Started by Brevo, Today, 01:45 AM
|
0 responses
9 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by aussugardefender, Today, 01:07 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 01:07 AM | ||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
242 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
9 responses
387 views
1 like
|
Last Post
by Gavini
Today, 12:29 AM
|
Comment