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

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
A classic mistake.
Wondering if it's right to make a mistake.
This is correct from the point of view of correctness.
Apparently, the ternary operator does not return a reference but a variable by value (which is not logical in principle).
It turns out to be a temp variable, which mql functions with reference parameters don't like.
I.e., ternary operator and references don't make friends, in brief.
Common sense, I don't know, it makes sense.You get a ramp variable, which mql functions with reference parameters don't like.
Exactly "likes". It is because of such examples that doubts arose.
From the description of the error itself, it looks like a problem with links and non-links.
Maybe someone with more up-to-date knowledge of the language can explain.
fxsaber:
Classic mistake
And if so
How about this?
It's faster to check than to make a post.
It does not work, of course.
It's faster to check than it is to make a post.
It doesn't work, of course.
That's weird. I always use this option when opening a position with or without a take.
That's strange. I always use this option when opening positions with or without takeovers.