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. קרא עוד ב־תנאי השימוש.