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 NullPointStrategies, Today, 05:17 AM
          0 responses
          50 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          126 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          69 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X