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
---
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.