Disliked...I get the error - possible loss of data due to type conversation - highlighted Only when using property strict...iCustomMa(int mode, double price, double length, int i, int instanceNo=0)...return(iSmooth(price,length,r,instanceNo)...Ignored
- "possible loss of data due to type conversation" is a benign issue, but should be corrected, it's when one data type is being converted to another implicitly (implicit as in it's not intended/instructed by you), and the change results in lost data.
//eg
double x = 2.055; //x is a decimal number
int a= x;//implicit conversion, a is an integer, no decimal, the a will loose the decimal portion from x and be 2, a warning will show up when compiling
int b= int(x);//explicit typecasting of double x into int b, no warning, good
int c= (int)x;//explicit typecasting of double x into int c, no warning, good
long time_0 = Time[0];//time_0 is a long value, integer type, used for time type data, larger than an int type
int time_1 = Time_0;//time_1 is an int type, which is physically smaller than a long, so data will be lost, it should be a long type instead to accept a long value
- it's probable that the parameter in iCustomMA of length, being a double, is being passed into iSmooth() which probably has length as an integer type, so change the iCustomMA parameter of length to an int type
https://docs.mql4.com/basis/types/casting
https://docs.mql4.com/basis/types/integer