StopMarket Order Rejection !
22.06.2020 15.06

Algorithmic Trading with NinjaTrader

NinjaCoding friend

Hi,

I am trying to place two orders (StopLong and StopShort) but surprisingly the Platform is rejecting the second order (ie. If I place LongStopMarket and ShortStopMarket order it rejects the Short order and if I place in reverse order then it is rejecting the Long order ).

This is how I am placing the two orders.

#################################



_enterLongOrder = EnterLongStopMarket( InitialLotSize, Open[0] + 100 *A * TickSize , "Open Long");
_enterShortOrder = EnterShortStopMarket( InitialLotSize, Open[0] + 100 *C * TickSize , "Open Short");
################################

PS: Usually the Stop point is very father away from the current price so this isn't a issue of placing stop below the current Ask/Bid price.

Need Help !

  • NinjaCoding friend
    22.06.2020 15:21

    Here is the Order output :


    01/06/2020 09:32:53 Strategy 'Same order/201627812': Entered internal SubmitOrderManaged() method at 01/06/2020 09:32:53: BarsInProgress=0 Action=Buy OrderType=StopMarket Quantity=4 LimitPrice=0 StopPrice=0.6729'2 SignalName='Open Long' FromEntrySignal=''
    01/06/2020 09:32:53 Strategy 'Same order/201627812': Entered internal SubmitOrderManaged() method at 01/06/2020 09:32:53: BarsInProgress=0 Action=SellShort OrderType=StopMarket Quantity=4 LimitPrice=0 StopPrice=0.6709'2 SignalName='Open Short' FromEntrySignal=''
    01/06/2020 09:32:53 Strategy 'Same order/201627812': Ignored SubmitOrderManaged() method at 01/06/2020 09:32:53: BarsInProgress=0 Action=SellShort OrderType=StopMarket Quantity=4 LimitPrice=0 StopPrice=0.6709'2 SignalName='Open Short' FromEntrySignal='' Reason='An Enter() method to submit an entry order has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation.'
  • Yuri Zolotarev
    22.06.2020 19:36

    Hello,

    I suggest you have a read in the manual Internal Order Handling Rules. They make it quite clear. To make it quick for you, you are using managed approach and you cannot enter market using 2 stop orders in the managed approach, you can only do this using unmanaged approach.

    This course uses unmanaged approach:

    https://ninjacoding.net/ninjatrader/courses/tsarch