L2 Zero Lag Hull Moving Average
Sep 18, 2023

The L2 Zero Lag Hull Moving Average indicator provides a highly responsive trend-following tool that minimizes price lag by applying a secondary smoothing process to the standard Hull Moving Average (HMA).
Usage
The Usage section describes how the script can be used to identify market trends and potential reversal points. Traders can utilize this indicator to capture trend shifts with greater precision than standard moving averages.
- Trend Identification: When the Zero Lag HMA line is above the trigger line (previous value), the area is filled with green, suggesting a bullish trend. Conversely, when the line is below the trigger, the area is filled with red, suggesting a bearish trend.
- Crossover Signals: The script automatically plots "B" (Buy) and "S" (Sell) labels on the chart. A "B" label appears when the Zero Lag HMA crosses above its previous value, while an "S" label appears when it crosses below.
- Fast-Moving Markets: Due to its reduced lag, the indicator is particularly effective in volatile or fast-moving markets where traditional moving averages might react too slowly to price action.
Details
The Zero Lag Hull Moving Average (ZLHMA) is constructed using a two-step calculation process to refine the price data.
- Initial HMA Calculation: The script first calculates a standard Hull Moving Average. This involves taking the difference between two Weighted Moving Averages (WMA) of the price data—one with half the period and one with the full period—and then smoothing that result with a WMA of the square root of the period.
- Level 2 Smoothing: To further eliminate lag and enhance accuracy, the script applies the same HMA logic a second time. It treats the initial HMA output as the source and applies a second smoothing layer based on the "Smoothness" input.
This "Level 2" approach results in a line that tracks price movements more closely than a standard HMA, offering a balance between smoothness and reactivity.
Settings
- Length: Determines the lookback period for the primary Hull Moving Average calculation. Higher values provide a smoother line but increase lag, while lower values increase responsiveness.
- Smoothness: Controls the period for the second layer of the zero-lag calculation. This setting adjusts how aggressively the indicator attempts to remove lag from the initial HMA result.
FAQ
How do I interpret the green and red shaded areas? The shaded areas represent the relationship between the current Zero Lag HMA and its previous value. Green indicates the moving average is rising (bullish momentum), while red indicates it is falling (bearish momentum).
Can I use this indicator for automated alerts? Yes, the script includes built-in alert conditions for both Buy and Sell signals. You can configure these alerts within your charting platform to receive notifications when a trend crossover occurs.
How can I access the L2 Zero Lag Hull Moving Average? 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.