I am trying to use MACD and OsMA indicators in my EAs but I find that they lack the same precision they show on the screen.
When I use MACD or OsMA indicators on the screen and put the mouse pointer over a bar, they show some seven or eight decimal digits, and sometimes, differences between bars are in the fifth or sixth decimal number.
If I Print() or Comment() the value of those indicators, they only display four decimal numbers, which are often the same for bars that show different values on the screen. I have tried to fix this with NormalizeDouble() but the result is the same; I have seen IndicatorDigits() function but I don't know how to use it in an EA.
I wonder if anybody has also experienced this and have found a way to get the right figure on an EA.
Thanks for your help.
double d=1/81.;Print(d);// with #property strict 0.01234567901234568
// without #property strict 0.0123 ( 4digits only)
Thanks, WHRoeder !
I have just implemented it and it works fine.
To add comments, please log in or register