Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Memeber function call synchronization issues

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

    Memeber function call synchronization issues

    Hello

    I use Unmanaged = true option.


    I noticed that during back testing OnBarUpdate is executed before the previous call OnExecution (or OnOrderUpdate) is processed. In other words, Position.MarketPosition and Position.Quantity did not get updated from the execution from the previous bar.

    Is there a way to synchronize it automatically, and if not where should I insert a flag to prevent this?

    Best regards,
    Sergey.

    #2
    Hi Sergey, if you used Unmanaged or Managed mode would be no deciding factor here, but thanks for mentioning.

    The position update would only be guaranteed in the next OnBarUpdate() as then OnPositionUpdate() internally had been called. You would generally see this sequence - OnOrderUpdate->OnExecution->OnPosition

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    647 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X