Add a trailing stop to your expert – and other things

[YTLoad url=-LmxGXZIw0Q]

This is the third part in an introduction to writing expert advisors for MT4 and MT5.

Primarily this part will focus on adding a trailing stop to trades using the moving average cross expert example from the earlier videos. You should see the earlier videos for a full explanation, there is a link below.

This part will also introduce an include file to make sharing code between MT4 and MT5 easier and some minor changes to entry of stop loss and take profit.

If you are looking for a broker with good leverage, spreads and product range and want to help out our channel try OX Securities. We do receive commission from this broker.
Open an Account

How to run MQL4 or MQL5 code only one time for each bar
Introduction – Write your own expert for MT4 – MA Cross
Introduction – Write your own expert for MT5 – MA Cross
Know when the market is open in MT4 and MT5

Download the example code here


Leave a Comment

Scroll to Top