Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

close position when moving stop loss

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

    close position when moving stop loss

    Hi,
    It happens I will manually move my stop loss while in a trade, typically to secure profit. However sometimes I will misclick or price will move too quickly, and the click I've made is not recognized and I get the error e.g., "Stop price can't be moved below the market..."

    IS there a way to change this so that the stop automatically closes the position with a market order similar to the profit target marker?
    Thanks.

    #2
    Hello whoisjukes,

    Thank you for posting.

    Unfortunately if a Buy Stop is moved below the market or if a Sell Stop is moved above the market there is not an option to bypass this rejection from the exchange and have the position close automatically. If you want to close the position at Market and cancel all orders associated with that position you can use the Close button within Chart Trader or the SuperDOM.

    Let me know if I may be of further assistance.
    Christopher J.NinjaTrader Customer Service

    Comment


      #3
      One could probably write an indicator/addon with event handler to close position if sell stop has been rejected.

      Comment


        #4
        I'm quite new to NT. Would appreciate if you could point me to some examples on how to do this. Thank you very much.

        Comment


          #5
          Originally posted by whoisjukes View Post
          I'm quite new to NT. Would appreciate if you could point me to some examples on how to do this. Thank you very much.
          Sorry, I am not a good enough programmer for do or die code . I did do some research and there's an example that is very close to what you'd need:
          https://ninjatrader.com/support/help...onorderupdate_ and_onexec.htm

          // Rejection handling
          if(order.OrderState==OrderState.Rejected)
          {
          // Stop loss order was rejected !!!!
          // Do something about it here
          }​

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          55 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          37 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          17 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          19 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          49 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X