I have developed a very simple indicator which is working fine for forex pairs with only 2 decimal numbers like EUR/JPY, but when I try using it in pairs with 4 decimal figures like GBP/USD, it rounds it up the calculation to 2 decimals instead of the ideal 4.
if (Close[0]>Open[0])
Brange.Set(Close[0] - Open[0]);
else
Brange.Set(Open[0] - Close[0]);
if (Open[2]<Close[2] && Open[1]<Close[1])
Kat.Set(High[0] + 3*(Brange[2] + Brange[1] + Brange[0])); /// This is the line that seems to not work well for forex pair with 4 decimal, since it always rounds up the result to 2 decimal.
Any help regarding this matter is greatly appreciated.
Comment