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

Delay Backtest

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

    Delay Backtest

    Hi support, I am running a backtest for a future on my strategy. I notice a delay in running a backtest between running the sections Initialize and OnStartUp. I am using only one dataserie (the instrument where I run my backtest on , no Add of anothers erie in the code). I included a current timestamp as last line of the Initialize section and a current timestamp as the first line of the OnStartUp section. If I run the backtest on 10 years of 60 minutes the difference between the timestamps is more than a minute. So this means NinjaTrader is doing someting in the background for one minute after ending the initialize section and before starting the Onstartup section. It seems that it has to do with the primary instrument data, because if I run the backtest for only 2 years the difference between the timestamps is only 10 seconds. I aLSO NOTICE THAT IF i RUN A BACKTEST ON A CURRENY INSTRUMENT THE DELAY FOR 10 YEARS BACKTEST IS ONLY 20 SECONDS. Can you explain what NinjaTrader does in the background between those 2 sections and pauzing the backtest for over 1 minute? And is that something tha can be improved so that it runs faster?

    Kind regards,
    Rene Kreileman
    The Netherlands

    #2
    Hello Renejm,

    Thank you for the post.

    What you are seeing is likely the data processing before the test, unfortunately I don't have any specific details on the internal logic which the backtest uses to provide specific details on the steps between initialize and onstartup.

    You could view the control center and its lower status bar to see if that is data processing, the data loading indicator is in the lower portion of the control center.

    The difference in times for instruments could come from futures instruments requiring additional processing, if you are merging the data and back adjusting it (default settings) it will take additional steps to load that data. I don't believe there would be anything additional you could change to make the loading process faster aside from using a faster CPU to do that process quicker.

    I look forward to being of further assistance.



    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,610 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    9 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    19 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    6 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    16 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X