OPEN-SOURCE SCRIPT
Updated EMA Ribbon with ATR Extensions

This indicator is an EMA ribbon framework combined with multi-timeframe trend structure and volatility-normalized distance measurements using ATR.
The core component is a configurable exponential moving average ribbon, allowing multiple EMA lengths to be plotted simultaneously across different timeframes. This includes both intraday EMAs and optional higher-timeframe EMAs such as daily and weekly periods. The purpose of this structure is to provide a layered view of trend behavior across multiple time horizons, helping visualize alignment, compression, and expansion within broader market structure.
In addition to standard EMA visualization, the indicator integrates a volatility context layer using the Average True Range (ATR). This allows price distance from each EMA to be expressed not only in percentage terms, but also in ATR-normalized form. The ATR extension metric is derived from the relationship between percentage deviation from the moving average and current ATR percentage, enabling comparison of movement intensity across different instruments regardless of price scale.
The included table presents a structured breakdown for each selected EMA:
EMA value based on configurable length and timeframe
Percentage distance between price and each EMA
ATR-normalized extension value representing volatility-adjusted deviation
This structure allows users to observe how price interacts with multiple trend references simultaneously, while also understanding whether movement is occurring within normal volatility conditions or represents an expanded deviation relative to recent market behavior.
A visual marker is included to highlight conditions where price is significantly extended above a selected higher timeframe EMA relative to ATR-based expansion. This is intended to assist with quickly identifying periods of elevated trend extension within the broader EMA framework.
The header display optionally shows symbol, description, and active chart timeframe to maintain contextual awareness when analyzing multiple assets or timeframes.
Overall, the tool is designed as a multi-layer trend and volatility visualization system combining moving averages, relative distance metrics, and ATR-based normalization to better contextualize price positioning within ongoing market structure.
The core component is a configurable exponential moving average ribbon, allowing multiple EMA lengths to be plotted simultaneously across different timeframes. This includes both intraday EMAs and optional higher-timeframe EMAs such as daily and weekly periods. The purpose of this structure is to provide a layered view of trend behavior across multiple time horizons, helping visualize alignment, compression, and expansion within broader market structure.
In addition to standard EMA visualization, the indicator integrates a volatility context layer using the Average True Range (ATR). This allows price distance from each EMA to be expressed not only in percentage terms, but also in ATR-normalized form. The ATR extension metric is derived from the relationship between percentage deviation from the moving average and current ATR percentage, enabling comparison of movement intensity across different instruments regardless of price scale.
The included table presents a structured breakdown for each selected EMA:
EMA value based on configurable length and timeframe
Percentage distance between price and each EMA
ATR-normalized extension value representing volatility-adjusted deviation
This structure allows users to observe how price interacts with multiple trend references simultaneously, while also understanding whether movement is occurring within normal volatility conditions or represents an expanded deviation relative to recent market behavior.
A visual marker is included to highlight conditions where price is significantly extended above a selected higher timeframe EMA relative to ATR-based expansion. This is intended to assist with quickly identifying periods of elevated trend extension within the broader EMA framework.
The header display optionally shows symbol, description, and active chart timeframe to maintain contextual awareness when analyzing multiple assets or timeframes.
Overall, the tool is designed as a multi-layer trend and volatility visualization system combining moving averages, relative distance metrics, and ATR-based normalization to better contextualize price positioning within ongoing market structure.
Release Notes
Changes MadeAdded a global EMA / SMA selector that applies across the entire indicator.
Added Session VWAP (no bands) with table integration.
Expanded the table to show Price, % Away, ATR Extension, and Timeframe.
Added customizable table size and position.
Added automatic display of enabled Daily and Weekly HTF moving averages in the table.
Fixed the timeframe watermark so it correctly displays values such as 2D, 3D, 4H, 15m, etc.
Restricted the ATR Extension Yellow Dot to 1-Day charts only.
Removed ATR extension signals from intraday charts to prevent false readings.
Switched MA calculations to use unadjusted price data (adjustment.none) to avoid distortions caused by stock splits, special dividends, spin-offs, and other corporate actions.
Updated the indicator architecture to support both chart-timeframe and higher-timeframe moving averages within the same framework.
Release Notes
Minor bug fixesRelease Notes
ATR adjustmentsRelease Notes
This update keeps the original MA Ribbon intact, but adds a separate bottom-right Context Table. The old version showed moving averages, percent distance, ATR extension, VWAP, HTF MAs, and the daily 50MA extension dot.The new version adds market context: ADR%, ATR%, LoD distance, day ATR used, range position, volume participation, 52-week positioning, U/D ratio, sector, and industry.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Independent market structure tools and educational chart analysis for learning and review only. Not financial advice.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Independent market structure tools and educational chart analysis for learning and review only. Not financial advice.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.