yes change OP_BUY to OP_SELL and vice versa and also swap TP and SL and ASK and BID.
If you have the source code, then you can change the instructions to reverse the strategy; otherwise no! You will however, need to learn more about coding and trading.
EDIT: Just changing order types and stops, will not be sufficient. There are usually other factors involved!
Of course it will be enough to
Dale Forsyth:
reverse the Buy/Sell orders that are executed by an Expert Advisor
No it is not enough, irrespective of it being MQL4 or MQL5! There are other factors to consider:
- Just exchanging the S/L and T/P will affect the R:R.
- Maybe the S/L is based on an indicator (such as a MA or a PSAR). You cant just reverse those conditions!
- Maybe there are trailing-stops to consider.
- Maybe .... (the list can be quite large).
In conclusion, I repeat: Just changing order types and stops, will not be sufficient. There are usually other factors involved!
And i repeat
Of course it will be enough to
to reverse the Buy/Sell orders that are executed by an Expert Advisor
We do not have code examples here so there is very little to discuss.
Assuming we are talking about the syntax in it's most simplest form, the expert will open opposing orders when these variables are swapped.
What other things the expert handles is another case, but the orders will be reversed, and it has got nothing to do with bananas.

- 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,
Is there any simple way that i am able to reverse the Buy/Sell orders that are executed by an Expert Advisor? I am new to both trading and coding though I am able to understand things reasonably well.
Any help with this would be greatly appreciated.
Thank you.
Dale.