Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtests continue to run after Strategy Analyzer window is closed.

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

    Backtests continue to run after Strategy Analyzer window is closed.

    In NT8 (8.1.1.7), when backtesting... if I close the strategy analyzer window my strategy continues to run (I can see it printing to the output window). It would be nice to be able to stop these processes via a button (like the 'Abort' button in optimization mode).

    #2
    Hello ender_wiggum,

    Thank you for your post and welcome to the NinjaTrader forum community!

    So I may assist you more accurately, please answer all of the following questions:
    • Who is your data provider?
    • Are you connected to your data feed provider when running this test?
    • What instrument(s) (and expiry if applicable) have you selected?
    • What Data Series Type have you selected? Example: Tick, Minute, Day
    • What From and To date is selected?
    • If you include the date/time with your prints, do you see prints all the way up until the end date selected?
    • Is your strategy a multi-instrument or multi-time frame strategy?
    • Do you receive an error on the screen? Are there errors on the Log tab of the Control Center? If so, what do these errors report?

    Thanks in advance; I look forward to further investigating this item.​
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      • Who is your data provider?
        • NinjaTrader Simulation
      • Are you connected to your data feed provider when running this test?
        • Yep.
      • What instrument(s) (and expiry if applicable) have you selected?
        • ES DEC23
      • What Data Series Type have you selected? Example: Tick, Minute, Day
        • 5 Minute / 1 Tick
      • What From and To date is selected?
        • 01/01/2023 to 11/13/2023
      • If you include the date/time with your prints, do you see prints all the way up until the end date selected?
        • Yes
      • Is your strategy a multi-instrument or multi-time frame strategy?
        • Multi-time
      • Do you receive an error on the screen? Are there errors on the Log tab of the Control Center? If so, what do these errors report?
        • No errors. The strategy runs to completion exactly as if the window was open.

      Comment


        #4
        Originally posted by ender_wiggum View Post
        • Who is your data provider?
          • NinjaTrader Simulation
        • Are you connected to your data feed provider when running this test?
          • Yep.
        • What instrument(s) (and expiry if applicable) have you selected?
          • ES DEC23
        • What Data Series Type have you selected? Example: Tick, Minute, Day
          • 5 Minute / 1 Tick
        • What From and To date is selected?
          • 01/01/2023 to 11/13/2023
        • If you include the date/time with your prints, do you see prints all the way up until the end date selected?
          • Yes
        • Is your strategy a multi-instrument or multi-time frame strategy?
          • Multi-time
        • Do you receive an error on the screen? Are there errors on the Log tab of the Control Center? If so, what do these errors report?
          • No errors. The strategy runs to completion exactly as if the window was open.
        Thank you for your reply.

        Upon further research and testing, this is expected behavior. You may see the different states that your strategy goes through by adding a print such as the following to the beginning of OnStateChange():
        Code:
        Print("State: " + State);
        When running a backtest, after State.DataLoaded the strategy will hit State.Historical and begin to process historical data. Even after closing the Strategy Analyzer and seeing State.Terminated, State.Historical continues to process. The Abort button available for optimizations does not stop any currently running backtests; it solely prevents new instances from being started and any currently running tests will complete even after clicking the Abort button.

        With that said, we appreciate your feedback suggesting an Abort button. There is an existing feature request to offer an Abort button for standard backtests and I will gladly add your vote. The internal tracking number for this feature request is SFT-1359. Please reference this internal tracking number when contacting Platform Support if you ever have questions regarding this feature request.

        When a feature request is implemented, you'll find a description of the new feature in the release notes:Thank you for using NinjaTrader.​
        Emily C.NinjaTrader Customer Service

        Comment


          #5
          Thanks. I think this is an important feature... in the case where one has a "runaway" strategy (containing, for example, an endless loop), the ability to kill that process/thread would keep everyone from having to restart NinjaTrader to halt the strategy.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by burtoninlondon, Today, 12:38 AM
          0 responses
          2 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          11 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          10 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Yesterday, 07:51 PM
          0 responses
          12 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,982 views
          3 likes
          Last Post jhudas88  
          Working...
          X