- When you post code please use the SRC button! Please edit your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum string FindOpType(int k){ if(k == 1) return("SELL"); if(k == 0) return("BUY"); ********Error is at this line*********** What value are you returning here? }
- When you post code please use the SRC button! Please edit your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum
Just tried to cut and paste the code into the SRC box and it said please enter the text of your post...
As for what value im returning there, its an EA that I didn't write that im trying to stich together with this EA that i have modified, so im not sure what value this is supposed to be returning in all honesty!
Just tried to cut and paste the code into the SRC box and it said please enter the text of your post...
As for what value im returning there, its an EA that I didn't write that im trying to stich together with this EA that i have modified, so im not sure what value this is supposed to be returning in all honesty!
in fact, just noticed i hadn't put Return(0) in, this removes the error but the EA for moving the stop loss to break even that works seperately doesn't seem to work when i combine it with this one. arrgghh!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi All,
I've been practicing/learning MQL4 by modifying and tweaking a few example EA's to make this one and just have this one error left that I can't seem to spot the cause of! I don't suppose anything stands out to any of you does it?
The error is: "not all control paths return a value" and is on line 213.
Thanks in advance for any pointers!!