SuperTrend + Relative Volume (Kernel Optimized)

Feb 24, 2025

Static chart image
Volume Based
Signals
Moving Averages
Volatility

The SuperTrend + Relative Volume (Kernel Optimized) indicator provides a statistical approach to trend following by combining the standard SuperTrend calculation with Kernel Density Estimation (KDE) applied to relative volume. This tool aims to filter trend breaks by estimating the probability that a specific price move is supported by significant volume participation.

Usage

The indicator can be used to identify potential trend reversals and continuations with an added layer of volume-based confirmation.

  • Trend Identification: The SuperTrend line changes color and direction based on price action relative to the ATR-calculated threshold.
  • KDE % Interpretation: When a trend break occurs, the script calculates a KDE percentage. A high KDE % suggests the break is supported by historical volume patterns, increasing the likelihood of a sustained trend shift. Conversely, a low KDE % suggests the break may lack sufficient volume support.
  • Signal Filtering: Users can enable an "Activation Threshold" to only trigger directional changes when the KDE % exceeds a specific level.
  • Visual Transparency: The indicator uses a gradient system where the transparency of the trend cloud adjusts based on the KDE probability, allowing traders to visually gauge the strength of the volume confirmation.

Details

The script executes a multi-step process to generate its outputs:

  1. SuperTrend Core: It utilizes the standard ATR-based logic to determine bullish or bearish trend states.
  2. Relative Volume Tracking: On every trend break, the script logs the relative volume (current volume vs. an EMA of volume).
  3. Kernel Density Estimation: The logged volume data is processed using a Gaussian kernel. This builds a probability density function that represents the distribution of volume during historical trend breaks.
  4. Probability Mapping: For the current break, the script maps the current relative volume against the KDE array to determine its percentile (KDE %), providing a normalized measure of how "significant" the current volume is compared to past successful breaks.

Settings

SuperTrend

  • ATR Length: The lookback period used for the Average True Range calculation.
  • Multiplier: The factor applied to the ATR to set the distance of the SuperTrend line from the price.
  • SuperTrend Max/Min Opacity: Controls the transparency range of the trend cloud based on volume probability.

KDE

  • Bandwidth: Controls the smoothness of the KDE probability curve.
  • Nº Bins: Determines the precision of the KDE calculation; higher values increase detail but require more data.
  • KDE Threshold %: The minimum probability required to consider a volume breakout significant.
  • Relative Volume Length: The period used to calculate the relative volume for the KDE model.
  • Enable Activation Threshold: When toggled, trend changes only occur if the KDE % is above the specified threshold.

FAQ

How do I interpret the KDE Labels? The labels appear during trend breaks to show the statistical significance of the volume accompanying the move. A higher percentage indicates that the current volume is high relative to previous trend-reversal points.

Why am I seeing an error table about "Not enough data"? KDE requires a collection of historical data points to build a valid probability distribution. If the chart has too few SuperTrend breaks, you may need to increase the chart history or lower the "Nº Bins" setting.

How can I access this tool? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free access on the following platforms
tradingviewSymbolTradingView
ninjatraderNinjaTrader
metatrader4MetaTrader 4/5
thinkorswimThinkorswim

Unlock Unlimited Access to the LuxAlgo Library

Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.

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.