Modified Momentum QQE-ZigZag [Non Repaint During Candle Building]
Jan 25, 2022

The Modified Momentum QQE-ZigZag [Non Repaint During Candle Building] tool identifies pivot points and market structure trends by combining a non-repainting QQE mechanism with ZigZag logic. It is specifically engineered to ensure that signals do not vanish or flicker during the candle-building process, providing stable real-time pivot detection and trend visualization.
Usage
The Usage section focuses on interpreting the visual cues and market structure identified by the script.
- ZigZag Pivot Points: The indicator plots lines connecting High and Low pivots. Green lines indicate bullish continuation (Higher Highs/Higher Lows), while Red lines indicate bearish continuation (Lower Lows/Lower Highs).
- Divergence Detection: The script identifies discrepancies between price action and the internal MTF RSI.
- Positive Divergence (Yellow Labels): Occurs when price makes a lower low but the RSI makes a higher low.
- Negative Divergence (Purple Labels): Occurs when price makes a higher high but the RSI makes a lower high.
- Supertrend Integration: Users can enable a modified Supertrend overlay that can optionally incorporate ZigZag pivot data into its calculation to filter out noise and identify broader trend shifts.
Details
The script addresses the common "repainting" issue found in many momentum-based ZigZag indicators. While many indicators appear stable on historical data, they often flicker (signal appears and disappears) while the current candle is still open.
This implementation achieves real-time stability by:
- Using a modified QQE (Quantitative Qualitative Estimation) calculation that utilizes the
HighandLowvalues as sources for the RSI, rather than just theClose. - Ensuring that once a crossover or crossunder occurs within the candle, the state is held to prevent the signal from disappearing before the candle closes.
- Implementing a Multi-Timeframe (MTF) RSI smoothing technique (Cutlers or Wilders) to provide a more robust momentum baseline.
Settings
ZigZag
- Rsi-Type: Choose between Cutlers and Wilders RSI calculation methods.
- Rsi-Len: Sets the base length for the RSI calculation.
- Mtf-Mult: A multiplier for the RSI length to simulate higher timeframe resolutions.
- QQE-Mult: Adjusts the distance between the QQE line and the RSI, functioning similarly to a Supertrend multiplier.
- Smooth: Applies an EMA smoothing to the RSI input.
Divergence / Convergence
- Div-Src: Select the source used for divergence calculations.
- PPs-Back: Determines how many pivot points back the script looks to identify divergences.
- Limits: Adjustable thresholds for Divergence (Top/Bot) and Convergence (Top/Bot) to filter signals based on RSI extremes.
Supertrend
- Show-Supertrend: Toggles the visibility of the Supertrend ribbon.
- Ma-Len / Ma-Type: Controls the length and type (SMA, EMA, HH/LL) of the moving average used as the Supertrend base.
- Include-ZigZag: When enabled, the Supertrend calculation incorporates ZigZag pivot data for trend detection.
FAQ
How do I access Modified Momentum QQE-ZigZag [Non Repaint During Candle Building]?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Why does the indicator look different on historical data vs. real-time?
The calculation uses specific price extremes (High/Low) to ensure non-repainting in real-time. Because the exact timing of these extremes within a single historical bar cannot always be determined, real-time testing is recommended for the most accurate performance evaluation.
Can this be used for automated backtesting?
Due to the logic required to prevent real-time repainting, standard TradingView backtesting on historical candles may not perfectly reflect the real-time execution. It is best used for discretionary trading or real-time forward testing.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

