Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ok to call SetStopLoss multiple times

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

    Ok to call SetStopLoss multiple times

    Is it ok for a strat to call SetStopLoss multiple times with different values from a single OnBarUpdate call? Will this generate multiple order modifies or is Ninja smart enough to collapse those into a single modify if the price has changed on the last call?

    #2
    Hello aslane,

    NinjaTrader will use signal names to update Set methods which can be called multiple times.

    However, if the position is open this would result in rapid change requests which may cause issues with the brokerage.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Ok, that is kind of what I expected, so I should be sure to calc the final value and set just once.

      However, that brings up another question. How often is too often for doing an order modify? For example, as an instrument moves quickly, can a strat update a trailing stop many times per sec, or should it be limited to some number of updates per sec? Similar for entries or targets.

      Certainly, using OnOrderUpdate to limit updates while an order modification is pending makes sense, but is there a recommended best practice?

      This is for managed orders.
      Last edited by aslane; 09-23-2019, 04:53 AM.

      Comment


        #4
        Hello aslane,

        That depends on the brokerage.

        The Sim101 shouldn't have a problem unless there are so many so rapid the CPU is maxed out.

        A brokerage account may have a limit. Contact your broker to find out the limit of order messages per second for your brokerage.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        56 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        132 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        73 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X