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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        90 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        135 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
        119 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        69 views
        0 likes
        Last Post PaulMohn  
        Working...
        X