All indicators

Multiple MTF Variable Moving Average by Hassonya

Feb 23, 2022

Static chart image
Dynamic OverlaysSignalsMoving Averages

The Multiple MTF Variable Moving Average by Hassonya indicator provides a comprehensive multi-timeframe trend analysis system by plotting five independent variable moving averages that adapt to market volatility. By integrating multiple periods and timeframes into a single overlay, this tool helps traders identify trend direction, potential congestion, and multi-layered breakout opportunities.

Usage

The Usage section describes how the script can be used to identify trend shifts and momentum across different time horizons. Users can leverage the five VMA lines to build a customized view of the market:

  • Trend Identification: The lines are color-coded based on their slope. Green indicates an uptrend, red indicates a downtrend, and blue indicates potential congestion or a flat market.
  • Multi-Timeframe Analysis: You can set each VMA to a different timeframe (e.g., 5m, 15m, 1h). This allows you to visualize higher timeframe trends while trading on a lower timeframe chart.
  • Breakouts and Crossovers: Traders can use the interaction between short-term and long-term VMAs to spot entry or exit points. For example, a "golden cross" occurs when a shorter VMA (like VMA1) crosses above a longer VMA (like VMA2).
  • Stacked Momentum: When all active VMAs align in the same color, it suggests strong trend confluence across multiple timeframes or lengths.

Details

The Variable Moving Average (VMA) is a sophisticated smoothing calculation that differs from standard EMAs or SMAs. Its core logic is based on market volatility, where the smoothing constant is automatically adjusted. When volatility is high, the VMA becomes more sensitive to price changes; when volatility is low, it becomes smoother to avoid noise.

This specific implementation refines the original concepts shared by LazyBear. The script calculates a Volatility Index (vI) based on the Directional Movement Index (DMI) logic, specifically comparing the smoothed positive and negative directional movements. This index scales the smoothing factor, ensuring the average reacts dynamically to the strength of price movement. The multi-timeframe (MTF) functionality is handled via the request.security function, ensuring that the values plotted are accurate to their respective selected intervals.

Settings

  • VMA1 - VMA5 (Checkbox): Toggles the visibility of the specific moving average on the chart.
  • Length: Determines the lookback period used for the VMA calculation. Smaller values respond faster to price, while larger values provide more smoothing.
  • Period: Sets the specific timeframe for that individual moving average (e.g., 1, 5, 15, 60 minutes).

FAQ

How do I interpret the colors on the VMA lines? The colors represent the current slope of the VMA: Green indicates the value is higher than the previous bar (Uptrend), Red indicates it is lower (Downtrend), and Blue indicates the value is equal to the previous bar (Congestion/Neutral).

Can I use these VMAs for crossover alerts? Yes, the script is optimized for alerts. By default, it includes logic to trigger notifications when VMA1 crosses VMA2, or when VMA2 crosses VMA3, provided they are both enabled in the settings.

How do I access the Multiple MTF Variable Moving Average by Hassonya? 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.