Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

too many OnOrderUpdate events

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

    too many OnOrderUpdate events


    I'm setting a stop loss thats triggering OnOrderUpdate 3 times.

    Code:
    if (order.Name == stopLossName)
    dbMsg("set stop loss to " + Math.Round(stopPrice, 2).ToString());
    should I filter out the unwanted ones? if so what's the best way?

    #2
    Why don't you print the OrderState as well?

    I bet you each call to OnOrderUpdate will have a different state.

    Comment


      #3
      Hello fingers,

      OnOrderUpdate is called each time an order managed by a strategy changes state.

      The Help Guide page below lists all the states an order can have:


      I agree with bltdavid's suggestion of "filtering the unwanted ones" by using a check for OrderState. It's up to you which order state you want the information from.

      If you have any further questions, please let us know.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      91 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      137 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
      121 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      72 views
      0 likes
      Last Post PaulMohn  
      Working...
      X