All indicators

The Middle-High-Low Moving Average

Jul 15, 2016

Static chart image
SignalsMoving Averages

The Middle-High-Low Moving Average indicator provides a specialized trend-following framework by comparing a standard Exponential Moving Average (EMA) against an EMA derived from the midpoint of a price range to identify potential trend reversals and momentum shifts.

Usage

The Middle-High-Low Moving Average is primarily used as a crossover system to identify changes in market direction. Traders monitor the interaction between two specific lines:

  • Standard EMA: Represents the smoothed average of closing prices.
  • MHL EMA: Represents the smoothed average of the median price (midpoint) between the highest high and lowest low over a specific lookback period.

A bullish signal is typically generated when the Standard EMA crosses above the MHL EMA, suggesting that recent price action is strengthening relative to the historical range midpoint. Conversely, a bearish signal occurs when the Standard EMA crosses below the MHL EMA, indicating weakening price momentum. These crossovers can be used to identify entry points or to confirm the prevailing trend direction.

Details

The indicator is constructed using a two-step calculation process. First, it identifies the highest high and the lowest low over a user-defined "Period." It then calculates the arithmetic mean of these two values to determine the "Middle-High-Low" (MHL) price.

Unlike a standard EMA which only considers closing prices, the MHL calculation incorporates the total volatility and range of the specified period. Both the MHL value and the closing price are then smoothed using a second "Smooth" parameter. This dual-smoothing approach helps filter out market noise, providing a clearer view of the underlying trend compared to raw price fluctuations. This script is a refactored version of the original work by @MarcoValente.

Settings

  • Period: The lookback window (number of bars) used to determine the highest high and lowest low for the MHL calculation.
  • Smooth: The length applied to the Exponential Moving Average calculations for both the MHL value and the standard closing price. Increasing this value results in smoother lines with more lag, while decreasing it makes the indicator more responsive to recent price changes.

FAQ

How do I interpret a crossover between the two lines? A crossover indicates a shift in momentum. When the green Standard EMA moves above the red MHL EMA, it suggests an upward trend; when it moves below, it suggests a downward trend.

Can this indicator be used on any timeframe? Yes, the Middle-High-Low Moving Average can be applied to any timeframe, though users may need to adjust the Period and Smooth settings to account for varying levels of volatility.

How can I access the Middle-High-Low 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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

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