I have coded a very simple calculation, which is working fine for Forex pairs with only 2 decimal figures like USD/JPY, but for the ones that have 4 decimals like the EUR/USD, the final result is being rounded to 2 decimals only instead of 4.
if (Open[2]<=Close[2] && Open[1]<=Close[1])
Tak.Set(Low[0] -2* (Brange[2] + Brange[1] + Brange[0])); ---- This is the line where the result is being rounded to 2 decimals all the time.
Brange is a previous parameter that looks like this;
if (Close[0]>Open[0])
Brange.Set(Close[0] - Open[0]);
else
Brange.Set(Open[0] - Close[0]);
Will appreciate any help regarding this.
Thanks.
Comment