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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        153 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        133 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        128 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X