Prints() does not work during optimisation. Output your data to a file instead.
Please note however that Print() in the OnTester() does output to the "Experts" log, in the "Toolbox" section.
Forum on trading, automated trading systems and testing trading strategies
OnTester, OnTesterPass, OnTesterDeinit events seem not firing
Fernando Carreiro, 2021.07.08 10:11
Ok, so the Print() only outputs to the "Experts" log if it is in the OnTester???() event handlers but not if it is in the OnTick() or OnInit() handler. Strange behavior!
Thank you for explaining it!
Your statements a little confusing!
If you are talking about the Visual Tests (single pass) then all Prints will work correctly anyway.
Or are are you referring to something else during optimisations?
Yes. i forgot it was about optimization. Excuse moi.
To make a small contribution after my derail;
OnTesterPass also does output to the "Experts" log, in the "Toolbox" section
edit, All Ontester* do.
Actually I had already stated that ... " the OnTester???() event handlers ".
But it was still good that you pointed it out just in case it was not clear in my post. 👍

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, is there a way to write log files during optimization?
I would like to print stuff while multiple optimization agents are running.
Is there a way to see results of
Print("...")
commands somewhere?
Thank you very much