Precision of MACD in EAs

Back to topics list To post a new topic, please log in or register
avatar
8
rvalb 2015.06.13 18:08
 

Hi:

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. 

 

Roberto 

avatar
13008
WHRoeder 2015.06.13 18:27 #
 
rvalb: If I Print() or Comment()
   double d=1/81.;Print(d);// with    #property strict 0.01234567901234568
                           // without #property strict 0.0123 ( 4digits only)


avatar
8
rvalb 2015.06.14 23:05 #
 

Thanks, WHRoeder !

I have just implemented it and it works fine. 

 

Cheers. 

Roberto 

Back to topics list  

To add comments, please log in or register