Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Concurrent Stop Orders?

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

    Concurrent Stop Orders?

    I have found a response for NT6, but have found found an answer for NT7:

    How do I have concurrent stop orders without NT ignoring the second order? For example, I have to invoke a long stop order and a short stop order. Eventually only one will be filled:

    if (BooleanFlag)
    {
    EnterLongStop(price + offset);
    EnterShortStop(price - offset);
    }|

    When I run something similar in NT7, the second stop order is ignored. In this case, the strategy only generates long stop orders. How do I do both?

    #2
    Hello Serac,
    Thanks for your post and I am happy to assist you.

    You can place a buystop and a sell stop at the same time using the Unmanaged approach http://www.ninjatrader.com/support/h...d_approach.htm

    You can also mark the orders as oco, so that if one gets filled the other will get cancelled. A basic code would look like

    Code:
    SubmitOrder(0,OrderAction.Buy,OrderType.Stop, 1, 0, Close[0] + 10 * TickSize, "EntryStopOCO", "BuyStopEntry" );
    
    SubmitOrder(0, OrderAction.Sell, OrderType.Stop, 1, 0, Close[0] - 10 * TickSize, "EntryStopOCO", "SellStopEntry");
    But please do ensure your broker too accepts buystop and sell stop order at the same time.

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      I know this is an old thread, but shouldn't the 2nd call to SubmitOrder() be using OrderAction.SellShort?

      Comment


        #4
        Hello,

        That is correct. SellShort would be appropriate for an entry, and Sell would be appropriate for an exit.
        Dave I.NinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sjsj2732, Yesterday, 04:31 AM
        0 responses
        30 views
        0 likes
        Last Post sjsj2732  
        Started by NullPointStrategies, 03-13-2026, 05:17 AM
        0 responses
        286 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        282 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        132 views
        1 like
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        90 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Working...
        X