Thank you for your reply.
Here's what I see in your logs having occurred (Please note I've removed your account number and replaced it with "MYACCOUNT" for privacy reasons):
2020-08-07 00:02:35:284|1|32|Order='403cd64bd94a484381fa34032 c6fd548/' Name='compra' New state='Submitted' Instrument='MNQ 09-20' Action='Buy' Limit price=0 Stop price=0 Quantity=2 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:02:35:494|1|32|Order='1288001671/MYACCOUNT' Name='compra' New state='Accepted' Instrument='MNQ 09-20' Action='Buy' Limit price=0 Stop price=0 Quantity=2 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:02:35:494|1|32|Order='1288001671/MYACCOUNT' Name='compra' New state='Working' Instrument='MNQ 09-20' Action='Buy' Limit price=0 Stop price=0 Quantity=2 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:02:35:568|1|32|Order='1288001671/MYACCOUNT' Name='compra' New state='Filled' Instrument='MNQ 09-20' Action='Buy' Limit price=0 Stop price=0 Quantity=2 Type='Market' Time in force=GTC Oco='' Filled=2 Fill price=11185 Error='No error' Native error=''
2020-08-07 00:02:35:582|1|8|Execution='334226438925' Instrument='MNQ 09-20' Account='' Exchange=Globex Price=11185 Quantity=2 Market position=Long Operation=Operation_Add Order='1288001671' Time='8/7/2020 12:02 AM'
First, your initial order for 2 long gets filled.
2020-08-07 00:02:35:599|1|16|NinjaScript strategy 'ContadorVelas/207918217' submitting order
2020-08-07 00:02:35:599|1|16|NinjaScript strategy 'ContadorVelas/207918217' submitting order
2020-08-07 00:02:35:603|1|32|Order='0c746d0331cb4cc589bd52b20 65280d2/MYACCOUNT' Name='CStop' New state='Submitted' Instrument='MNQ 09-20' Action='Sell' Limit price=0 Stop price=11179.75 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:02:35:605|1|32|Order='ccb46368d2ad48b7b12ea2ea1 68c2767/MYACCOUNT' Name='CTarget' New state='Submitted' Instrument='MNQ 09-20' Action='Sell' Limit price=11195.5 Stop price=0 Quantity=2 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:02:35:664|1|32|Order='1288020395/MYACCOUNT' Name='CStop' New state='Accepted' Instrument='MNQ 09-20' Action='Sell' Limit price=0 Stop price=11179.75 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:02:35:664|1|32|Order='1288020395/MYACCOUNT' Name='CStop' New state='Working' Instrument='MNQ 09-20' Action='Sell' Limit price=0 Stop price=11179.75 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:02:35:672|1|64|Instrument='MNQ 09-20' Account='' Average price=11185 Quantity=2 Market position=Long Operation=Operation_Add
2020-08-07 00:02:35:712|1|32|Order='1288001672/MYACCOUNT' Name='CTarget' New state='Accepted' Instrument='MNQ 09-20' Action='Sell' Limit price=11195.5 Stop price=0 Quantity=2 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:02:35:712|1|32|Order='1288001672/MYACCOUNT' Name='CTarget' New state='Working' Instrument='MNQ 09-20' Action='Sell' Limit price=11195.5 Stop price=0 Quantity=2 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
A Stop loss and profit target get submitted and are in a working state.
2020-08-07 00:02:47:682|1|16|NinjaScript strategy 'ContadorVelas/207918217' submitting order
2020-08-07 00:02:47:687|1|32|Order='c1d7f6f463aa49e288ea1e410 ec83657/MYACCOUNT' Name='BreakCompra' New state='Submitted' Instrument='MNQ 09-20' Action='Sell' Limit price=0 Stop price=11185 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:02:47:748|1|32|Order='1287987378/MYACCOUNT' Name='BreakCompra' New state='Accepted' Instrument='MNQ 09-20' Action='Sell' Limit price=0 Stop price=11185 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:02:47:748|1|32|Order='1287987378/MYACCOUNT' Name='BreakCompra' New state='Working' Instrument='MNQ 09-20' Action='Sell' Limit price=0 Stop price=11185 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
A second entry order, this time a sell order is placed for 2 at 11185, however:
2020-08-07 00:13:18:568|1|32|Order='1288001672/MYACCOUNT' Name='CTarget' New state='Filled' Instrument='MNQ 09-20' Action='Sell' Limit price=11195.5 Stop price=0 Quantity=2 Type='Limit' Time in force=GTC Oco='' Filled=2 Fill price=11195.5 Error='No error' Native error=''
The first target fills at 11195.50 and the BreakCompra order as well as the remaining stop loss get cancelled.
2020-08-07 00:13:18:568|1|8|Execution='334227995149' Instrument='MNQ 09-20' Account='MYACCOUNT' Exchange=Globex Price=11195.5 Quantity=2 Market position=Short Operation=Operation_Add Order='1288001672' Time='8/7/2020 12:13 AM'
2020-08-07 00:13:18:585|1|32|Order='1287987378/MYACCOUNT' Name='BreakCompra' New state='Cancel submitted' Instrument='MNQ 09-20' Action='Sell' Limit price=0 Stop price=11185 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:13:18:587|1|32|Order='1288020395/MYACCOUNT' Name='CStop' New state='Cancel submitted' Instrument='MNQ 09-20' Action='Sell' Limit price=0 Stop price=11179.75 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:13:18:642|1|64|Instrument='MNQ 09-20' Account='' Average price=0 Quantity=0 Market position=Short Operation=Remove
2020-08-07 00:13:18:649|1|32|Order='1287987378/MYACCOUNT' Name='BreakCompra' New state='Cancelled' Instrument='MNQ 09-20' Action='Sell' Limit price=0 Stop price=11185 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2020-08-07 00:13:18:650|1|32|Order='1288020395/MYACCOUNT' Name='CStop' New state='Cancelled' Instrument='MNQ 09-20' Action='Sell' Limit price=0 Stop price=11179.75 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
I'd like to take a look at your strategy as generally speaking, I would expect the second entry to have been ignored under the usual order handling rules, specifically this one:
A position is open and an order submitted by a set method (SetStopLoss() for example) is active and the order is used to open a position in the opposite direction
If you can supply a reduced version of the strategy that can replicate this that would be helpful. You can either attach it to your reply here or send it to us directly if you're not comfortable with posting that publicly at platformsupport [at] ninjatrader [dot] com. If you go the email route, please put 2581597 ATTN Kate W. in the subject line and a link to this post in the body of the email.
Thanks in advance; I look forward to assisting you further.
Comment