Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by helpwanted, Today, 03:06 AM
    0 responses
    2 views
    0 likes
    Last Post helpwanted  
    Started by Brevo, Today, 01:45 AM
    0 responses
    6 views
    0 likes
    Last Post Brevo
    by Brevo
     
    Started by aussugardefender, Today, 01:07 AM
    0 responses
    5 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    242 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    384 views
    1 like
    Last Post Gavini
    by Gavini
     
    Working...
    X