Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to update the stopOrder1.StopPrice

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

    How to update the stopOrder1.StopPrice

    I am using the following lines in my strategy to change the stopOrder1.StopPrice. How can I read the changed stopprice once it has been submitted to the exchange.? I am using the OnExecutionUpdate method, but struggle to understand how to "read" the confirmation that the stoporder price has been changed. I obviously need to change the "new" stopprice to prevent the changeorder from being submitted again

    if (stopOrder1 != null && (Close[0] + 2 * StopStepChange) < stopOrder1.StopPrice)
    {
    GetOrderState("At Short Change HTF");
    ChangeOrder(stopOrder1, stopOrder1.Quantity, 0, Close[0] + StopStepChange);

    }

    Thanks for your help

    RH

    #2
    Hello RH,

    The change would be confirmed when the order updates in OnOrderUpdate() with the new stop price.
    https://ninjatrader.com/support/help...rderupdate.htm

    Below is a link to an example script that modifies the price of exit orders.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    52 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    29 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    194 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    355 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    274 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X