OPEN-SOURCE SCRIPT
160-Min Extended Hours MAs

160-Min Extended Hours MA Dashboard
Designed for traders who work across the full extended hours session, where 960 minutes of daily market time — from pre-market open at 4:00 AM ET through post-market close at 8:00 PM ET — divides evenly into exactly 6 bars per day at the 160-minute timeframe. This creates a clean, session-aligned bar structure that keeps moving average lookbacks anchored to real extended hours time rather than arbitrary period counts.
This indicator plots five moving averages, each mapped to a meaningful horizon expressed in session time:
1D — 6 bars (1 full extended session)
1W — 30 bars (1 trading week)
1M — 126 bars (~1 trading month)
6M — 756 bars (~6 trading months)
1Y — 1,512 bars (~1 trading year)
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 → light blue → royal blue → purple → white 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 160-minute timeframe, and a warning label fires to prompt you to switch. Note that the 1Y MA requires approximately one full year of chart history to populate.
Timeframe: 160-min only
Asset class: Equities, ETFs, and index products with extended hours trading (4:00 AM – 8:00 PM ET)
Pine Script: v6
Sonnet 4.6
Designed for traders who work across the full extended hours session, where 960 minutes of daily market time — from pre-market open at 4:00 AM ET through post-market close at 8:00 PM ET — divides evenly into exactly 6 bars per day at the 160-minute timeframe. This creates a clean, session-aligned bar structure that keeps moving average lookbacks anchored to real extended hours time rather than arbitrary period counts.
This indicator plots five moving averages, each mapped to a meaningful horizon expressed in session time:
1D — 6 bars (1 full extended session)
1W — 30 bars (1 trading week)
1M — 126 bars (~1 trading month)
6M — 756 bars (~6 trading months)
1Y — 1,512 bars (~1 trading year)
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 → light blue → royal blue → purple → white 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 160-minute timeframe, and a warning label fires to prompt you to switch. Note that the 1Y MA requires approximately one full year of chart history to populate.
Timeframe: 160-min only
Asset class: Equities, ETFs, and index products with extended hours trading (4:00 AM – 8:00 PM ET)
Pine Script: v6
Sonnet 4.6
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.