I am calculating the difference between to closing values the example being 15.78 and 15.64 the actual difference is 0.14, but when I run through with debug I get the value of .13999999999999879.
actual code
difference = Close[0] - Close[1];
difference is set to 0 earlier to ensure a known value if this line is not executed.
All the variables are of type double, since the close values in NinjaTrader are doubles.
I know I must be doing something reaaaalllllly stupid, but any help would be appreciated. I know that the difference is not much, but there should not be any.
TIA,
Graham.
Comment