Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OCO and cancelling order questions

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

    OCO and cancelling order questions

    If I enter a long position with a particular signal name, and then I call both ExitLongStop and ExitLongLimit using the same signal name, if either the limit or the stop is hit, will the other always get automatically cancelled, ie. will this be an OCO order? In running the simulations that seems to be the case but I just want to verify that it the case always.

    Also, in running the simulation, I find that my code might possibly cancel a current EnterLongStop and then switch to EnterShortStop. This seems to work okay, but when I cancel an order and then create a new order, should I use a different signal name, or is using the same signal name of an order I cancelled okay?

    Thanks in advance,

    Ken

    #2
    Originally posted by kjackson View Post
    Will this be an OCO order?
    kjackson, yes it will be.
    Originally posted by kjackson View Post
    Should I use a different signal name, or is using the same signal name of an order I cancelled okay?
    It is possible to use the same signal name but it is recommended to use different names for long and short entries.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Thanks for your answers, Austin.

      Just to expand on my second question, is it recommended that every time an order is cancelled and a new order it placed, that a new signal name should be generated for the new order? For example, if I place an EnterLongStop order, and then cancel it, and then place a new EnterLongStop order, should I use a new signal name again?

      Generating new signal names isn't a problem (I'm assuming that just adding a count to the signal name is fine, ie. Trade1, Trade2, Trade, etc). I'm just trying to understand what the rules are with signal names on orders that have been placed but not filled yet.

      Thanks in advance,

      Ken

      Comment


        #4
        Ken,

        You do not have to generate a new name, but if you want to differentiate the two, you should do so.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          great, thanks Josh!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          656 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          371 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          579 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X