IF Then code for MT4
I need some help. I want to setup a If then type of situation.
I'm trying to setup a situation where I get a signal from a indicator to buy or sell then I want another set of conditions met before a trade is open regardless of how many candles it takes to happen. I know how to write a if situation but not a if then, if that's possible. Any help would be appreciated or if you can direct me to a link where I can read up in this.
Thanks
//--- The else part refers to the second if operator: if(x>1) if(y==2) z=5; else z=6; //--- The else part refers to the first if operator: if(x>l) { if(y==2) z=5; } else z=6; //--- Nested operators if(x=='a') { y=1; } else if(x=='b') { y=2; z=3; } else if(x=='c') { y=4; } else Print("ERROR");
- www.mql5.com
I need some help. I want to setup a If then type of situation.
I'm trying to setup a situation where I get a signal from a indicator to buy or sell then I want another set of conditions met before a trade is open regardless of how many candles it takes to happen. I know how to write a if situation but not a if then, if that's possible. Any help would be appreciated or if you can direct me to a link where I can read up in this.
Thanks