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. اقرأ المزيد في شروط الاستخدام.