seems correct
prweza:
It still does not work. Basically im trying to close the two orders if total profit is greater than 0 is there a problem with my closing order function?
OK I think my problem is closing the two orders. I have two orders open one is buy and the other is a sell. i want to close both orders when the sum of all profits is greater than 0. I have used the sum of profit code above but it seems that only one order gets closed. Could someone let me know how to close both orders?
Thanks.
Post the code on how u close the order
Dua Yong Rew: Post the code on how u close the order
Please don't write "u" Please don't write ur - it's "you are" or "your" - MQL4 and MetaTrader 4 - MQL4 programming forum
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
I have got a code but it doesn't seem to work properly.
The EA opens 1 buy and 1 Sell trade of the same pair. I want the code to calculate the total profit of the two orders and return the result. I have got this function.
It doesn't seem to work. Any ideas what went wrong?
Thanks.
Thanks.