Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnExecution and Position.xxx problems

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

    OnExecution and Position.xxx problems

    I am using Unmanaged mode in NT7, and detecting fills from within OnExecution().
    When I detect my order is fully filled, I call another method to do various things. From within this method, the following sometimes show inaccurate information.
    Position.Quantity
    Position.AvgPrice

    For example, I the order within OnExecution can show a fill count of 80 (and indeed, that should be the position size) when Position.Quantity shows 5.

    Waiting until the next OnBarUpdate() and then accessing Position properties seems to avoid the problem.

    Is this as it should be, or is it a bug?
    Cheers,
    saltminer

    #2
    saltminer, thanks for reporting in - this is working as expected, only on the next OnBarUpdate() the position object would be guaranteed to be updated.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    617 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    357 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    561 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    566 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X