zero devide in live trading on all pair but not on gbp/usd - page 2

 

hey phy,



i added iatr to the chart and it showed zero. But when i scroll the chart back, it returns a correct value. Now the expert is doing what it has to do.



But why did i have to scroll back, for recieving a value?

 
int start(){
 double a, b, c, d, e, f; 
 a=(iATR(Symbol(),PERIOD_H1,10,0));
 Print("a = ", DoubleToStr(a, 8));
 b=(iATR(Symbol(),PERIOD_H1,100,0));
 Print("b = ", DoubleToStr(b, 8));
 b=(iATR(Symbol(),PERIOD_H1,1000,0));
 Print("c = ", DoubleToStr(c, 8));
 b=(iATR(Symbol(),PERIOD_H1,10000,0));
 Print("d = ", DoubleToStr(d, 8));
 b=(iATR(Symbol(),PERIOD_H1,100000,0));
 Print("e = ", DoubleToStr(e, 8));
 Print("Error = ", GetLastError()); 
 return(0);
}