Your solution returns good results, but I can't make operations anymore due to the string type... And when I try StrToDouble() function, the problem appears again...
Your solution returns good results, but I can't make operations anymore due to the string type... And when I try StrToDouble() function, the problem appears again...
You only use DoubleToString() when printing the value, not for any calculations.
Read the documentation for double including.
It should be remembered that real numbers are stored in memory with some limited accuracy in the binary system, while generally the decimal notation is used. That's why many numbers that are precisely represented in the decimal system can be written only as an infinite fraction in the binary system.
For example, numbers 0.3 and 0.7 are represented in the computer as infinite fractions, while the number of 0.25 is stored exactly, because it represents the power of two.
In this regard, it is strongly recommended not to compare two real numbers for equality, because such a comparison is not correct.
You only use DoubleToString() when printing the value, not for any calculations.
Read the documentation for double including.
Thanks for all, I just understood where the problem was coming !
Just have to move a little the price (1 or -1 pip) ^^
Thanks for all, I just understood where the problem was coming !
Just have to move a little the price (1 or -1 pip) ^^
You obviously don't understand the problem (actually there is no problem)
- 2011.12.08
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I actually encounter a problem with the iHigh and iLow functions. I would like to get the higher and lower prices of a predefined period.
Here you can see the code I made :
The problem is that returned prices have sometimes too much digits (underlined in red on the picture below), but I don't understand why and how to solve this problem.
I already tried NormalizeDouble function / to multiply by "10^(Digits)", round the value and divided by "10^(Digits)" / to change the variable type...
But any of these solutions is working (whereas when I multiply by 10^(Digits), the integer value is okay).
Please someone can help me !
And sorry for english faults, I'm french trying to do his best ^^
Florian