Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancel SetStopLoss

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

    Cancel SetStopLoss

    Greetings,

    Upon entering a position, I'd like to set a stop loss, which, if price subsequently moves in the direction of my position by a certain amount, cancel the stop loss and set other sell conditions, like perhaps a trailing stop. But my main question is how to then cancel the initial stoploss.
    Thanks-
    hbmiles2000

    #2
    hbmiles2000,

    If you are wanting to cancel SetStopLoss after a certain condition and then replace it with a trailing stop, this would not be possible.

    You could use an ATM order method to submit an ATM Strategy which will keep a hard stop loss and use auto trail after X number ticks in profit. More information on ATM Strategy methods found below:



    Otherwise if you're an experience programmer you could use the OnOrderUpdate() method to set protective orders and would allow you to use CancelOrder(). Please see our reference sample on Using OnOrderUpdate() and OnExecution() methods to submit protective orders

    The OnOrderUpdate() and OnExecution() methods are reserved for experienced programmers. Instead of using Set() methods to submit stop-loss and profit target orders, you can submit and update them manually through the use of IOrder and IExecution objects in the OnOrderUpdate() and OnExecution() methods. The OnOrderUpdate()
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    388 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    260 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    218 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    302 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    268 views
    0 likes
    Last Post CarlTrading  
    Working...
    X