Features of the mql5 language, subtleties and tricks - page 221

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
Not sure how to keep the functionality (subfield and method) and usability. Perhaps this option would suit your needs.
Application.
That was so quick and now it works just fine, thank you!
To Russia with love❤️! ;-)
Is this possible in the current version of MQL5? I didn't have the ingenuity to overcome this obstacle:
Once upon a time it was easy to write such a macro in MQL5.
Is this possible in the current version of MQL5? I haven't had the resourcefulness to overcome this obstacle:
I don't understand the task - you need MqlRatest class (template for it) to be declared inside the macro substitution?
I don't understand the task - you need MqlRatest class (its template) to be declared inside the macro substitution?
No, the classes are already declared. The comments specify what result you want to get. The input to the macro is an object, and the output is a class that contains the name of that object's type.
It seems to me it's necessary to have different macro substitution for parameters of different types.
The task was born out of this one.
Forum on trading, automated trading systems and strategy testing
Peculiarities of mql5, tips and tricks
fxsaber, 2022.02.11 15:44
I have colored the input parameter, in which I have to specify the type. In this macro I get three input parameters. And I would like two - without type.
No, the classes are already declared. The comments specify what result you want to get. The input to the macro is an object, and the output is a class that contains the name of that object's type.
I don't know how to solve this problem.
And to ArraySortStruct with two parameters - this is how it works:
And to ArraySortStruct with two parameters - that's how it works:
You're right, thank you! I overdid it on a flat spot. I'll leave your variant for sorting.
Application.
ZZY It's a pity, by subfield or method, it doesn't work.
If a DLL is used simultaneously in different MT5 programs,
keep in mind that it is loaded once by the first program running that uses it.
That is, the DLL environment is in one common process, no matter how many times you import it.
What's the catch? The global pointers used in the DLL are all in the same shared process space.
And this is very convenient.
Maybe this is not news to anyone but it's unexpected for me.
If DLL is used simultaneously in different programs MT5,
, keep in mind that it is loaded once by the first program that uses it.
That is, the state of the DLL is in one common process, no matter how many times you import it.
What's the catch? The global pointers used in the DLL are all in the same shared process space.
And this is very convenient.
This is nothing new, it's the way it's always worked from birth.
Only if the data is larger than __atomic__ should access be wrapped/protected with critical sections (or mutex to terminal std::thread)