
Documentation on MQL5: File Functions
- www.mql5.com
This is a group of functions for working with files. For security reasons, work with files is strictly controlled in the MQL5 language. Files with...
Thank you!

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
Hello MT5 Community,
I am developing an Expert Advisor (EA) for MT5 that reads trade alerts from a file and executes trades based on those alerts. The EA is supposed to check for a trigger file, and if the trigger file indicates a new alert, it reads the alert file and processes the trade. However, I am encountering some issues that I hope some experienced developers can help me resolve.
Here are the specifics of the EA:
Issues:
File Access Error: I consistently get an error message indicating the EA cannot open the alert file for reading. The error code is 5002, which suggests a file access issue. The EA's logs show the following message:
I've given MT5 permission and access to the file and the file is not read-only.
Frequent File Access: The EA seems to be checking the files every second instead of only when an HTTP request indicates a new alert. I set the timer to trigger every 60 seconds, but it doesn't seem to help. Here is the current MQ5 source code:#include <Trade\Trade.mqh>
Request for Assistance:
Thank you in advance for your help!
Best regards,
DF (OptimalVentures)