Moving Average MTF - squattter

Dec 5, 2016

Static chart image
Support and Resistance
Signals
Moving Averages

The Moving Average MTF - squattter indicator provides a multi-timeframe simple moving average (SMA) on a single chart, allowing traders to monitor higher-tier trend dynamics without switching views. It is designed to bridge the gap between short-term price action and long-term trend direction by projecting data from specified timeframes onto the current resolution.

Usage

The Usage section focuses on how to integrate the multi-timeframe data into a trading strategy. By default, the indicator can be set to either track the current chart resolution or a fixed higher timeframe (such as Daily or Weekly) while viewing a lower timeframe (such as the 15-minute or 1-hour).

Traders typically use this tool to identify:

  • Trend Alignment: Ensuring that trades taken on a lower timeframe align with the direction of the moving average on a higher timeframe.
  • Dynamic Support and Resistance: Higher timeframe moving averages often act as significant psychological levels where price may bounce or break.
  • Cross Signals: The script includes logic to detect when the current price crosses over or under the multi-timeframe average, signaling potential momentum shifts.

Details

The script utilizes the request.security function to fetch data from different timeframes. When a higher timeframe is selected, the moving average calculation is processed using the data from that specific resolution and then plotted across the bars of the current chart. This creates a "stepped" visual effect or a smoothed line depending on the timeframe gap, representing the value of the SMA at the close of the higher timeframe intervals. The script is optimized to minimize repainting by using standard security request protocols.

Settings

  • Length: Determines the number of periods used to calculate the Simple Moving Average.
  • Source: Defines which price data point (Close, Open, High, Low, etc.) is used for the calculation.
  • Use Current Chart's Timeframe?: A toggle that, when enabled, forces the indicator to match the timeframe of the active chart.
  • Timeframe: Specifies the custom resolution (e.g., 60 for hourly, D for daily) used when the "Use Current Chart's Timeframe" option is disabled.

FAQ

How do I interpret the moving average if it looks like a flat line? If the selected timeframe is significantly higher than your current chart (e.g., Daily SMA on a 1-minute chart), the line will appear flat for long durations because the value only updates once per higher-timeframe bar.

Can I use this indicator for crossover alerts? Yes, the script is optimized to trigger alerts whenever the current price crosses above or below the multi-timeframe moving average line.

How can I access the Moving Average MTF - squattter? 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.