When getting a value of the last daily bar using iHigh it returns only rounded number and I need all digits for precision.
double high = iHigh(NULL,PERIOD_D1,1); returns 1.329 while the high is 1.32899
I cannot use DoubleToStr as I need the value as "double" for further processing.
Any idea how to get all digits?
It happens already, what makes you think you are getting a rounded value ? how are you seeing this value ? show your code.
I use
double high = iHigh(NULL,PERIOD_D1,1);
Alert (high);
yesterday EURUSD high was 1.32899 but Alert window shows 1.329.
I use
double high = iHigh(NULL,PERIOD_D1,1);
Alert (high);
yesterday EURUSD high was 1.32899 but Alert window shows 1.329.
void Alert( | ...) |
Alert
void Alert( | ...) |
Yep, but shouldn't that show 1.3289 ? not 1.329 ?
yesterday EURUSD high was 1.32899 but Alert window shows 1.329.
I have a different high for yesterday, can you try this please and let us know what you get.
double high = iHigh(NULL,PERIOD_D1,1); Alert ("High - string ", DoubleToStr(high, Digits) ); // Edit, sorry, should have included Digits
I see, thanks! I fought I was going crazy. So the "high" value is correct after all. Didn't know about Alert limitations.
The double was 1.32899 then it is not 1.3289 but 1.3290
we see if last digit is o then the last digit is not printed in Alert
You can check
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
When getting a value of the last daily bar using iHigh it returns only rounded number and I need all digits for precision.
double high = iHigh(NULL,PERIOD_D1,1); returns 1.329 while the high is 1.32899
I cannot use DoubleToStr as I need the value as "double" for further processing.
Any idea how to get all digits?