void IndicatorDigits( | int digits) |
phy:
Sets precision format (the count of digits after decimal point) to visualize indicator
values. The symbol price preicision is used by default, the indicator being attached to this symbol chart.
void IndicatorDigits( | int digits) |
Sorry folks. I gave you a bum steer. It is Print() that rounds doubles to 4 decimal digits. iMACD() actually returns 8 decimal digits (or at least assigning the returned double value to a string and then printing that does).
string DoubleToStr( |
double value, int digits) |
Returns text string with the specified numerical value converted into a specified precision format.
Print("MACD ", DoubleToStr(dMACD,5));
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,
Why does the MACD indicator show 5 decimal places and iMACD() return only 4 decimal places?
Try the following EA and add the standard MACD indicator to the chart.
Test conditions:
Server: Alpari UK.
Terminal version 211.
Symbol GBPUSD,M1
My observation is that 5 decimal places of accuracy are significant for the MACD. Surely the inaccuracy of the iMACD() function will adversely affect performance.
Regards,
Jan