Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnAccountItemUpdate does not fire with Strategy Backtest

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

    OnAccountItemUpdate does not fire with Strategy Backtest

    Hello Support

    I've uploaded an exported strategy modeled after SampleMACrossOver.

    I'm trying to get Account info while the strategy is running. But the event never fires.

    Can you please have a look and tell me why the event never fires.

    Thank you
    Attached Files

    #2
    Hello rayko,

    Thanks for opening the thread.

    The method will not fire in the Strategy Analyzer because AccountItem's are only modified by real time data and are not modified by historical data which the Strategy Analyzer uses.

    While it is mentioned in the documentation that the method will be called continuously during realtime, this is not explicitly stated that it will not fire for historical trades. I will request that the help guide gets amended to mention this.

    Any AccountItem management in backtesting would have to be managed through your own variables.

    OnAccountItemUpdate() documentation - https://ninjatrader.com/support/help...itemupdate.htm

    If you have any additional questions, please don't hesitate to ask.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Working...
    X