The QQE is a mysterious indicator that sometimes pops up in trading forums. Does it deserve a place alongside the more traditional momentum indicators like the RSI and CCI? Let’s add it to a trend following strategy to find out!
The complete strategy can be downloaded in the Free Strategies section.
What Is the QQE Indicator?
The Quantitative Qualitative Estimation (QQE) indicator is derived from Wilder’s famous Relative Strength Index (RSI). In essence, the QQE is a heavily smoothed RSI.
Both the QQE and traditional RSI are plotted below for the USDJPY.
Notice how the traditional RSI and the QQE’s smoothed RSI line follow price action with little lag. Unlike the traditional RSI though, the QQE contains an additional line – the slow trailing line. Its calculation is described below.
QQE Indicator Calculation
The calculation steps below use the default indicator values.
- Calculate the 14-period RSI.
- Obtain the smoothed RSI by taking the 5-period EMA of the RSI.
- Obtain the absolute value of the bar-to-bar change in the smoothed RSI.
- Apply a 27-period EMA, twice, to the values in step 3.
- Obtain the slow trailing line by multiplying the result of step 4 by 4.236.
Confused?
Don’t worry; just take the QQE to be a heavily smoothed RSI.
If the 4.236 value looks familiar, that’s because it’s used in Fibonacci sequences.
How Is the QQE Indicator Used?
The QQE shares many similar uses with the RSI. The following are a few common uses for the QQE:
1. Determine Trend Detection
Values above 50 indicate a bullish market, while values below 50 indicate a bearish market.
In this way, the QQE can serve as a trend filter. For example, long trades can only be taken when values are above 50, while short trades require values below 50.
2. Detect Overbought/Oversold Conditions
QQE values above 70 indicate overbought conditions, while values below 30 indicate oversold conditions.
Long trades can be taken when the QQE crosses above the 30 line, while shorts can be taken when the QQE crosses below the 70 line.
3. Detect Price & Momentum Divergence
Momentum often leads price. A divergence between price and the QQE may signal upcoming reversals.
In a bearish divergence, prices are setting higher highs while the QQE is setting lower highs. This may signal an upcoming bearish reversal.
In a bullish divergence, prices are setting lower lows, while the QQE is setting higher lows. A bullish reversal may be approaching.
4. Detect Short-Term Momentum
The QQE’s slow trailing line is obtained through further smoothing of the smoothed RSI line.
When the smoothed RSI line crosses above the slow trailing line, it indicates short-term momentum is to the upside, and long trades may be taken. Conversely, when the smoothed RSI crosses below the slow trailing line, short-term momentum is to the downside, and shorts may be more appropriate.
For the remainder of this post, we will use the QQE in this cross above/below fashion to generate entry signals. An obvious drawback of this approach is that a ranging market will generate lots of false entries.
To combat this, let’s not use the QQE indicator in isolation. We will instead combine it with a moving average trend following strategy.
Moving Average Trend Following Strategy
Numerous types of moving averages exist. Since simple and exponential moving averages have been tested everywhere, let’s try the triple exponential moving average (TEMA) instead.
There is often a trade-off between an indicator’s smoothness and its ability to respond quickly to price changes. Smooth indicators typically employ more price averaging, resulting in significant lag.
The TEMA attempts to get the best of both worlds by applying an exponential moving average (EMA) thrice, then applying the following formula to minimize lag:
The TEMA actually reacts faster to price changes than a simple moving average. This may make the TEMA a better choice if you want to quickly capture emerging trends, which we’ll try to do here.
Strategy Logic
A fast 20-period TEMA will be used together with a slower 40-period TEMA. Entry conditions for longs are below:
- 40-period TEMA is rising
- 20-period TEMA is above 40-period TEMA
- Price closes above 20-period TEMA
- Today is not Monday
Conditions for short entries are the opposite.
Condition 1 is important since we only want to trade in the direction of the longer-term trend. A rising TEMA indicates the market is in an uptrend, while a falling TEMA indicates a downtrend.
Conditions 2 and 3 address the market’s short-term momentum. Sustained trends usually contain strong momentum at the start. It makes sense to enter the market only when strong momentum is present.
Condition 4 addresses trading volumes. Forex markets typically have the lowest trading volumes on Monday. Since we need high volumes to maintain the trend, we will avoid entries on Monday.
Here’s how the market looks like when all the above conditions are met:
We will place a buy stop at the previous candle’s high, and a sell stop at the previous candle’s low.
A basic 120-pip stop loss and trailing stop will be added to protect our downside and improve profit retention.
Programming the Strategy in AlgoWizard
The strategy was quickly programmed in AlgoWizard.
The parameters FastPeriod/SlowPeriod and StopPips were used for the TEMA lookbacks and stop loss distance, respectively. You can download the strategy and optimize these parameters if you wish.
TEMA Trend Following Strategy Results
The strategy was backtested on the 1-hour USDJPY over the past 10 years. It is no secret that JPY pairs tend to trend well.
Backtest results are certainly not up to par, although this is unsurprising. I find that moving averages used in isolation rarely produce good results. The low win rate of 37% indicates we need to minimize the number of weak entries.
An example of a weak entry is shown below, where the ranging market still managed to satisfy the entry conditions above.
Hopefully the QQE indicator will help us filter out such entries.
Adding the QQE Indicator
We will use the QQE in the cross above/below fashion described above. Sometimes, looking for confluence among conceptually different indicators can improve results. Perhaps the momentum-based QQE can complement our time-based TEMA.
An additional QQE entry condition was added to AlgoWizard.
Value1 above refers to the smoothed RSI line, while Value2 refers to the slow trailing line.
Default QQE parameters were used.
The RSI’s lookback period (RSIPeriod) and its smoothing period (sF) can be later optimized in MT4 if you wish. Reducing these values will make the QQE react faster to prices.
Now let’s redo the backtest.
QQE & TEMA Trend Following Strategy Results
How’s that for an improvement? Both the profit factor and return/max drawdown ratio have improved significantly.
Win rate has also improved from 37% to 44%, and the average number of bars per trade has increased from 142 to 181. This is probably because many whipsaw trades in ranging markets were avoided.
Wrapping Up
So the mysterious QQE indicator deserves your consideration after all. Since it consists of two lines – the smoothed RSI and the slow trailing line, the QQE is more versatile than one-line momentum indicators like the RSI and CCI.
Using the QQE in a cross above/under manner demonstrated above can help pick out high-momentum entries. Whichever way you choose to use the QQE, I recommend complementing it with trend-detection indicators.
The complete QQE TEMA trend following strategy can be downloaded here. If you wish, you can optimize the lookback periods for the TEMA and the QQE. If you trade a lower timeframe, perhaps longer lookback periods will be useful in combating market noise.
0 Comments