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 kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    24 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    14 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    135 views
    0 likes
    Last Post SalmaTrader  
    Working...
    X