Need help to code an EA.

 

Hello MT4 Programmer,

How to code EA using stoploss to switch the trend?. Appreciate any help.

Thank you in advance.

Reason: