Problem with indicator digit rounding

 

I'm having a problem with digits and was wondering if anyone could help.

I'm using the MACD indicator, which provides at least 5 digits (if I convert it to a string I get lots of digits). The problem is, if I do a "greater than" comparison between two values it only seems to use the first 4 digits. I know that both values I'm comparing have more than 4 digits...

As an example, if( 0.00013 > 0.00010 ) - This always turns out false because it thinks they are equal. I'm using double for the variable type.

Anyone know why this might be?

Thanks in advance.

- Tovan

 

sorry but not see wat u get - please show code as I do below + "results"

as such, my simple test maybe not wat u on about, if so please clarify

int start()
{
  if( 0.00013 > 0.00010 )
    Print("0.00013 > 0.00010");
  else
    Print("0.00013 <= 0.00010");

  double d1=0.00013, d2=0.00010;

  if( d1 > d2 )
    Print("0.00013 > 0.00010");
  else
    Print("0.00013 <= 0.00010");

  return(0);
}

.
2008.10.21 16:52:26 _quicky GBPUSD,H1: uninit reason 0
2008.10.21 16:52:26 _quicky GBPUSD,H1: 0.00013 > 0.00010
2008.10.21 16:52:26 _quicky GBPUSD,H1: 0.00013 > 0.00010
2008.10.21 16:52:26 _quicky GBPUSD,H1: loaded successfully
Reason: