Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I check when a backtest has completed?

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

    How can I check when a backtest has completed?

    When a backtest has completed I'd like to write some data to some files. However, I don't know how to check if the backtest has completed or not. Is there a way to do this?

    #2
    Zwentz, unfortunately there isn't a method to check if the backtest has completed.

    You can include code that writes to a file in OnBarUpdate throughout your backtest without a problem. If you know the timestamp (and date) of the last bar you're testing, you can also just try hardcoding that value into your strategy. Maybe something like in OnBarUpdate:
    Code:
    if(ToDay(Time[0]) == DayOfLastBar && ToTime(Time[0]) == TimeOfLastBar)
    {
    //insert code here that you'd like executed at the end of backtest
    }
    AustinNinjaTrader Customer Service

    Comment


      #3
      Am I able to access the "Time Frame" parameters from the backtesting options window? If not, i'll just duplicate them in parameters. Either way I have a solution, just wondering if I can.

      Comment


        #4
        Accessing the "Time Frame" parameters from the backtesting options window isn't supported. Thank you for understanding.
        AustinNinjaTrader Customer Service

        Comment


          #5
          Alrighty well no big deal, I can still get it to work. Thanks for the fast responses Austin. By the way just got a license from y'all.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          24 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          121 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          179 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          92 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          136 views
          0 likes
          Last Post cmoran13  
          Working...
          X