miko.szy: However, when I do Print() it, it appears only with 4 decimals.
Print("Open[0] = ", NormalizeDouble(open0, 5)) ;
Print("Open[0] = ", NormalizeDouble(open0, 5)) ;
- RTFM
Data of double type are printed with 4 decimal digits after point. To output more precisely, use the DoubleToStr() function. - NormalizeDouble returns a double, INFINITE digits. Makes no difference to Print. Use PriceToStr()
- NormalizeDouble is a kludge, don't use it. It's use is always wrong.
Gosh... it was Print() related issue...
WHRoeder, thanks again. Much much appreciated!

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
Hi,
I would like to compare Open[0] and Open[1].
My broker uses 5 decimal. So, I would like to compare them as 5 decimal number.
In Data window, I can see Open price with 5 decimals.
However, when I do Print() it, it appears only with 4 decimals.
ex) On data window, Open[0] = 0.89594 However, it appears as 0.8959 on log file.
I tried followings.
Print("Open[0] = ", Open[0]);
double open0 = Open[0]
Print("Open[0] = ", NormalizeDouble(open0, 5)) ;
open0 = NormalizeDouble(open0, 5);
Print("Open[0] = ", open0 ) ;
If anybody has any idea, your comment is much appreciated!