Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Keep needing to exit ...

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

    Keep needing to exit ...

    Hello,

    I have set profit target and stop loss. I enter using EnterLongLimit and ShortLimit.

    Due to calculations, I need to exit before PT or SL is hit.

    Do I use ExitLong / ExitShort? But I was advised not to mix them with profit target and stop loss.

    How should I be doing this?

    Many Thanks, Caesar.

    #2
    Hello Caesar,

    It is not advised to mix Set methods with order methods like ExitLong() orders.

    If you are using ExitLongStopMarket() as the stop loss, call CancelOrder() with the order object assigned from OnOrderUpdate(), detect the order is cancelled in OnOrderUpdate(), and then send the exit market order. This will ensure that both orders are not able to fill causing an unwanted position.
    https://ninjatrader.com/support/help...ancelorder.htm
    https://ninjatrader.com/support/help...rderupdate.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,

      So, detect the target order (add a "myLimitOrder" string to the target order has been filled in OnOrderUpdate, and then CancelOrder(myStopMar****rder)?

      But you advise against mixing Set PT/SL with Exit orders.

      So, what is the proper way to do what I want?

      Many Thanks, Caesar.

      Comment


        #4
        Hello Caesar,

        Right, SetStopLoss() would not be used. ExitLongStopMarket() would be used instead for the stop loss. So this way the set methods are not used and are not mixed with exit methods.

        Yes, you can give your exit orders names and detect this in OnOrderUpdate().

        ExitLongLimit(100.00, "myLimitOrder", "myEntry");

        In OnOrderUpdate():
        if (order.Name == "myLimitOrder")
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Ah clarity, finally, Huge Thanks Chelsea!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          62 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          134 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          75 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          50 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X