+ Multi-timeframe Multiple Moving Average Lines
Jul 20, 2022

The + Multi-timeframe Multiple Moving Average Lines indicator plots up to eight customizable moving average levels from different timeframes as horizontal lines projecting from the current bar to provide a clean, multi-timeframe perspective on price action.
Usage
The Usage section describes how the script can be used to monitor key technical levels across various resolutions without cluttering the historical price chart. By projecting lines forward from the current bar, users can see where higher-timeframe averages sit relative to current price action.
Examples of usage include:
- Trend Alignment: Plotting a Daily SMA and a Weekly EMA on a 15-minute chart to identify if the short-term trend is trading above or below long-term institutional levels.
- Support/Resistance Clusters: Enabling multiple lines with different lookback periods (e.g., 50, 100, and 200) for the same timeframe to identify potential "confluence zones."
- Scalping: Setting resolutions to 5m or 15m to track immediate momentum while staying on a 1m chart.
The "Global Options" allow for quick visual synchronization, where a single toggle can force all active lines to share the same color, style, or width for a more uniform appearance.
Details
The script utilizes the request.security() function to fetch moving average data from user-defined timeframes. Unlike traditional indicators that plot historical lines across the entire chart, this tool uses the line.new() and label.new() functions to draw segments starting only at the current bar index.
Supported Moving Average types include:
- EMA: Exponential Moving Average
- HMA: Hull Moving Average
- SMA: Simple Moving Average
- SMMA: Smoothed Moving Average (RMA)
- VWMA: Volume Weighted Moving Average
- WMA: Weighted Moving Average
Each line is accompanied by labels indicating the MA type and its timeframe. This allows for clear identification even when multiple lines are active.
Settings
- Global Options: A group of settings that can override individual line configurations for Color, Label Size, Line Style, Line Width, and Line Length.
- Display Line and Label?: Toggles the visibility of specific Moving Average instances.
- Color: Sets the individual color for the line and its associated labels.
- Line Style: Choose between Solid, Dashed, or Dotted appearances.
- Line Width: Adjusts the thickness of the projected line (1 to 4).
- Line Length: Determines how many bars forward the line projects from the current price.
- Lookback: The period/length used for the moving average calculation.
- Moving Average Type: Selects the mathematical formula (EMA, SMA, etc.) for the calculation.
- Resolution: Sets the timeframe from which the data is pulled (e.g., 60 for hourly, D for daily).
FAQ
How do I adjust the labels if they overlap? You can change the individual "Line Length" or "Global Line Length" to shift the labels further to the right, or adjust the "Global Label Size" to prevent overlapping in dense price areas.
Can I use this for crypto and forex? Yes, the indicator supports all timeframes and asset classes available on your platform, including crypto, futures, and forex.
How do I get access to the + Multi-timeframe Multiple Moving Average Lines? 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.