Download MetaTrader 5
To add comments, please log in or register
Find out how to add a video in the messages editor
Agent86
915
Agent86 2014.11.26 15:57 
MathPower() seems fairly straight forward

I'm getting "empty controlled statement found"

if(mlots >= MathPow(LotSize,3));
JC
1395
JC 2014.11.26 16:28  
Agent86:
if(mlots >= MathPow(LotSize,3));

Not related to MathPow; it's the semi-colon in if(mlots >= MathPow(LotSize,3));

It's not valid syntax for an if statement. Same result if you write something like   if(true);    

MT4 interprets this as "if (condition) then... do nothing". If that's really want you want to write, for some reason, then the syntax which is acceptable to MT4 is  if (condition) {}

Agent86
915
Agent86 2014.11.26 17:54  
jjc:

Not related to MathPow; it's the semi-colon in if(mlots >= MathPow(LotSize,3));

It's not valid syntax for an if statement. Same result if you write something like   if(true);    

MT4 interprets this as "if (condition) then... do nothing". If that's really want you want to write, for some reason, then the syntax which is acceptable to MT4 is  if (condition) {}

Thanks got it worked out

But now that it's working, I figured out I don't want to use that.
/
To add comments, please log in or register