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, 03-31-2026, 09:41 PM
    1 response
    80 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X