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 kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      7 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      59 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      41 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      47 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      38 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X