Errors, bugs, questions - page 2820
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
The certificate confused me)))
The reference says without inverted commas. So you put yourself in there.
Bearded question. But I don't understand this result.
It has been said 100 times: "don't use exact dub comparison, use epsilon". Including in our documentation.
Not even 0.3 or 0.7 will compare with your perceptions. Accept it and get over it. Or go and learn (at MTI, for example)
It has been said 100 times: "don't use exact dub comparison, use epsilon". Including in our documentation.
I know how to do a dub comparison, of course.
Not even 0.3 or 0.7 will compare to your perceptions. Accept it and get over it. Or go and learn (at MTI, for example).
You don't understand the question.
I can do a dub comparison, of course.
You don't understand the question.
There are other subtleties.
A real number multiplied by 0.5 may not compare to the same number divided by 2.0
There are other subtleties.
A real number multiplied by 0.5 may not equal the same number divided by 2.0
That's true. But the question was, why isn't the number 1.79435 normalized to 5 decimal places?
ZS The background to this question.
The SL in the Tester went off. DEAL_PRICE = 1.79435, ORDER_PRICE_OPEN = 0(as in MT5), DEAL_COMMENT = "sl 1.79435".
I wanted to know if there was a slip when I executed SL or not? So I simply compared DEAL_PRICE and the price from the comment. With my eyes I see that the prices are the same but MQL shows that they are not. Finally got to the bottom of the original comparison.
Forum on trading, automated trading systems & strategy testing
Errors, bugs, questions
fxsaber, 2020.08.10 09:04
All true. But the question was why is the number 1.79435 not normalised to the 5th decimal place?
ZS Background to the question.
The SL in the Tester was triggered. DEAL_PRICE = 1.79435, ORDER_PRICE_OPEN = 0(as in MT5), DEAL_COMMENT = "sl 1.79435".
I wanted to know if there was a slip when I executed SL or not? So I simply compared DEAL_PRICE and the price from the comment. With my eyes I see that the prices are the same but MQL shows that they are not. Ended up getting to the original comparison.
Sorry, but it's kind of strange to hear you say that.
I'm sorry, but it's kind of strange to hear you say that.
I repeat my question.
why is the number 1.79435 not normalised to the 5th decimal place?
All true. But the question was why is the number 1.79435 not normalised to the 5th decimal place?
normalization is not rounding.
@Slava writes that the internal representation of double is different:
2020.08.10 13:33:37.737 tst_normalize (EURUSD,H1) NORM_DOUBLE = 1.79435
2020.08.10 13:33:37.737 tst_normalize (EURUSD,H1) LongToHex(tmp.ul_value) = 3FFCB5A858793DDA
2020.08.10 13:33:37.737 tst_normalize (EURUSD,H1) CONST_DOUBLE = 1.79435
2020.08.10 13:33:37.737 tst_normalize (EURUSD,H1) LongToHex(tmp.ul_value) = 3FFCB5A858793DD9
SZS: There was a good post@Nikolai Semko somewhere, he described work with double very well, maybe I'll find the link.
UPD:https://www.mql5.com/ru/forum/1111/page2623#comment_14473837