Features of the mql5 language, subtleties and tricks - page 112
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
By the way, I came to the conclusion that in the general case, if the return value type of the function is absolutely any type, the problem cannot be solved by MQL means. Requires decltype, which is not present here.
The pointer will return, but the structure - I didn't think so. It should be by reference, after all.
It's the same.
Now 2 arguments are passed to the function instead of 3 :
Now generally 2 arguments are passed to the function instead of 3 :
Two is absolutely the original problem. And three is its generalization.
Forum on trading, automated trading systems and trading strategy testing
Errors, bugs, questions
fxsaber, 2018.12.21 22:15
The C++ standard does not define this order and leaves it up to the compiler. The MQL developer must make sure that this order can be changed or if there are any plans to change it in the future.
Therefore, this is the best way to go about it:
The C++ standard does not define this order and leaves it up to the compiler. The MQL developer must make sure that this order can be changed or if there are any plans to change it in the future.
So this way is better:
Yes, it is more reliable.
I'm f*cked, dear editorial staff.
Giving code to an interpreter without understanding how he interprets that code... The high road.
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
fxsaber, 2018.12.21 10:23
I can't figure it out, please ask for a hint. There is such a time acquisition
How to write a macro that does the same thing
The problem is that PrevHandle is not created in the macro.
I don't understand why my solution is worse, I'll paste it here too:
Remarkable - implementation of the comma operator through the trend operator (well, nothing brilliant, but it's the first time I've encountered it).
It's not clear - why pull a handle type through a template? Would there be different types of handles, it's not a big deal. And in general the handle type will be specified via typedef/define.
I don't see how my solution is any worse, I'll put it in here too:
Noteworthy - implementation of comma operator through trend operator (well, nothing great, but it's the first time I came across it).
It is not clear - why should we pull a handle type through a template? Would there be different types of handles, it's not a big deal. And in general the handle type will be specified via typedef/define.
It's not good at all. What is handle?
It's not good at all. What is handle?
The task condition was: there is some environment that changes via a descriptor (handle), and you need to implement in one macro:
1. Remember the current handle
2. Switch the environment to the new handle
3. Retrieve the required parameter from the environment
4. Switch environment to old handle
5. Return parameter
The task condition was: there is some environment that changes via a descriptor (handle), and you need to implement in one macro:
1. Remember the current handle
2. Switch the environment to the new handle
3. Retrieve the desired parameter from the environment
4. Change environment to the old handle
5. Return parameter
Thank you for your reply.