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
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.