After reading my online buddy’s blog entry about MAE/MFE analysis, i thought it’d be worth posting this note about how we calculate stop loss level based on ATR (Average True Range).
Using a fix n pips distance for SL and/or TP is the simplest way a trader would do. But sometimes, the market would perform differently from time to time. Sometimes the market moves wildly with longer candle body, sometimes it moves very calmly with a very low volatility. A fix n pips SL/TP wouldn’t fit into the always changing market’s volatility behavior.
Moreover, we surely want to test a strategy in several different currency pairs. And because each pair would have different volatility behavior, using an ATR-derived SL/TP level would provide us with a system that can literally self-fit into any kind of volatility behavior.
These are some sample lines from our strategy. It calculates ATR first:
atr_SL = iATR(Symbol(), 0, prm_normalization_atr_period, 1) * prm_SL2atr_ratio;
and then this atr_SL value is used to calculate SL distances as follows:
stoploss = NormalizeDouble(Ask + atr_SL, Digits);
so the value of the SL distance would be based on ATR, not a fix n pips.