Hi,
I can't seem to get these events to fire. I'm trying to write to a file but it does not output and the Print()
function does not output anything to the log either. If I place the same code in OnInit() it works fine and I find the file with
the output. I am using a 4 core processor and no local network farm or cloud network testing an EA in OHLC mode. Any ideas what could be
wrong? I have looked through the forum and articles and can't seem to find an answer. Many thanks for your help.
Here is my code:
Do you understand that these events are only generated during an optimization ? And that the are fired to manage Frames ?
Read the documentation please.
Hi,
I can't seem to get these events to fire. I'm trying to write to a file but it does not output and the Print()
function does not output anything to the log either. If I place the same code in OnInit() it works fine and I find the file with
the output. I am using a 4 core processor and no local network farm or cloud network testing an EA in OHLC mode. Any ideas what could be
wrong? I have looked through the forum and articles and can't seem to find an answer. Many thanks for your help.
Here is my code:
Did you check the correct directory for the file? The manual explains that the location where the file will be written depends on whether you are running a test or using in normal trading mode.
The manual page: https://www.mql5.com/en/docs/files/fileopen
contains the sentence : "The file is opened in the folder of the client terminal in the subfolder
MQL5\files (or testing_agent_directory\MQL5\files in case of testing). "

- www.mql5.com
Hi,
Thankyou for your help both of you. I misunderstood how it works and that it's only during Optimization not during a single test. The file I found in
the Tester subfolder not MQL5\Files

- 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,
I can't seem to get these events to fire. I'm trying to write to a file but it does not output and the Print() function does not output anything to the log either. If I place the same code in OnInit() it works fine and I find the file with the output. I am using a 4 core processor and no local network farm or cloud network testing an EA in OHLC mode. Any ideas what could be wrong? I have looked through the forum and articles and can't seem to find an answer. Many thanks for your help.
Here is my code: