That is not a question. That is just saying what you want. What is your question?
That is not a question. That is just saying what you want. What is your question?
What I want is the way or function to have control of all charts (variable's values) by one unique file in common directory.
When I change values in that file , All charts of the EA attached change the values.
When I change values in that file , All charts of the EA attached change the values.
You have already explained it in your description. Write a file to the COMMON folder and have the EAs read the file every 5 minutes.
Use either OnTimer() with a 5min interval, or simply detect a new 5 Min interval in the OnTick() event handler and then use FileOpen() with the "FILE_COMMON" flag to open the file and read and process it.
Instead of files, I personally prefer using Global Terminal Variables as I can update their values from within MetaTrader itself without needing any extra software and the EAs can easily check for the update times of those Global Terminal Variables and then read the contents and update the internal workings.
- www.mql5.com
You have already explained it in your description. Write a file to the COMMON folder and have the EAs read the file every 5 minutes.
Use either OnTimer() with a 5min interval, or simply detect a new 5 Min interval in the OnTick() event handler and then use FileOpen() with the "FILE_COMMON" flag to open the file and read and process it.
Instead of files, I personally prefer using Global Terminal Variables as I can update their values from within MetaTrader itself without needing any extra software and the EAs can easily check for the update times of those Global Terminal Variables and then read the contents and update the internal workings.
Global Terminal Variables is great idea and what I want. Please right a simple example a code or how to use and change them.
Thank you very much Fernando.
Global Terminal Variables is great idea and what I want. Please right a simple example a code or how to use and change them.
Thank you very much Fernando.
just look in the documentation
- www.mql5.com
Thanks. It is very useful too.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everybody.
I have a question.
I have an EA and the EA has attached to 20 charts(for example).
I want to use external file(includes values of variables) copied in COMMON folder that the EA check it every 5 minute(for example and this is possible by timer functions), and change values of variables for all 20 charts.
There are some ways:
1 - #include used just once ,while compiling EA, and could not be changed.
2 - fopen function should processed to find variables and maybe miscommunication while opening by all charts at the same time.
Thanks