Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Backtests continue to run after Strategy Analyzer window is closed.
Collapse
X
-
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).Tags: None
-
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.
-
- 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
- Who is your data provider?
-
Thank you for your reply.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.
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():
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.Code:Print("State: " + State);
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.
Comment
- Who is your data provider?
-
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 argusthome, 03-08-2026, 10:06 AM
|
0 responses
69 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
42 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
24 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
27 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
54 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment