
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
I am like super new to programing mql4.
I am trying to make an EA, that will close say a buy order and simultaneously open a short position.
I have the following functions.
then in my Event function I have called it as follows
I ended up inserting the CloseXXXX functions both in long() and in Short() then again in the Event function.
But still its not closing.
if I increase if (total < 5) to (total <9999) i will have both buys and sells open simultaneously.
What is wrong with my code.