I wrote an another indicator for Meta Trader for detecting extremely strong trends, that are supported by institutional traders. The indicator is based on the FX-Ed Trend technique described in the previously mentioned book Forex Patterns & Probabilities: Trading Strategies for Trending & Range-Bound Markets by Ed Ponsi. The technique makes use of a fact, that institutional traders are known to create support and resistance at the 10-day EMA. The indicator is intended to be used, and works only on a daily timeframe.
Strong trends are detected by checking if exponential moving averages are aligned in the proper order (as discussed in my other post), and the 10-day EMA acts as a support (for an uptrend) or resistance (for a downtrend) for a period of at least certain number of bars (specified by the external variable signalMinBars). It is 10 by default (as suggested by the author), but it can be changed. I have been experimenting with less restrictive filter (i.e. when the number of required bars is less than 10).
1. EMA(10) > EMA(20) > EMA(50) > EMA(200)
2. FOR each i = 0..signalMinBars – 1: Low[i] > EMA(10, i)
1. EMA(10) < EMA(20) < EMA(50) < EMA(200)
2. FOR each i = 0..signalMinBars – 1: High[i] < EMA(10, i)
where Low[i] and High[i] denote the lowest and highest prices of the bar i, and EMA(10, i) is the value of the 10-day EMA calculated for the same bar.
Once such trend is detected, a trade opportunity to buy or sell comes when the price falls to, or rises towards its 10-day EMA.
For every bar that satisfies either group of conditions, little arrow is shown pointing upward or downward depending on the trend direction. In addition, a bigger arrow is shown in the upper left corner that corresponds to conditions calculated for the current (zero) bar (see Fig. 1-3 below).
The indicator also shows a stop loss level for every bar (orange dots), either below or above the 10-day EMA (depending on the trend direction). The stop loss is based on volatility and calculated using the the following formulas:
EMA(10) – ATR(14, i) / 2 (for an uptrend)
EMA(10) + ATR(14, i) / 2 (for a downtrend)
where ATR(14, i) is the 14-period average true range calculated for the bar i, that is either substracted from or added to the 10-day EMA.
According to the above technique, the stop loss level should be updated when the current candle closes. The stop loss level shown by the indicator is intended to be used to determine the stop loss placement when opening a new position (using the stop loss level that corresponds to the zero bar), and also when updating the stop loss for the existing position – at the time when the current candle closes (using the stop loss level that corresponds to the closed candle).
Since the indicator (unlike a Meta Trader’s expert advisor) has no knowledge about when (or if) a position is opened, calculation of the stop loss level for the given bar doesn’t take this fact into consideration. This is the reason for which the stop loss level shown by the indicator sometimes may appear to be lowered in an uptrend or moved higher in a downtrend. It is important to remember that once a position has been opened, the stop loss level should be updated in the direction of the open position only, i.e. it should never be lowered for a long position or raised for a short postion.
The following (Fig. 1) is an example of a very strong downtrend being detected on a daily EUR/USD chart (signalMinBars is 10):
The downtrend was detected 3 times (see 3 little arrows pointing downward). There are a few possible entry points shown for illustrative purposes. The first entry has quickly become unprofitable (with a 101 pips loss – assuming that a short position was entered exactly when the price touched the 10-day EMA). However, if a short position was entered at the 10-day EMA, just after the third time the downtrend has been detected (one bar after the third arrow), it would give a total profit of 600 pips 12 days later (1.3708 – 1.3108 = 0.0600).
Fig. 2 shows the same chart where signalMinBars was reduced to 5, and as a result more signals were given.
Fig. 3 shows a situation, where a strong downtrend has been detected for the current (zero) bar (signalMinBars is 1). Notice a bigger arrow in the upper left corner pointing downward.
Finally, another example (Fig. 4) illustrates that the indicator only works on a daily timeframe, where institutional traders are known to create support or resistance at the 10-day EMA.
The source code of the indicator is available here.