why MathAbs(iOpen(_Symbol,PERIOD_CURRENT,0) - iClose(_Symbol,PERIOD_CURRENT,0)) always 0?

 

why 

MathAbs(iOpen(_Symbol,PERIOD_CURRENT,0) - iClose(_Symbol,PERIOD_CURRENT,0))

always 0 ??

how to fix it?

 
NaiTON.PTK:

why 

always 0 ??

how to fix it?

  1. What is written in the logs?
  2. Try single variables like double o = iOpen(..), c = iClose(..), d = o - c, a = MathAbs(d); Print(o," ",c, ...);
  3. Check _LastError!
 
NaiTON.PTK: always 0 ??

Always post all relevant code (using Code button) or attach the source file. Where is the assignment? Where do you print your result?

 
NaiTON.PTK:
MathAbs(iOpen(_Symbol,PERIOD_CURRENT,0) - iClose(_Symbol,PERIOD_CURRENT,0))
double size=MathAbs(iOpen(_Symbol,PERIOD_CURRENT,0) - iClose(_Symbol,PERIOD_CURRENT,0));  
Comment("Size "+size); 

store it in a double type not an int