Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Cancelled order due to end of session handling
Collapse
X
-
Cancelled orders despite ExitOnClose==false
This is a pretty old thread, but I've just had the same issue.
ExitOnClose is DEFINITELY false, yet my stoploss and profit target orders are getting cancelled at midnight. (This is the chart's properties' Session Begins and Session End times.)
The position just stays stuck (in this case, Short) until forever.
NT 6.5.1000.13
saltminer
19/06/2009 12:00:00 AM Cancelled order due to end of session handling: BarsInProgress=0: Order='NT-00098/Sim101' Name='Stop loss' State=Working Instrument='6E ##-##' Action=Sell Limit price=0 Stop price=1.3902 Quantity=1 Strategy='AlexGannSwingTrader2' Type=Stop Tif=Day Oco='NT-00064' Filled=0 Fill price=0 Token='0e1cd9a35efb41848b94c0ff103c9600' Gtd='1/12/2099 12:00:00 AM'
19/06/2009 12:00:00 AM Cancelled order due to end of session handling: BarsInProgress=0: Order='NT-00099/Sim101' Name='Profit target' State=Working Instrument='6E ##-##' Action=Sell Limit price=1.3925 Stop price=0 Quantity=1 Strategy='AlexGannSwingTrader2' Type=Limit Tif=Day Oco='NT-00064' Filled=0 Fill price=0 Token='c67f71f56ab841e1bb4881d5b032cb0b' Gtd='1/12/2099 12:00:00 AM'
P.S. A workaround of setting the ProfitTarget and StopLoss once every bar DOESN'T HELP. After the orders have been cancelled, new SetProfitTarget() and SetStopLoss() commands don't attach to the open position. It still stays open forever.
Last edited by saltminer; 12-09-2009, 04:28 PM.
Comment
-
Of course! I hadn't thought past that parameter being relevant for limit orders to enter. So now I'm clear they are relevant for stops and profit targets for current positions too.
Thanks Josh.
Interesting how a stop and a profit target couldn't be re-attached the next day to an open position.
Comment
-
Cancelled order due to end of session handling
I found a bug with that error.
Every settings on default, timeinforce set to day.
When there are two different instument in the strategy and the second instrument has no more tick that day let say at 20:00 then the strategy throws out the main bar stop/target with the
'Cancelled order due to end of session handling' message ,
more of a problem is that cancellation is invisible , I was not able to catch it in the OnOrderUpdate.
Could you look into it?
Thanks
Hatori.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
590 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
342 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
555 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment