possible loss of data due to type conversion - page 2

 
MikelDavao:

do you have any ideas to fix the warning? 


You have already been given 2 solutions.

Show the code where you have fixed it.

 
Keith Watford:

Try

int s=(int)(MathAbs(NormalizeDouble(priceH,_Digits)-NormalizeDouble(priceL,_Digits))/_Point);
MikelDavao:

same error.

Rubbish, that will fix the warning.

 
MikelDavao:

do you have any ideas to fix the warning? 


             

Just click here, or here.

 
Keith Watford:

You have already been given 2 solutions.

Show the code where you have fixed it.

//+------------------------------------------------------------------+
//|                                                      ProjectName |
//|                                      Copyright 2018, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
int iMN1C1us=0, iMN1C1rb=0, iMN1C1ls=0, iMN1C1cl=0;
int priceS(double priceH,double priceL)
  {
   int s = MathAbs(NormalizeDouble(priceH,_Digits)-NormalizeDouble(priceL,_Digits))/_Point;
   return(s);
  }

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnInit()
  {
   if(iOpen(Symbol(),PERIOD_MN1,1)<iClose(Symbol(),PERIOD_MN1,1))
     {
      //Pd1T="Bl";
      iMN1C1us=priceS(iHigh(Symbol(),PERIOD_MN1,1),iClose(Symbol(),PERIOD_MN1,1));
      iMN1C1rb=priceS(iClose(Symbol(),PERIOD_MN1,1),iOpen(Symbol(),PERIOD_MN1,1));
      iMN1C1ls=priceS(iOpen(Symbol(),PERIOD_MN1,1),iLow(Symbol(),PERIOD_MN1,1));
      iMN1C1cl=priceS(iHigh(Symbol(),PERIOD_MN1,1),iLow(Symbol(),PERIOD_MN1,1));
     }
   else
      if(iOpen(Symbol(),PERIOD_MN1,1)>iClose(Symbol(),PERIOD_MN1,1))
        {
         //Pd1T="Br";
         iMN1C1us=priceS(iHigh(Symbol(),PERIOD_MN1,1),iOpen(Symbol(),PERIOD_MN1,1));
         iMN1C1rb=priceS(iOpen(Symbol(),PERIOD_MN1,1),iClose(Symbol(),PERIOD_MN1,1));
         iMN1C1ls=priceS(iClose(Symbol(),PERIOD_MN1,1),iLow(Symbol(),PERIOD_MN1,1));
         iMN1C1cl=priceS(iHigh(Symbol(),PERIOD_MN1,1),iLow(Symbol(),PERIOD_MN1,1));
        }
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {

  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnTick()
  {

  }
//+------------------------------------------------------------------+
 
Keith Watford:

Rubbish, that will fix the warning.

same Warnings. any ideas how to fix it. thanks in advance for taking time my issues

 
MikelDavao:

You haven't done anything!

We have given you the solution and yet you still have 

int s = MathAbs(NormalizeDouble(priceH,_Digits)-NormalizeDouble(priceL,_Digits))/_Point;

in your code.

Why ask for help and then ignore the help that you are given?????

 
int s=(int)(MathAbs(NormalizeDouble(priceH,_Digits)-NormalizeDouble(priceL,_Digits))/_Point);
In your image you have missed off the brackets.
 
Keith Watford:
In your image you have missed off the brackets.

WOW! I missed that thing (the brackets). how many hours today i'm always digging a solution in the google for that warnings and no to avail. Even your 1st instance of help I'm only adding the (int) that's why i am continue complaining the issues found.  Keith Watford i am very thankful of your help and support. As i compiled my source code this time of writing i got 0 errors, 0 warnings. Two thumbs Up to you. thank you very much.

 

the issues has been SOLVED! thanks to all who share there knowledge and time.