
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
fxsaber:
Probably, some compilers will give warnings in such situations.
The specifier refers to a reference, not to the object as a whole, everything is legitimate, why should the compiler swear?
the specifier refers to the reference and not to the object as a whole, everything is legitimate, why should the compiler swear?
Probably, if it were, there would be no scolding here.
Probably, if that were the case, there would be no swearing here.
This is a constant object, so it is logical that a constant object cannot have a non-constant reference
This is a constant object, so it is logical that a non-constant object cannot have a non-constant reference.
How do I refer to a constant object?
How do I make a reference to a constant object?
Add an overload.
Overloading to add.
Isn't such an overload on a constant link?
Forum on trading, automated trading systems and strategy testing
OOP, templates and macros in mql5, tips and tricks
TheXpert, 2020.02.26 15:24
The specifier refers to the reference and not to the object as a whole
Isn't such an overload a constant reference?
What do you want to do?
Isn't such an overload not an overload on a constant reference?
If you want the compiler to crash on your first example, it won't work, because everything is legal there: you don't change the object instance by reference, you change the object instance for which the method is called, while the fact that it can be the same object is not the compiler's problem, but the programmer's headache.
For a class, you can do this trick (for structure, you can't):
If you want the compiler to crash on your first example, it won't, because everything is legal there.
It's not about legality, it's about the fact that the const modifier does not guarantee that the object will remain unchanged.
Forum on trading, automated trading systems and trading strategies testing
OOP, templates and macros in mql5, tips and tricks
fxsaber, 2020.02.25 22:23
I've never seen this expression return false.That is why it is difficult to keep statistics on the order execution time based on trading history.
If we can still compare the value ofORDER_TIME_SETUP_MSC for market orders, it is meaningless for pending orders.
Forum on trading, automated trading systems and strategy testing
Libraries: MT4Orders
fxsaber, 2020.02.27 09:40
Up to two minutes execution on a running account. Share your stats here. The script doesn't use any libraries, it's suitable for Netting/Hedging.