Free: indicator teardowns, a repaint checker and open-source scripts. No buy/sell signals, ever.

Taught to TradeSystems over signals.

Explainers / QQE MOD

QQE MOD, explained from its source

QQE MOD by Mihkel00 is one of the most-boosted free oscillators on TradingView. It shows grey, blue and red columns around a zero line with a white line weaving through them, and many people read a blue bar as "go" and a red bar as "stop". This page explains it from the published source code (the current Pine v6 version). The short version: QQE MOD is a smoothed RSI with Supertrend-style bands drawn around it, and the coloured bars mean the RSI is above or below a narrow band.

The formula

  1. Take a 6-bar RSI of the close, then smooth it with a 5-bar EMA. Call it the smoothed RSI.
  2. Measure how much the smoothed RSI moved since the last bar (always positive). Average that with an 11-bar EMA. This is an "average true range" of the RSI itself.
  3. Multiply by the QQE Factor and draw a band that distance above and below the smoothed RSI.
  4. The bands trail, exactly like Supertrend does with price: the lower band can only rise while the RSI stays above it, the upper band can only fall while the RSI stays below it. When the RSI crosses the opposite band, the trend flips and the other band takes over. The active band is the trend line.
  5. Everything is drawn minus 50, so the RSI's 50 line sits at zero.

smoothed RSI = EMA5(RSI6(close)), distance = Factor x EMA11(|change in smoothed RSI|), bands = smoothed RSI -/+ distance

If you know Supertrend, you already know step 4. QQE MOD applies it to RSI instead of price.

Primary and Secondary: the same RSI twice

The script calculates all of this twice, as a Primary (factor 3.0) and a Secondary (factor 1.61). Both use RSI length 6, smoothing 5 and the close by default, so the two RSI lines are identical. Only the trend lines differ, because the factor sets how far away the bands sit.

The white line you see is the Secondary trend line. The Primary trend line is never drawn. Its only job is to feed a Bollinger Band (50 bars, 0.35 standard deviations) that the blue and red bars are tested against.

What the blue and red bars mean

So a blue bar says "the fast, smoothed RSI is in the upper part of its recent range". It does not say anything about what price does next.

In a simulation on pure random-walk prices (200,000 bars, nothing to predict), about two bars in three were blue or red, a new colour run started about every 13 bars, and the white line flipped about every 8 bars. Making the simulated volatility jump between calm and wild periods changed nothing, because RSI does not care about the size of moves. Coloured bars are the normal state of this indicator, not a rare event.

Does QQE MOD repaint?

Not on closed bars. It uses only the current and past bars: no higher-timeframe request, no future data, no offset.

The live bar does change. The RSI moves with every tick until the bar closes, so a column can turn blue mid-bar and be grey or red at the close. The script has no closed-bar check. Its only alerts fire when the RSI crosses 50; there is no alert for the blue or red bars, so anyone alerting on those is using a modified copy. For the full picture see what repainting is, or paste a script into the repaint checker.

Settings, honestly

There is no best setting. Faster settings colour more bars and flip more often; slower ones flip less and turn later. That trade-off does not go away.

QQE MOD vs plain RSI

Underneath, it is a 6-bar RSI smoothed by a 5-bar EMA. The bands and the Bollinger test decide when to colour it, but the line doing the work is RSI. If you already watch RSI, QQE MOD mostly tells you the same story with colour added. See the RSI explainer.

Where it fails

Also explained

Educational content only. Not financial advice. Nothing here is a recommendation to buy or sell anything. Original script by Mihkel00 on TradingView; this page explains its published source and quotes no code.

Also explained: Repaint checker, VWAP, Supertrend, RSI, UT Bot Alerts, Nadaraya-Watson Envelope, Squeeze Momentum, What is repainting on TradingView?, Is TradingView backtesting accurate?, Chandelier Exit, WaveTrend Oscillator, Pivot highs and lows, Hull Suite, Range Filter, Twin Range Filter, HalfTrend, ZigZag++, SSL Hybrid, CM MacD Ultimate MTF, Volume Profile / Fixed Range, ADX and DI, Support Resistance Channels, Market Structure Break & Order Block, Order Block Finder, Pivot Point SuperTrend, Trendlines with Breaks [LuxAlgo], Divergence for Many Indicators, TradingView script selling terms, Support and Resistance Levels with Break, Liquidity Swings [LuxAlgo], Pine Script errors, Breakout Probability (Expo), Did ChatGPT or Claude write your Pine Sc, Lorentzian Classification, SuperTrend AI (Clustering), Machine Learning Adaptive SuperTrend, Dynamic Swing Anchored VWAP, Support and Resistance Power Channel by , Support and Resistance (High Volume Boxe, Trendline Breakouts With Targets by Char, Breakout Finder by LonesomeTheBlue

Next steps

  • Get a script fixed. Compiles but behaves differently live, or changes after a reload? In a Pine Script Audit, an AI model reads every line and writes a report on what to fix for $49, or also fixes those problems for $149. It cannot prove a script is safe.
  • Check your own script. Paste its source into the free repaint checker. It runs in your browser and flags known patterns.
Subscribe to the Teardown Letter: $19/moBack to Taught to Trade

No TradingView account yet? This affiliate link gives you a $15 coupon toward a paid plan, and we earn a commission if you buy one. The free plan is enough to follow this page.