Of course it does, what makes you think otherwise?
lippmaje:
Of course it does, what makes you think otherwise?
Of course it does, what makes you think otherwise?
my filehandle isn't closed, but I close it in the deinit.
I must have made an error somewhere
will investigate
thanks
Jeff
You are right, it's not called when the test gets aborted by the user. No idea about a workaround, though, the stop flag won't work in this case.
Jean Francois Le Bas:
if so, how to properly close the handle of the txt file in case of emergency backtest stop ?
The testing process is terminated forcefully (like with taskkill on Windows resp kill on Unix). There's no handler you could get to run upon this event. However, all open file handles will be closed by the system.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
ok so I'm explorating and migrating to MT5 because it is so much superiror but I got issues obviously.
one of them being I write some stuff in a text file in my EA, the problem is that if I stop backtesting early, it somewhat doesn't close the handle of the text file, even if I call it in the DeInit() function
so apparently when I stop the backtest of a robot in the strategy Tester, it doesn't run the DeInit() function ?
if so, how to properly close the handle of the txt file in case of emergency backtest stop ?
or is it just not possible?
thanks so much
Jeff