Problems appear to be with OCO oder handling.
Strated happening since Monday. Had already tow occurnace.
How do I prevent this issue from happening.
How do I cancel the pending order this is currently stuck ( Issue 2)
I faced two issues:
1) Yesterday I received an error message "Order Rejected"
6/18/2018 02:15 Default Disabling NinjaScript strategy 'ABCD'
6/18/2018 02:15 Order Order='57464a8c06ed4becb45ee4aec937b87c/401308720' Name='Close position' New state='Rejected' Instrument='EURUSD' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=5,000 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='Order rejected' Native error='Another instruction has already made changes to the trades and orders. '
6/18/2018 02:15 Default Strategy 'ABCD' submitted an order that generated the following error 'Order rejected'. Strategy has sent cancel requests, attempted to close the position and terminated itself.
I saw the strategy was disabled but the position was left open. I was able to close the position from the Control Center.
2) Today I am facing another issue
I was trying to close a position and NT8 reported a timeout error. The position remained open. I was able to close it from the Control Center but the StopLoss Order is still open in Cancel Pending state.
6/19/2018 07:29 Position Instrument='EURUSD' Account='1234' Average price=0 Quantity=0 Market position=Flat Operation=Remove
6/19/2018 07:29 Execution Execution='638832049' Instrument='EURUSD' Account='1234' Exchange=Default Price=1.15642 Quantity=5,000 Market position=Long Operation=Operation_Add Order='638832049' Time='6/19/2018 07:29'
6/19/2018 07:29 Order Order='638832049/1234' Name='Close' New state='Filled' Instrument='EURUSD' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=5,000 Type='Market' Time in force=DAY Oco='' Filled=5000 Fill price=1.15642 Error='No error' Native error=''
6/19/2018 07:29 Order Order='638832049/1234' Name='Close' New state='Working' Instrument='EURUSD' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=5,000 Type='Market' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
6/19/2018 07:29 Order Order='638832049/1234' Name='Close' New state='Accepted' Instrument='EURUSD' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=5,000 Type='Market' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
6/19/2018 07:29 Order Order='638832049/1234' Name='Close' New state='Submitted' Instrument='EURUSD' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=5,000 Type='Market' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
6/19/2018 07:29 Position Close operation failed. Operation timed out. Manually close your position
6/19/2018 07:28 Order Order='638708575/1234' Name='Profit target' New state='Cancelled' Instrument='EURUSD' Action='Buy to cover' Limit price=1.14746 Stop price=0 Quantity=5,000 Type='Limit' Time in force=GTC Oco='638708560' Filled=0 Fill price=0 Error='No error' Native error=''
6/19/2018 07:28 Order Order='638708575/1234' Name='Profit target' New state='Cancel submitted' Instrument='EURUSD' Action='Buy to cover' Limit price=1.14746 Stop price=0 Quantity=5,000 Type='Limit' Time in force=GTC Oco='638708560' Filled=0 Fill price=0 Error='No error' Native error=''
6/19/2018 07:28 Default Disabling NinjaScript strategy 'ABCD'
6/19/2018 07:28 Strategy Disabled strategy='ABCD'
Comment