Type conversion warning, I can't spot it

polomagiiic  

Hello,

I'm writing my first lines of mql5. Please bear with me.


I get a "possible loss of data due to type conversion" warning. 

I've already seen these warnings, but this time I can't spot the problem. Any help would be appreciated.


Thanks in advance !

double ATRValue;
int CheckATR()
  {
   double ATRArray[];
   int ATRDefinition = iATR(_Symbol,_Period,14);
   ArraySetAsSeries(ATRArray,true);
   CopyBuffer(ATRDefinition,0,0,3,ATRArray);
   ATRValue = NormalizeDouble(ATRArray[0],5);   
   return ATRValue;
  } 

Sardion Maranatha  
polomagiiic:

Hello,

I'm writing my first lines of mql5. Please bear with me.


I get a "possible loss of data due to type conversion" warning. 

I've already seen these warnings, but this time I can't spot the problem. Any help would be appreciated.


Thanks in advance !


Your function expects integer return while given is double, either you cast it or you determine returning integer value
polomagiiic  
Sardion Maranatha

Thank you very much for the help !

Reason: