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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        77 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        45 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        27 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        63 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X