-
Many thanks to the author for the article.
-
Why does the choice of an instrument in the tester, with unchanged Expert Advisor parameters and other testing conditions, affect the testing results?
EURUSD
GBPUSD
USDJPY
3.Do the results of the Expert Advisor's work depend on the choice of chart and period of the Expert Advisor's attachment chart, under other unchanged conditions?
4. Why in
dtema2 = NormalizeDouble(TEMA[2] - TEMA[3], _Digits + 4); dtema1 = NormalizeDouble(TEMA[1] - TEMA[2], _Digits + 4);
instead of
_Digits
not used
SymbolInfoInteger(Symbol_, SYMBOL_DIGITS)
and why is the _Digits value increased by +4?
-
Why does the choice of a tool in the tester, with unchanged EA parameters and other testing conditions, affect the testing results?
I can only assume that it is related to the tick generation algorithm. read this https://www.mql5.com/ru/forum/1031.
I made a conclusion there that you can trust only the mode of testing by opening prices, try it, maybe then the results will coincide.

- www.mql5.com
2. It's hard to say! I'm very curious myself!
3. Well, they will depend on the period of the chart for obvious reasons! But there should be no serious differences depending on the chip the Expert Advisor is sitting on. In real life, ticks on all chips hook the OnTick() function differently, but still on large timeframes the difference should be pennies.
4. Thanks for the detected gaffe, we'll fix it! The accuracy has been increased by four digits to eliminate situations when dtema1 and dtema2 values may be equal to zero. It's a matter of taste, who likes what.

- www.mql5.com
5.Is it permissible to use
ENUM_TIMEFRAMES timeframe=0в
if (IsNewBar(Number, Symbol_, 0) || Recount[Number])in testing?
Is it permissible to use
in testing?Why does the choice of a tool in the tester, with unchanged Expert Advisor parameters and other testing conditions, affect the testing results?
Because MT5 is glitchy!
If, for example, a curve of another instrument is superimposed on the EURUSD chart.
#property indicator_separate_window ....
copied=CopyClose(InstrumentName,0,0,CountsBars,Buffer);
if EURJPY - everything is fine, but if EURCAD the data is sometimes in error
If EURCAD on EURCAD, everything is fine.
On Alpari in 90% on other platforms less.
In short, some instruments are not combined!
It is more logical for multicurrency systems to process the main algorithm by a timer, so as not to depend on the intensity of the tick flow on the main instrument (on which the Expert Advisor "hangs"). Only in this case the results of multicurrency testing will be identical for any instrument selected during testing.
It is more logical for multicurrency systems to process the main algorithm on a timer, so as not to depend on the intensity of tick flow on the main instrument (on which the Expert Advisor "hangs"). Only in this case the results of multicurrency testing will be identical for any instrument selected during testing.
I have been saying this for a long time. :)
In those Expert Advisors that now exist, the timer is not involved even 10% of what it should be.
The idea of the need to manage the possibility to trade on certain instruments based on parameters is quite good (I myself use such things since MT4), but the implementation is frankly lame.
In my opinion, currencies should be collected into groups by some attribute, and in the parameters to manage the whole groups, and the final work on each instrument separately to carry out already at the level of variables or arrays (depending on the implementation).
Everything works fine in MQL4 without a timer.
Well, it doesn't exist in MQL4, also there are no structures and classes there, do you suggest to give up on them here?
IMHO
To use or not to use the standard library is a matter of everyone's taste (at the worst, you can use only your own code), but to give up all the advantages just because they are not available in MT4 is not very reasonable.....

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Creating an Expert Advisor, which Trades on a Number of Instruments is published:
The concept of diversification of assets on financial markets is quiet old, and has always attracted beginner traders. In this article, the author proposes a maximally simple approach to a construction of a multi-currency Expert Advisor, for an initial introduction to this direction of trading strategies.
Author: Nikolay Kositsin