OPEN-SOURCE SCRIPT

Daily MA — Higher-Timeframe Daily Moving Average Overlay

53
This indicator plots a clean, higher-timeframe daily moving average directly on any chart, so you can always see where price sits relative to the daily trend — even while trading on lower timeframes (1m, 5m, etc.).

It’s designed to be:
  • Simple – a single, configurable daily MA line
  • Consistent – always anchored to the 1D timeframe
  • Flexible – choose EMA or SMA and customize line width/color




What This Indicator Does
  • Pulls the 1-Day (1D) moving average of the current symbol, regardless of your chart timeframe.
  • Lets you choose between EMA (Exponential Moving Average) or SMA (Simple Moving Average).
  • Plots that daily MA as a smooth overlay on your current chart.
  • Keeps the line visually clean and continuous, making it easy to see daily trend and dynamic support/resistance.


This is not a signals/strategy script. It doesn’t generate buy/sell arrows or backtest logic. It’s a context tool for visualizing the daily trend while you execute your own strategy.



Why a Daily MA Overlay Is Useful

Traders commonly use a daily moving average to:

Anchor intraday trades to the higher-timeframe trend
  • Longs when price is holding above the Daily MA
  • Shorts or caution when price is rejecting from the Daily MA

Identify dynamic support/resistance
  • Price often reacts around well-watched daily MAs (e.g., 50, 100, 200)

Filter setups
  • Only take long setups when price is above the daily trend line
  • Avoid counter-trend trades when price is extended far from the Daily MA


Because this script forces the MA to always be computed on 1D, you don’t have to switch back and forth between intraday and daily charts to keep track of the bigger picture.



Inputs & Settings

MA Length
  • Default: 200
  • Any positive integer (min 1)
  • Common examples: 50, 100, 200 for trend structure


MA Type
  • EMA – reacts faster to recent price (default)
  • SMA – smoother, slower, more “classic” feel


Line Width
  • Default: 2
  • Range: 1 to 10
  • Increase if you want the Daily MA to stand out clearly against other indicators


Color
  • Default: Purple tone
  • Fully customizable – pick any color that works with your chart theme




How to Use It in Your Workflow

Intraday traders (scalpers/day-traders):

Apply the indicator to your 1m/5m/15m charts.

Use the Daily MA as a trend filter:
  • Only look for long scalps when price is above the Daily MA.
  • Be more cautious with longs or consider shorts when price is below it.


Swing traders:

Use it on 1H/4H charts to see where price sits relative to a longer-term daily trend.

Watch for:
  • Pullbacks to the Daily MA in an uptrend as potential demand zones.
  • Rejections at the Daily MA in a downtrend as potential supply zones.


Risk management & context:
  • Avoid chasing extended moves far from the Daily MA.
  • Mark confluence with other tools (support/resistance, volume profile, etc.) around the Daily MA.




Notes & Limitations
  • The moving average itself is calculated from daily candles, then displayed on your current timeframe.
  • This is a visual aid only. It does not guarantee future performance or provide financial advice.
  • Always combine this indicator with your own analysis, risk management, and trading plan.




Disclaimer:
This script is provided for educational and informational purposes only. It is not financial advice and does not constitute a recommendation to buy or sell any financial instrument. Always do your own research and trade at your own risk.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.