Features of the mql5 language, subtleties and tricks - page 87
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Don't tell me, I found a chip, the MCs still have not corrected the loan of the name of one of the main functions, killed a lot of time reading and searching for it
https://www.mql5.com/ru/docs/basis/function/functionoverload
https://www.mql5.com/ru/docs/basis/function/functionoverload
got it thanks
Special thanks to Konstantin Gruzdev
Implementation of Multi-currency Mode in MetaTrader 5Application
Result
Application
Result
If it is possible to use MQL to describe a function, the number of arguments of which is not defined, e.g.
Print(arg1,arg.......) or StringConcatenate(string_var,void argument1,void argument2, .......)
If it is possible to use MQL to describe a function with an undefined number of arguments, such as
Print(arg1,arg.......) or StringConcatenate(string_var,void argument1,void argument2, .......)
It's possible to come up with something based on macros, but it's crutchy.
Templates + passing arrays/structures allow to realize many ideas.
It is possible to come up with something based on macros, but it is crutchy.
Templates + passing arrays/structures allow you to implement many ideas.
Thanks, that's what I thought, no need in principle, but watching your codes, I thought, what if you can do that?
Forum on trading, automated trading systems and trading strategies testing
Peculiarities of mql5 language, tips and tricks
fxsaber, 2017.02.27 18:40
bool MyOrderCalcMargin( const ENUM_ORDER_TYPE action, const string symbol, const double volume, const double price, double &margin )
Here is a cross-platform prof. implementation.
Imagine how long it would take to find an error in a large code if instead of "==" you wrote "=". Here, on the other hand, the compiler itself tells you everything at once, thanks to const.
fxsaber:
Imagine how long it would take to find an error in a large code if you wrote "==" instead of "=". Here, thanks to const, the compiler itself tells you everything right away.
In such cases, you can start the comparison with a constant, which is even better.
In such cases, you can start the comparison with a constant - even better.
Yes, I just created an example for such a case
if (Trans.type = Variable)