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 NullPointStrategies, Today, 05:17 AM
    0 responses
    38 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    64 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X