I use functions:
EnterLongStopMarket(0,true,pmLot,Highs[0][0] + 2 * TickSize,"Long"); EnterShortStopMarket(0,true,pmLot,Lows[0][0] - 2 * TickSize,"Short");
6/23/2020 1:30:00 AM Strategy 'XXX/183993646': Entered internal SubmitOrderManaged() method at 6/23/2020 1:30:00 AM: BarsInProgress=0 Action=SellShort OrderType=StopMarket Quantity=1 LimitPrice=0 StopPrice=10110.00 SignalName='Short' FromEntrySignal='' name='XXX' id=183993646 Logger: NQ 09-20 6/23/2020 1:30:00 AM OnOrderUpdate1:Order (orderId='NT-00233-4559' account='Sim101' name='Short' orderState=Submitted instrument='NQ 09-20' orderAction=SellShort orderType='Stop Market' limitPrice=0 stopPrice=10110 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2020-06-23 01:30:00' gtd='2099-12-01' statementDate='2020-06-23') update: Submitted name='XXX' id=183993646 Logger: NQ 09-20 6/23/2020 1:30:00 AM OnOrderUpdate1:Order (orderId='NT-00233-4559' account='Sim101' name='Short' orderState=Accepted instrument='NQ 09-20' orderAction=SellShort orderType='Stop Market' limitPrice=0 stopPrice=10110 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2020-06-23 01:30:00' gtd='2099-12-01' statementDate='2020-06-23') update: Accepted name='XXX' id=183993646 Logger: NQ 09-20 6/23/2020 1:30:00 AM OnOrderUpdate1:Order (orderId='NT-00233-4559' account='Sim101' name='Short' orderState=Working instrument='NQ 09-20' orderAction=SellShort orderType='Stop Market' limitPrice=0 stopPrice=10110 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2020-06-23 01:30:00' gtd='2099-12-01' statementDate='2020-06-23') update: Working NinjaScript strategy 'XXX/183993646' submitting order name='XXX' id=183993646 Logger: NQ 09-20 6/23/2020 1:30:00 AM OnOrderUpdate1:Order (orderId='6204f69369794841ad37f830b12b897d' account='Sim101' name='Short' orderState=Submitted instrument='NQ 09-20' orderAction=SellShort orderType='Stop Market' limitPrice=0 stopPrice=10110 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=18047 time='2020-06-23 01:30:00' gtd='2099-12-01' statementDate='2020-06-23') update: Submitted name='XXX' id=183993646 Logger: NQ 09-20 6/23/2020 1:30:00 AM OnOrderUpdate1:Order (orderId='6204f69369794841ad37f830b12b897d' account='Sim101' name='Short' orderState=Accepted instrument='NQ 09-20' orderAction=SellShort orderType='Stop Market' limitPrice=0 stopPrice=10110 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=18047 time='2020-06-23 01:30:00' gtd='2099-12-01' statementDate='2020-06-23') update: Accepted
Every time when I see the line "NinjaScript strategy 'XXX / 183993646' submitting order" - I see that the order is duplicated.
Questions:
1. Why was the order duplicated by creating two different instances of the Order class?
2. What exactly does the string "NinjaScript strategy 'XXX / 183993646' submitting order" mean? It occurs only a few times, while the string "... Entered internal SubmitOrderManaged () ..." occurs more than 500 times.
Comment