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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    132 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X