Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged Strat running on two separate instruments

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

    Unmanaged Strat running on two separate instruments

    Hello,

    We're testing a new "Unmanaged=true" strat. The strat runs with Stops/Targets as expected when any instrument (like 6E or CL) is selected. However, if the strat is placed on the two separate instruments (in separate charts of course) at the same time, there are occasions when after the initial entry orders are placed with stops/targets, when one of the instruments moves to the breakeven section of the code, orders in the other instrument are being cancelled leaving an open position.

    Is this expected behavior in your experience? How can I prevent this?

    Thanks,
    Kirk

    #2
    Kirk, are you saying orders are being canceled by the wrong strategy? If so, can you please provide the code for both strategies and the steps necessary to reproduce this issue?
    AustinNinjaTrader Customer Service

    Comment


      #3
      Is one strategy 'long only' and the other 'short only'

      Comment


        #4
        Austin,
        This is a long and short strategy. Only one strategy applied to two separate instruments at the same time. The entry and exit names are unique but do not have the instrument name associated with them. In other words, a "LongStop_1a" for 6E would also be the same name for CL.
        Is there a requirement for making the instrument name a part of the string?

        I could create a condition similar to (using the correct syntax of course)
        Code:
        if (instrument name = "6e") Submit Order(..."LongStop_6E_1a");
        if (instrument name = "CL") SubmitOrder(..."LongStop_CL_1a");
        But the question remains if this is required or are there other considerations to the Unique Name situations when running different instruments at the same time.
        Kirk

        Comment


          #5
          Hello Kirk,

          The field you should look into is the OCO id, not the signal name. This value should be unique per strategy instance. If the strategy is only run on two instruments then adding instrument name should be enough.

          Code:
           
          if (conditionsForStopandTarget)
          SubmitOrder(0, OrderAction.Sell, OrderType.Stop, 1, Low[0] - TickSize * 5, 0, [COLOR=red]Instrument.MasterInstrument.Name + " stopLoss",[/COLOR]"stopLoss");
          Ryan M.NinjaTrader Customer Service

          Comment


            #6
            Thanks Ryan

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            631 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            566 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X