OPEN-SOURCE SCRIPT
Nested SMA Wave

The "Nested SMA Wave" is a custom Pine Script (v5) indicator for TradingView that overlays a series of 8 Simple Moving Averages (SMAs) on the price chart. These SMAs use exponentially increasing lengths based on powers of 2, starting from a user-defined base length (default: 25). This creates lengths like 25, 50, 100, 200, 400, 800, 1600, and 3200.
Each SMA is plotted in a distinct color, forming a "wave" of nested lines that fan out from short-term (faster, more responsive) to long-term (slower, smoother). Semi-transparent colored fills (shaded zones) are added between consecutive SMAs, with customizable toggles and transparency levels, creating layered visual bands that highlight the spaces between different trend timescales.
Use Cases
Multi-Timeframe Trend Visualization: The power-of-2 nesting approximates higher timeframe trends on lower timeframes without switching charts. Shorter SMAs react quickly to price changes, while longer ones show major trends, helping identify overall market structure at a glance.
Support/Resistance Identification: Price interacting with the SMA lines or shaded zones can act as dynamic support/resistance. Crossovers between nested SMAs signal potential momentum shifts.
Trend Strength and Alignment: When SMAs are widely spaced and aligned (e.g., all sloping up), it indicates strong trends. Converging or crossing SMAs suggest consolidation or reversals. The shaded zones add depth, making expansions/contractions in volatility or trend power visually obvious.
Ribbon-Style Trading: Similar to moving average ribbons, traders can look for price pulling back to inner zones for entries in the direction of the broader "wave," or use zone breaks for signals.
Customization for Different Assets/Timeframes: Adjust the base length (e.g., smaller for crypto volatility, larger for stocks) and toggle shades to reduce clutter.
This creates a visually rich, rainbow-like overlay that's particularly useful for trend-following strategies on any chart.
Each SMA is plotted in a distinct color, forming a "wave" of nested lines that fan out from short-term (faster, more responsive) to long-term (slower, smoother). Semi-transparent colored fills (shaded zones) are added between consecutive SMAs, with customizable toggles and transparency levels, creating layered visual bands that highlight the spaces between different trend timescales.
Use Cases
Multi-Timeframe Trend Visualization: The power-of-2 nesting approximates higher timeframe trends on lower timeframes without switching charts. Shorter SMAs react quickly to price changes, while longer ones show major trends, helping identify overall market structure at a glance.
Support/Resistance Identification: Price interacting with the SMA lines or shaded zones can act as dynamic support/resistance. Crossovers between nested SMAs signal potential momentum shifts.
Trend Strength and Alignment: When SMAs are widely spaced and aligned (e.g., all sloping up), it indicates strong trends. Converging or crossing SMAs suggest consolidation or reversals. The shaded zones add depth, making expansions/contractions in volatility or trend power visually obvious.
Ribbon-Style Trading: Similar to moving average ribbons, traders can look for price pulling back to inner zones for entries in the direction of the broader "wave," or use zone breaks for signals.
Customization for Different Assets/Timeframes: Adjust the base length (e.g., smaller for crypto volatility, larger for stocks) and toggle shades to reduce clutter.
This creates a visually rich, rainbow-like overlay that's particularly useful for trend-following strategies on any chart.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。