Warning : Return value of order should be checked

 

I am getting 28 warning in my code. My EA is working fine on live market. I am not sure what does this warning mean and why i am getting it.


For example :

Warning : return value of 'OrderSelect' should be checked    JS23.mq4    794    7

double CalculateTradeFloating(int CalculateTradeFloating_Magic)
  {
   double CalculateTradeFloating_Value = 0;
   for(int CalculateTradeFloating_i = 0; CalculateTradeFloating_i < OrdersTotal(); CalculateTradeFloating_i++)
     {
      OrderSelect(CalculateTradeFloating_i, SELECT_BY_POS, MODE_TRADES);
      if(OrderSymbol() != Symbol() || (OrderType() != OP_BUY && OrderType() != OP_SELL))
         continue;
      if(CalculateTradeFloating_Magic == OrderMagicNumber())
         CalculateTradeFloating_Value += OrderProfit() + OrderSwap() + OrderCommission();
     }
   return (CalculateTradeFloating_Value);
  }

This code look fine and it working great in Live Market but still it giving a warning.


Should i ignore this? or if it important to fix, how can i fix this?

 

Check your return codes, and report your errors (including market prices and your variables). Don't look at GLE/LE unless you have an error. Don't just silence the compiler (MT5 / MT4+strict), it is trying to help you.
          What are Function return values ? How do I use them ? - MQL4 programming forum (2012)
          Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles (2014)

Reason: