I'm trying to make a new EA with recursive function and every time I back tested it, its always " Meta Trader has stopped working ".
I don't know in which part is the problem.
I put some of print statements for debugging but I couldn't see it because it crashed.
I also couldn't find some output in the tester directory, usually all of the print() output would go there if Meta Trader didn't crash.
Also, is this cause by infinite loop or run out of memory or can be other reasons ?
Instead of the Print statement, You may send the log to a custom text file and flush it after every write. This is the way I create trace logs to isolate a problem.
Or you may use and catch the standard Windows debug output https://forum.mql4.com/61971
Why don't you write it in the Comment(..).
If you EA stops working without disappearing from your screen you can see what the EA has done last.
Beside that I guess you have an endless loop by e.g. not changing the checked(?) variable..
To add comments, please log in or register