Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Stop Market Orders (Long/Short error)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Multiple Stop Market Orders (Long/Short error)

    Hi NT Community,
    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 !
    Last edited by dastaan; 06-21-2020, 11:31 PM.

    #2
    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.'

    Comment


      #3
      Hello dastaan,

      Thank you for your posts.

      When using the Managed approach with a strategy, methods that generate orders to enter a position will be ignored if:

      •A position is open and an order submitted by a non market order exit method (ExitLongLimit() for example) is active and the order is used to open a position in the opposite direction

      •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

      •A position is open and two or more Entry methods to reverse the position are entered together. In this case the second Entry order will be ignored.

      •The strategy position is flat and an order submitted by an enter method (EnterLongStopMarket for example) is active and the order is used to open a position in the opposite direction

      •The entry signal name is not unique

      It appears you're running into #4 - The strategy position is flat and an order submitted by an enter method is active and the second order would be used to open the position in an opposite direction.

      You could certainly look at using the unmanaged approach instead. With the unmanaged approach the handling rules above don't apply, and it would allow both those orders to be submitted simultaneously. However, the unmanaged approach would only be recommended for very advanced programmers, as you would need to create your own handling for overfills, rejections, and connection loss handling. You can find out more about the unmanaged approach in our help guide here:



      Please let us know if we may be of further assistance to you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X