Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnPositionUpdate Questions

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

    OnPositionUpdate Questions

    When I use OnPositionUpdate I notice this method is driven twice for each event when using "live data". Historical data it is only driven once. The properties of the two events are identical so it would seem that the second one is a duplicate. I am running a 1-min ES using Zen-Fire and the strategy is SampleOnOrderUpdate where I added a PRINT statement to the OnPositionUpdate method to print all the properties.

    Also, why isn't the "time" of the position change included as a property in OnPositionUpdate just like OnOrderUpdate and OnExecution?

    And last, is there any practical reason to use OnPositionUpdate since OnExecution always precedes it? Or is it possible to access Position.MarketPosition from OnExecution and not be returned the correct Market Position?

    #2
    Thanks for reporting this, I suspect it should not fire twice for each position change.

    - There is no time property since in the NT core it is not relevant however, you could use DateTime.Now when the event is fired to store the time of change.

    - Accessing the position property should be accurate if you call it from within OnExecution() as we internally ensure everything is in sync --> Expected behaviour. If this is not what you experience, let us know.
    - Working on either method is user choice.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X