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 cre8able, Today, 01:16 PM
          2 responses
          9 views
          0 likes
          Last Post cre8able  
          Started by chbruno, 04-24-2024, 04:10 PM
          3 responses
          48 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by samish18, Today, 01:01 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by WHICKED, Today, 12:56 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by WHICKED, Today, 12:45 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X