All indicators

Hull Moving Average Swing Trader (Alerts)

Apr 13, 2020

Static chart image
Dynamic OverlaysSignalsMoving Averages

The Hull Moving Average Swing Trader (Alerts) indicator identifies potential trend reversals and swing trading opportunities by calculating crossovers between a primary Hull Moving Average and its previous value. This tool aims to provide traders with responsive trend detection while minimizing the lag often found in traditional moving averages.

Usage

The Usage section describes how the script can be used to identify market direction and potential entry or exit points. The indicator primarily functions by comparing the current Hull Moving Average (HMA) value against its value from the previous candle to detect momentum shifts.

  • Bullish Signals: A bullish crossover occurs when the current HMA (n1) crosses above the previous HMA calculation (n2). This is visualized by a green dot on the chart and a green-shaded area between the price and the dynamic threshold.
  • Bearish Signals: A bearish crossunder occurs when the current HMA (n1) crosses below the previous HMA calculation (n2). This is visualized by a red dot on the chart and a red-shaded area.
  • Time Filtering: Users can define a specific date range (From/To) to restrict when signals and visual elements are active, which is useful for backtesting specific market periods or sessions.

Details

The script is based on the Hull Moving Average (HMA), a technical indicator developed by Alan Hull that utilizes weighted moving averages to reduce lag and improve smoothness.

The core logic involves:

  1. Calculating the HMA based on a user-defined period and source (typically the Open price).
  2. Determining a secondary reference point (n2) based on the HMA values of the prior bar.
  3. Generating a "Retracted" value that creates a buffer or dynamic channel around the price.
  4. Identifying crossovers between these two smoothed states to confirm trend changes.

The visual output includes a cloud-like fill between the price and the calculated HMA boundary, providing a clear visual representation of the current swing bias.

Settings

Main Settings

  • HullMA Period: Determines the length used for the HMA calculation. Higher values result in smoother lines but more lag, while lower values are more responsive to price changes.
  • Price data: The source input for the calculation (Open, High, Low, Close, etc.). Using "Open" is often recommended to reduce reactive noise within the current bar.

Date Range Settings

  • From Month / Day / Year: Sets the starting point for the indicator's calculations and alerts.
  • To Month / Day / Year: Sets the ending point for the indicator's calculations and alerts.

FAQ

How do I interpret the red and green dots?
The green dots signify a bullish crossover of the HMA components, suggesting a potential upward swing. Red dots signify a bearish crossunder, suggesting a potential downward swing.

Can I set up automated alerts with this indicator?
Yes, the script includes built-in alert conditions for both "Bullish Hull Moving Average Crossover" and "Bearish Hull Moving Average Crossunder" which can be configured through the standard alert menu.

How do 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.