OPEN-SOURCE SCRIPT
5-Min Session MAs

Here's the updated description:
---
**5-Min Session MA Dashboard**
Designed for intraday traders working on the 5-minute timeframe, where 390 minutes of regular trading hours divides into exactly 78 bars per day — keeping moving average lookbacks anchored to real session time rather than arbitrary period counts.
This indicator plots three moving averages, each mapped to a meaningful intraday horizon expressed in session time:
- 1D — 78 bars (1 full session)
- 2D — 156 bars (2 sessions)
- 1W — 390 bars (1 trading week)
**Features**
Toggle between EMA and SMA globally with a single input. Each MA plots with a right-edge label showing the period name, distance from current price, percentage distance, and ATR multiple — giving you immediate context on how extended or compressed price is relative to each level. A summary table displays the current MA value and slope direction (▲ ▼ →) for each period. A bottom signal row indicates whether price is in a full bull stack, bear stack, or mixed alignment across all visible MAs.
Color palette runs teal → blue → purple from shortest to longest timeframe, consistent with the broader dashboard suite.
The indicator includes a timeframe guard — all plots and labels suppress automatically if the chart is not on the 5-minute timeframe, and a warning label fires to prompt you to switch.
**Timeframe:** 5-min only
**Asset class:** Equities, ETFs, and index products trading regular hours (9:30–4:00 ET)
**Pine Script:** v6
---
---
**5-Min Session MA Dashboard**
Designed for intraday traders working on the 5-minute timeframe, where 390 minutes of regular trading hours divides into exactly 78 bars per day — keeping moving average lookbacks anchored to real session time rather than arbitrary period counts.
This indicator plots three moving averages, each mapped to a meaningful intraday horizon expressed in session time:
- 1D — 78 bars (1 full session)
- 2D — 156 bars (2 sessions)
- 1W — 390 bars (1 trading week)
**Features**
Toggle between EMA and SMA globally with a single input. Each MA plots with a right-edge label showing the period name, distance from current price, percentage distance, and ATR multiple — giving you immediate context on how extended or compressed price is relative to each level. A summary table displays the current MA value and slope direction (▲ ▼ →) for each period. A bottom signal row indicates whether price is in a full bull stack, bear stack, or mixed alignment across all visible MAs.
Color palette runs teal → blue → purple from shortest to longest timeframe, consistent with the broader dashboard suite.
The indicator includes a timeframe guard — all plots and labels suppress automatically if the chart is not on the 5-minute timeframe, and a warning label fires to prompt you to switch.
**Timeframe:** 5-min only
**Asset class:** Equities, ETFs, and index products trading regular hours (9:30–4:00 ET)
**Pine Script:** v6
---
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。