OPEN-SOURCE SCRIPT
Multi-Timeframe MAs | Daily & Weekly Overlay

Concept and Utility This indicator is a comprehensive Multi-Timeframe (MTF) suite designed to keep intraday traders aligned with the dominant trends of higher timeframes. By projecting key Moving Averages from Daily (D) and Weekly (W) charts onto the current timeframe, it allows traders to identify major dynamic support and resistance levels that are invisible on standard intraday charts.
How it Works The script computes two distinct groups of averages using request.security with continuous plotting (gaps_off) to ensure seamless visualization:
Short-Term Momentum: EMA 9 and EMA 20. These react quickly to price and often guide the immediate trend.
Long-Term Trend: SMA 50 and SMA 200. These are the institutional standards for defining bull/bear markets and major defense zones.
Visual Features & Logic
Stepline Visualization: The script offers a "Step (Stepline)" style option. This is critical for MTF analysis as it accurately represents the flat nature of a Daily/Weekly value remaining constant throughout the intraday session, until the higher timeframe bar closes.
Visual Hierarchy: Weekly MAs are rendered with 30% transparency to visually distinguish them from the Daily MAs, preventing chart clutter.
Standardized Color Coding:
Blue: EMA 9
Orange: EMA 20
Green: SMA 50
Red: SMA 200
Settings
Timeframe Selection: Users can customize which higher timeframes to query (Default: D for Daily group, W for Weekly group).
Group Visual Style: Choose between Step (Stepline) for precise level tracking, Line for smoothness, or Circles.
Toggles & Widths: Each Moving Average can be individually toggled on/off, and its line thickness adjusted.
How it Works The script computes two distinct groups of averages using request.security with continuous plotting (gaps_off) to ensure seamless visualization:
Short-Term Momentum: EMA 9 and EMA 20. These react quickly to price and often guide the immediate trend.
Long-Term Trend: SMA 50 and SMA 200. These are the institutional standards for defining bull/bear markets and major defense zones.
Visual Features & Logic
Stepline Visualization: The script offers a "Step (Stepline)" style option. This is critical for MTF analysis as it accurately represents the flat nature of a Daily/Weekly value remaining constant throughout the intraday session, until the higher timeframe bar closes.
Visual Hierarchy: Weekly MAs are rendered with 30% transparency to visually distinguish them from the Daily MAs, preventing chart clutter.
Standardized Color Coding:
Blue: EMA 9
Orange: EMA 20
Green: SMA 50
Red: SMA 200
Settings
Timeframe Selection: Users can customize which higher timeframes to query (Default: D for Daily group, W for Weekly group).
Group Visual Style: Choose between Step (Stepline) for precise level tracking, Line for smoothness, or Circles.
Toggles & Widths: Each Moving Average can be individually toggled on/off, and its line thickness adjusted.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.