Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnExecutionUpdate(object sender, ExecutionEventArgs e)

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

    OnExecutionUpdate(object sender, ExecutionEventArgs e)

    Hello

    I have a question regarding listening for events from two different accounts and I cannot find the answer in the help neither in the forum.

    I am subscribed to two different accounts, Account1 and Account2 and I listen for say Execution events coming from these, but instead using OnExecutionUpdate(object sender, ExecutionEventArgs e), I am using a different name of the method so for example:
    For Account1 I subscribe OnExecutionUpdateAcc1(object sender, ExecutionEventArgs e)
    and to listening to Account2 I subscribe to OnExecutionUpdateAcc2(object sender, ExecutionEventArgs e)

    So my question is if I can use the above modified method names to subscribe to each account, or the name must be always be kept to OnExecutionUpdate? I assumed being a private method called from a subscription event I could name it whatever I want?

    Thank you


    #2
    Hello juartur,

    You can use any method name you want for an event. The += is a subscription that points to the method that you name.

    If you are doing the same logic for both methods you can also just subscribe both accounts to the same method and filter logic based on : execution.Account.Name

    Comment


      #3
      Hi Jesse,

      Thank a lot for confirming my assumption, that helps me with my debugging.

      One more question if you wouldn´t mind. I suppose one account can issue multiple events while the code is processing the logic, are the incoming events being queued o they trigger the subscribed method as they arrive?

      Comment


        #4
        Hello juartur,

        The account events come in based on the api so each individual account will have specific order of received calls to the event. There are two current connections which do not receive events in a specific order which are IB and Rithmic. Other connections will recieve events as the provider offers them in a specific order.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        43 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        134 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        189 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        99 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        140 views
        0 likes
        Last Post cmoran13  
        Working...
        X