A smoothed RSI wrapped in an ATR-style trailing band — a popular but often mystified momentum tool, demystified.
QQE (Quantitative Qualitative Estimation) is a momentum indicator that circulated first as an MT4 script and later spread to TradingView through many ports. Despite the imposing name, there is nothing especially 'quantitative-qualitative' about it: QQE is a smoothed RSI plus a volatility band computed from the RSI itself. It plots the smoothed RSI line together with a trailing level that ratchets behind it, in a separate pane on the familiar 0-100 RSI scale. The name has no documented technical meaning, and the indicator's original author and exact reference formula are murky — different MT4 and Pine ports disagree in small details, which matters if you are comparing values across platforms. Like every oscillator, QQE is a transformation of past prices: it describes momentum that has already occurred and predicts nothing. This page is educational only, not financial advice, and all trading carries risk of loss.
QQE is built in three stages. First, a standard RSI is calculated (commonly 14 periods) and smoothed with a short EMA (commonly 5 periods), producing a less jagged RSI line. Second, QQE measures the volatility of that smoothed RSI the same way ATR measures the volatility of price: it takes the absolute bar-to-bar change of the smoothed RSI, then smooths that series twice with a Wilder-length EMA (2 × RSI length − 1, so 27 by default). Multiplying this 'ATR of RSI' by a factor — the widely copied default is 4.238 — gives a dynamic band width. Third, that width is used to build a trailing level: a lower band (smoothed RSI minus the width) that only ratchets upward while the RSI holds above it, and an upper band (smoothed RSI plus the width) that only ratchets downward while the RSI holds below it. The active band flips when the smoothed RSI crosses it, exactly like a volatility trailing stop applied to an oscillator instead of price. Everything in QQE is derived from RSI, so it inherits RSI's lag and adds more smoothing on top.
The most-copied defaults are RSI length 14, RSI smoothing EMA 5, a Wilder smoothing length of 2 × 14 − 1 = 27 for the band calculation, and a band multiplier of 4.238. Some versions use RSI length 6 with a wider factor for a faster line, and the popular 'QQE MOD' variant layers two QQE calculations with different settings. None of these numbers is derived from theory — they are conventions inherited from the original MT4 script — so treat them as adjustable smoothing/width trade-offs, not calibrated constants.
//@version=6
indicator("QQE Bands Example", overlay = false)
rsiLen = input.int(14, "RSI Length", minval = 1)
smoothLen = input.int(5, "RSI Smoothing", minval = 1)
qqeFactor = input.float(4.238, "QQE Factor", minval = 0.1, step = 0.001)
wilderLen = rsiLen * 2 - 1
rsiMa = ta.ema(ta.rsi(close, rsiLen), smoothLen)
// 'ATR of RSI': double-smoothed absolute change of the smoothed RSI
rsiTr = math.abs(rsiMa - rsiMa[1])
dar = ta.ema(ta.ema(rsiTr, wilderLen), wilderLen) * qqeFactor
// Ratcheting trailing bands around the smoothed RSI
longBand = 0.0
shortBand = 0.0
longBand := rsiMa > nz(longBand[1]) and rsiMa[1] > nz(longBand[1]) ? math.max(nz(longBand[1]), rsiMa - dar) : rsiMa - dar
shortBand := rsiMa < nz(shortBand[1]) and rsiMa[1] < nz(shortBand[1]) ? math.min(nz(shortBand[1]), rsiMa + dar) : rsiMa + dar
plot(rsiMa, "Smoothed RSI", color = color.blue)
plot(longBand, "Long Band", color = color.new(color.green, 40))
plot(shortBand, "Short Band", color = color.new(color.red, 40))
hline(50, "Midline", color = color.gray)Pro tip: Before using any script labelled 'QQE', read its source and confirm which variant it implements — the RSI length, smoothing lengths, and the 4.238 factor differ between ports, and 'QQE MOD' adds components the original never had. Once you know the exact formula, you can reason about its lag honestly: it is a doubly smoothed RSI with a trailing band, nothing more. This is educational context only, not advice — no indicator is predictive, and all trading carries risk of loss.
Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.