Features of the mql5 language, subtleties and tricks - page 147
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
IsInf() and IsNaN() are working,
IsEqual() and IsZerro() are questionable, googled from some sources as "trick for double".
IsNan() works, but IsInf() does not
Since when did denormalised numbers become infinity?
And all these comparisons with epsilon - epsilon should be increased proportionally to operands. Anyway, there's no universal recipe, I use Point as an epsilon (with rounded operands) and I don't want (and don't need) to compare the difference with DBL_EPSILON.
And all these comparisons with epsilon - epsilon should be increased proportionally to operands. In general, there's no universal recipe, I use Point as epsilon (with rounded operands), I don't want to compare the difference with DBL_EPSILON(and I don't need to).
found an article I read yesterday from TVhttps://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
Yes, you must use another example where you should specify the comparison accuracy
IsNan() works, but IsInf() does not
Since when did denormalized numbers become infinity?
MQL seems to normalize to 8-th digit, i.e. if NormalizeDouble() is added to IsInf(), the result will still be no better.
normalisation in MQL seems to be up to 8th digit, i.e. if NormalizeDouble() is added to IsInf(), the result is still no better
Normalization in MQL is not the same at all, I don't know why they named the function that way. https://ru.wikipedia.org/wiki/%D0%94%D0%B5%D0%BD%D0%BE%D1%80%D0%BC%D0%B0%D0%BB%D0%B8%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B5_%D1%87%D0%B8%D1%81%D0%BB%D0%B0
Shows how many successful synchronous trade orders (OrderSend) and asynchronous orders generated in the Terminal in total (since start).
I use it in the Tester (at the end) to see how many times the orders have been modified.
Forum on trading, automated trading systems and trading strategy testing
OnTick() doesn't work in a class instance?
fxsaber, 2019.10.31 23:45
Inherit from BASE, then OnTick methods in classes will be called automatically.
An example of using X Macro (don't mind the obscure types, I ripped it out of working code. Vector is a dynamic array):
For example:
1. we want to define vectors behind a loop to prevent constant allocations.
2. Each of the tests can be switched off (actually there are many).
3. restore_image() and restore_subimages(), a heavy and very time-consuming function (reading graph objects from the graph).
4. If none of the tests use seg2, for example, I would like to remove both the definition and the corresponding restore...() in one action, to prevent a situation where the vector is defined but empty because of the commented restore...(), which would give erroneous results.
What to do?
Simply comment out the unnecessary segx in DEFSEG_LIST. This will generate the same results as in the first code. Actually it's a pity the compiler is unable to show the processor's output (the gcc -E analog).
Sometimes in genetic optimisation the first few thousand passes are enough to already understand the outcome more or less.
When you automatically run a lot of optimizations, you want it all to run faster. That is why we will need a mechanism to interrupt optimization.
Usage.
Instructions for opening a chart with a Null character.
If a class with static fields is immediately created while defining a class, there will be a compile-time error.