You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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