Discussion of article "Using text files for storing input parameters of Expert Advisors, indicators and scripts"
This is Interesting !
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
New article Using text files for storing input parameters of Expert Advisors, indicators and scripts has been published:
The article describes the application of text files for storing dynamic objects, arrays and other variables used as properties of Expert Advisors, indicators and scripts. The files serve as a convenient addition to the functionality of standard tools offered by MQL languages.
Let's examine the code fragments taken from the fully operational indicator. The indicator needs data on several currency pairs for proper operation. So, it requests data by timer and then processes it according to its logic (the indicator logic is of no importance for us here). Please remember that brokers sometimes add various suffixes and prefixes to symbol names (for example, EURUSD may be turned into #.EURUSD.ch). This should be taken into account, so that the EA is able to refer to other symbols correctly. The sequence of our actions is as follows.
1. Create a text file broker.cfg with the following content:
[PREFIX_SUFFIX],#.,.ch
2. Create a text file <indicator_name>.cfg with the following content:Author: Andrei Novichkov