what's wrong with this code?

 

#property copyright "Copyright 2013, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

double x=1.7304567;
int start()
  {
double y = StrToDouble(DoubleToStr(x,2))-StrToDouble(DoubleToStr(x,1));  // this will get 0.03

 

Print (DoubleToStr(y,2),"  print y"); // This is 

if ( y == 0.00 || y == 0.02 || y == 0.04 || y == 0.06 || y == 0.08) {
Print (DoubleToStr(x,2),"  Without + 0.01"); // this is not working
}

if ( y == 0.01 || y == 0.03 || y == 0.05 || y == 0.07 || y == 0.09) {
Print (DoubleToStr(x+0.1,2),"   with + 0.1"); // this is not working
}
   return(0);
  }
 
geoffry:

<CODE DELETED>

Please read some other posts before posting . . .

Please   edit   your post . . .    please use the   SRC   button to post code: How to use the   SRC   button. 


 
geoffry:


Read this thread:  Can price != price ?