Download MetaTrader 5

which type is the value returned by iVolume?

To add comments, please log in or register
Reza nasimi
257
Reza nasimi  

Hi 
i wrote this:

double This_Vol=iVolume(NULL,PERIOD_M1,0);

and i faced this warning: 

"possible loss of data due to type conversion."

when I checked the returned value in Comment() I find out it is integer . so why I have this  warning?
also I tried whit this :

int This_Vol=iVolume(NULL,PERIOD_M1,0);
and I have same warning .
any help please ?
JC
1577
JC  
Reza nasimi:

any help please ?

iVolume() returns long, not int: https://docs.mql4.com/series/ivolume

Reza nasimi
257
Reza nasimi  
JC:

iVolume() returns long, not int: https://docs.mql4.com/series/ivolume


thank you,
I changed it to long and problem solved.

To add comments, please log in or register