Features of the mql5 language, subtleties and tricks - page 111
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
...
Please use the built-in text formatting - there is a menu above the message input field - everything is there. And hotkeys are described there too.
I've fixed your "quote".
How is it the same? There's an automatic copy constructor and all manipulation will have a view:
... ar.Add(new(q));
As I understand it, I meant new Q(q). Now it's clear that we were talking about the absence of automatic copy constructor in MQL.
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 in the macro cannot be created.
Forum on trading, automated trading systems & strategy testing
Bugs, bugs, questions
fxsaber, 2018.12.21 22:15
Solution
Solution
You will always have expression B calculated and returned, regardless of the rest.
Your B expression will always be calculated and returned, regardless of the rest.
There's a sequential (right-to-left) calculation of the input parameters of the auxiliary functions.
There is a sequential (right-to-left) calculation of the input parameters of the auxiliary functions.
What does this change? The macro always returns B
Try to refute the decision. I don't see any error.
First it switches to NewHandle, then it takes B, then it switches to the previous handle.
First it switches to NewHandle, then it takes B, then it switches to the previous handle.
And the original task was like this:
I.e. the condition must be fulfilledAnd the original problem was this:
This is the same.
After giving a comment, which summarised the problem somewhat - SymbolInfoTick and SymbolInfoDouble, etc.
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, then the problem is not solvable by MQL means. A decltype is required, which is not present here.