All indicators

Triangular Hull Moving Average

Mar 31, 2025

Static chart image
SignalsDashboardMoving AveragesVolatility

The Triangular Hull Moving Average indicator provides a responsive, triple-smoothed trend-following system that combines low-lag price filtering with dynamic volatility visualization to identify market reversals.

Usage

The Usage section describes how the script can be used to identify trends and execute trades. This tool serves as both a visual trend filter and a signal generator.

Trend Identification

The script utilizes a Triangular Hull Moving Average (THMA) to determine market direction. When the THMA value is higher than its value from two bars ago, the trend is considered bullish (green). When it is lower, the trend is considered bearish (red).

Volatility Visualization

By enabling the Volatility setting, the chart displays custom candles where the wicks represent market expansion and contraction.

  • Expanding Wicks: Indicate increasing market volatility, often associated with strong breakouts or high-momentum moves.
  • Contracting Wicks: Indicate decreasing volatility, suggesting consolidation or a potential trend exhaustion.

Trade Signals

The indicator plots triangle shapes to mark momentum shifts:

  • Bullish Signal: A triangle appearing below the price indicates the THMA has crossed above its previous value, suggesting a long entry.
  • Bearish Signal: A triangle appearing above the price indicates the THMA has crossed below its previous value, suggesting a short entry.

Details

The script is built upon the concept originally designed by BigBeluga. It implements a specific variation of the Hull Moving Average to achieve triple-smoothing, which significantly reduces the lag typically found in standard moving averages.

THMA Calculation

The THMA is calculated using a combination of Weighted Moving Averages (WMA). The formula applies a WMA to the difference between a faster WMA and a slower WMA, then smooths the result again: thma(_src, _length) => ta.wma(ta.wma(_src, _length / 3) * 3 - ta.wma(_src, _length / 2) - ta.wma(_src, _length), _length)

Dashboard

A live dashboard in the bottom-right corner provides real-time data on the current trend direction and a normalized volatility percentage. This allows for quick confirmation of market conditions without analyzing individual candle wicks.

Settings

  • Length: Sets the lookback period for the THMA calculation. Higher values produce smoother lines, while lower values increase responsiveness.
  • Source: Determines the price data used for the THMA (e.g., Close, Open, HL2).
  • Volatility: Toggles the visibility of the volatility-based candle overlays.
  • Volatility Length: Sets the lookback period for the HMA-based volatility calculation.
  • Up Color: Sets the color for bullish trend segments and signals.
  • Down Color: Sets the color for bearish trend segments and signals.
  • Trade Direction: Filters signals based on preference:
    • Only Long: Only executes and displays bullish entries.
    • Only Short: Only executes and displays bearish entries.
    • Long & Short: Executes both directions.

FAQ

How do I interpret the volatility wicks? The wicks are based on a Hull Moving Average of the high-low range. Larger wicks relative to the candle body suggest that the current price volatility is high, while smaller wicks suggest a quiet market.

What makes the THMA different from a standard HMA? The THMA uses a triple-smoothing logic specifically designed by BigBeluga to provide a "faster" reaction to price pivots while maintaining a smooth visual output, reducing the "overshoot" common in high-period moving averages.

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

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.