


The ATR indicator is a technical analysis indicator that shows us the volatility of the market over a specific period. We can solve this by using the ATR indicator. 50 pips is definitely not a one size fits all value. Additionally, if we want to trade this expert advisor on the 10-minute chart, it will obviously need a different stop than when we trade this on the daily charts. This is fine to start with, but it doesn’t take into account the volatility of the market.

Up until now, we’ve always created a stop loss of 50 pips (or 500 points), like this: Let’s refresh what we’ve been doing so far. Let’s see how we can add this to our Wall-E expert advisor! In other words, we will change the lot size per trade to reflect our desire to use a 1% stop loss. We do this using dynamic position sizing. When we use dynamic stop loss distances, we still want to keep our risk per trade the same. That might often be ok but what if you want a dynamic stop loss? In order to better reflect the market dynamics, we could use a volatility indicator such as ATR (Average True Range) to determine our stop-loss. However, up until now, we’ve always used a fixed stop loss of 50 pips. We created a fully functioning EA that can make buy and sell orders, and also can trail our stops. We’ve been doing pretty well with our expert advisor. Welcome to the fifth part of our MetaTrader4 Expert Advisor course! If you haven’t done so, please have a look at the previous instalments. Part 5: MT4 EA Forex Course: ATR stops and position sizing (this page).Part 4: MT4 EA Forex Course: buy and sell.Part 3: MT4 EA Forex Course: trailing stops.Part 2: MT4 EA Forex Course: our first forex expert advisor.
