Hi Phy,
Sorry for the confusion, but teh script above is already within a function. If I placed return then it would only end the function and not the entire script. (Pls correct me if I am wrong..) What should I do in that case?
Thanks again!
Archael:
There is no exit function in MQL4. You need to return a specific value from the function (usually -1 for errors) and if in start() you detect that the function returned -1, just use "return()" in the start() function and execution will stop there.
.
Jon
I see.. thanks for your help! =)
Haha! Ingenius ;) But that would keep spamming your journal lol
I delete the logs regularly, no problem.

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
Real Quick Question... what is the script for an END function in MQL? Here's what I'm trying to do:
If(TotalOrders() == 12 && TotalProfit() >= TargetProfit) {what do I put here so that it won't continue processing the rest of the script?}
Computehistoricals();
EstimateNxtTarget();
Thanks!