Look for function OrderCloseBy()
Here is the scripts I use NOTE: open them in the editor after you have installed them so you can set your tp and so on there is directions in each code.
Files:
scripts.zip
24 kb
doctort wrote >>
I am trying to create code that will close one position and open the opposite position (ie close long and open short or vice versa) on the same technical signal. I can get a position to open if no other position is open and i can get it to close if a position is already open. I cannot get the ea to open a position then close it and then subsequently open the opposing position.
Any suggestions??
THanks
try "OrderCloseBy()", this should work
thanks!!
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 trying to create code that will close one position and open the opposite position (ie close long and open short or vice versa) on the same technical signal. I can get a position to open if no other position is open and i can get it to close if a position is already open. I cannot get the ea to open a position then close it and then subsequently open the opposing position.
Any suggestions??
THanks