Hull Moving Average Swing Trader

Apr 12, 2020

Static chart image
Dynamic Overlays
Signals
Moving Averages

The Hull Moving Average Swing Trader indicator provides a trend-following framework designed to capture swing trading opportunities by comparing current and lagged Hull Moving Average values to price action. It serves as a comprehensive tool for identifying trend direction and potential entry/exit points through color-coded visual zones and automated signal logic.

Usage

The Usage section describes how the script can be used, and it is primarily applied to identify swing points in the market. The tool utilizes the fast-responding nature of the Hull Moving Average (HMA) to reduce lag while maintaining smoothness.

  • Trend Identification: The script features a visual pane that changes color based on the relationship between two HMA calculations. A green zone indicates a bullish trend, while a red zone indicates a bearish trend.
  • Trade Entries: Buy signals are generated when the price crosses above the calculated HMA threshold (C2) and the previous candle sustains this position. Conversely, sell signals are triggered when price action falls below the threshold.
  • Trade Exits: The strategy includes logic to close positions when the price crosses back over the dynamic HMA baseline, allowing for automated profit-taking or risk mitigation during trend reversals.
  • Date Filtering: Users can specify a strict backtesting window using the "From" and "To" date settings to analyze performance during specific market regimes.

Details

The script is constructed using the Hull Moving Average formula, which involves weighted moving averages (WMA) of different periods to eliminate lag. Specifically, it calculates the square root of the user-defined period to determine the final smoothing factor.

The "Swing Trader" logic unique to this script involves calculating two HMA variations: one based on current price data and a second based on the previous candle's data. By comparing these two values (n1 and n2), the script determines the current momentum. The indicator further derives two dynamic levels, c1 and c2, which act as the boundaries for the colored cloud on the chart and serve as the primary triggers for the strategy's execution logic.

Settings

  • HullMA Period: Determines the length used for the HMA calculation. Higher values provide smoother trends for long-term swings, while lower values react faster to price changes.
  • Price data: Allows the user to select the source price (Open, High, Low, Close, etc.) for the HMA calculation.
  • From Month/Day/Year: Sets the starting point for the strategy execution and visual data processing.
  • To Month/Day/Year: Sets the end point for the strategy execution and visual data processing.

FAQ

How do I interpret the red and green zones on the chart? The green zone signifies that the current Hull Moving Average momentum is positive, suggesting bullish conditions. The red zone signifies negative momentum, suggesting bearish conditions.

Can I use this for automated alerts? Yes, the script includes built-in alert conditions for price crossing the C2 boundary, which can be used to notify users of potential trend shifts or entry opportunities.

How can I access the Hull Moving Average Swing Trader? 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.