Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to update the multiple stop loss orders to single order for the same instrument

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

    How to update the multiple stop loss orders to single order for the same instrument

    I am using CustomAddon..


    When I am placing multiple orders for the same instrument over the period of few seconds to minutes.

    On each order's execution event I am creating/submitting a stop loss order.

    If I place 5 orders, this is resulting in 5 different StopLoss orders.

    When I place new StopLoss order, I want average or update the existing stoploss order and make it a single stoploss order increasing the qty and updating the price.

    In this case , if i submit 5 orders at different times for the same instrument, I want to have single stoploss order with qty 5

    What's the best approach , please advice.

    #2
    Hello Kdevineni,

    You would need to do a Change Order instead of submitting new orders. After submitting the first order each additional time you submit an order you would change the existing targets quantity.

    If you are using the addon framework that is the Change method on the account variable. .There is a sample here, to change the quantity you use the order variables QuantityChanged property: https://ninjatrader.com/support/help...nt8/change.htm

    Comment


      #3
      To efficiently manage stop-loss orders when placing multiple orders for the same instrument, you should implement a mechanism to track and update existing stop-loss orders rather than creating new ones each time. Start by maintaining a record of your stop-loss orders in your CustomAddon system, using a unique identifier for each instrument and tracking the associated stop-loss orders. On receiving a new execution event, check if a stop-loss order already exists for that instrument; if so, update the existing order by increasing its quantity and adjusting the stop-loss price as needed. If no stop-loss order exists, create a new one. This approach ensures you have a single, consolidated stop-loss order with the cumulative quantity and the latest price, optimizing your order management and reducing clutter in your trading system.

      Comment


        #4
        Thank you Jesse and Neil

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        329 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X