Download MetaTrader 5

Build 340 - Float/Double Problem

To add comments, please log in or register
cs0amc
113
cs0amc  

Hi, Please can someone tell me why the float and double results aren't being printed? Am I missing something obvious? The values don't seem to be returned from the function correctly. My EA has not worked since the upgrade on Saturday and I think this is the cause..


   int   GetInteger(int option);

   float GetFloat(int option);

   double GetDouble(int option);

int TestProg::GetInteger(int option) {

   switch(option) {

      case 1: return 1;

      case 2: return 2;

      case 3: return 3;

      default: return 0;

   }

}


float TestProg::GetFloat(int option) {

   switch(option) {

      case 1: return 1;

      case 2: return 2;

      case 3: return 3;

      default: return 0;

   }

}


double TestProg::GetDouble(int option) {

   switch(option) {

      case 1: return 1;

      case 2: return 2;

      case 3: return 3;

      default: return 0;

   }

}


      Print(GetInteger(1));

      Print(GetInteger(2));

      Print(GetInteger(3));


      Print(GetFloat(1));

      Print(GetFloat(2));

      Print(GetFloat(3));

      

      Print(GetDouble(1));

      Print(GetDouble(2));

      Print(GetDouble(3));


NE 0 TestProg (GBPUSD,H1) 16:54:38 2011.01.07 00:00:00   1

IM 0 TestProg (GBPUSD,H1) 16:54:38 2011.01.07 00:00:00   2

HE 0 TestProg (GBPUSD,H1) 16:54:38 2011.01.07 00:00:00   3

QL 0 TestProg (GBPUSD,H1) 16:54:38 2011.01.07 00:00:00   0.0

CG 0 TestProg (GBPUSD,H1) 16:54:38 2011.01.07 00:00:00   0.0

MO 0 TestProg (GBPUSD,H1) 16:54:38 2011.01.07 00:00:00   0.0

FH 0 TestProg (GBPUSD,H1) 16:54:38 2011.01.07 00:00:00   2.868201517097595e-316

QO 0 TestProg (GBPUSD,H1) 16:54:38 2011.01.07 00:00:00   2.868204926150551e-316

RR 0 TestProg (GBPUSD,H1) 16:54:38 2011.01.07 00:00:00   2.868208335203508e-316

Thanks    

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Symbol Properties - Documentation on MQL5
Alexey Da
Moderator
6635
Alexey Da  
Thanks, we will check it.
To add comments, please log in or register