Features of the mql5 language, subtleties and tricks - page 55
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
Another convenient variant would be protected inheritance, when the base class has all methods, and in an inherited class you only show Get.And when needed, you bring it to the base class.
I used protected inheritance, but messed up with the selected one. Thank you!
But Metaeditor still hasn't fixed the bug that all these methods are dumped to the list even if they are unavailable.
I didn't check it now, but when I was experimenting, it was stored in my memory that they don't drop out.
Before modifying or deleting an order, you need to do a check
SB does not have it, so you have to write it yourself.
In the Tester this check is meaningless - all current orders always have this status.
Forum on trading, automated trading systems and trading strategies testing
Market closed
fxsaber, 2017.09.22 09:45
POSITION_TIME_UPDATE refers only to the change of the position's lot. For example, a partial closing of a position on any type of account or a fill on a netting.
Changes in SL/TP levels do not affect POSITION_TIME_UPDATE.
To paraphrase, POSITION_TIME_UPDATE is only affected by modifications reflected in the Trade History - trades. SL/TP-levels do not belong to such modifications, so they do not affect them.
Forum on trading, automated trading systems and trading strategies testing
EA Reinitialization
fxsaber, 2017.09.26 11:35
Forum on trading, automated trading systems and trading strategies testing
Bugs, bugs, questions
fxsaber, 2017.09.08 11:11
It's all right here.
In the first case it's a cast, in the second it's an assignment.
Derivation from the parent to the descendant is unacceptable
Assignment to an object is a call to the corresponding copy operator, in this case implicit A::operator=(const A &)
Thanks, so the parent copy operator remains available outsideonly in case of public inheritance. Checked it out, that's right.
Is it good?
With this construct we need to declare an additional copy constructor B::operator=(const A&) and "pass through" the call to A::operator= in it
Variants of standard indicators calculation on custom data (without creation of additional indicators).
Forum on trading, automated trading systems and trading strategies testing
Market closed
fxsaber, 2017.09.22 09:45
We should throw out the custom symbols from the loop, because in Market Watch they can be set to any time, even 3000 years.
I.e. "create" a handle on every tick. New indicator entities will not be created, the time will be wasted only on the comparison of the iMA input parameters with those indicators that were running on the previous ticks. I.e., exactly the same thing that is done in MT4.
In MQL5 it is quite acceptable to write it like this
I.e. "create" a handle on every tick. New indicator entities will not be created, the time will be wasted only on the comparison of the iMA input parameters with those indicators that were running on the previous ticks. I.e., exactly the same thing that is done in MT4.
Have you measured the performance? It is interesting, how much it will slow down the performance. Especially for custom indicators.