MT4 - Buy & Sell

 

Hi all,

I am using Scorpion's HMA EA on mt4 and i need to add the following to the EA.

Lets say i have a BUY position, when I close the position (either manually or tp) the next order should be a SELL and vice versa.

Basically I want to avoid a position where if I close a BUY position EA should not trigger another BUY but should wait for a SELL condition to be met.

How can I code this into my EA?

Thank you

Reason: