Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to Prevent Double Exit

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

    How to Prevent Double Exit

    Hi,
    I'm setting up a strategy with multiple exit conditions. On certain occasions it will give two exit signals and essentially take an extra opposite position.

    For example. I go Long at $10.00. I have exit signals that kick in and I ExitLong1 at $9.00. I have an instant other signal ExitLong2 at $9.00.

    I've tried to change the "IF" statements to "Else IF" and it still doesn't work.

    I also have the option "Wait Until Flat" set to yes.

    HELP!

    #2
    Hi krakken,

    Thanks for the post. NT's internal order management should not process further exit signals if there is not a position open. Even if you have multiple exits in the same code block, only one will be processed and the other is ignored with message "There already is a matching order with same prices and quantity'" or "This was an exit order but no position exists to exit".

    Using TraceOrders output will allow you to monitor these messages.

    What you describe sounds like it could be an overfill, where an order is filled after it is marked for cancellation. Do you receive overfill notification for these?
    Last edited by NinjaTrader_RyanM1; 08-29-2011, 02:44 PM.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan,
      No overfill errors. Its actually taking a position. So in the scenario I described above, the 2nd Exit Long, turns into a Short position.

      I'm testing this on market replay and am VERY concerned if something like this happened in Live.

      Comment


        #4
        This is generally not expected. If you can share some code and steps to see what you're seeing we can look into what may be happening here.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Nevermind...I fixed this by using the || (Or) clause instead of else if. Just a note for others who may encounter this.
          THanks.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          571 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          330 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          548 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          549 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X