OPEN-SOURCE SCRIPT
Weekly MA60 (Show on Any Chart)

📘 Description: Weekly MA60 (Show on Any Chart)
This indicator displays the 60-period Moving Average (MA) calculated on the weekly timeframe, regardless of which chart timeframe you’re currently viewing (for example, it shows the weekly MA60 even on a daily chart).
It’s useful for traders who want to keep track of higher-timeframe trend direction while analyzing lower-timeframe price action.
⸻
🧩 How It Works
• The script uses the request.security() function to fetch data from the weekly timeframe.
• It then calculates either a Simple Moving Average (SMA) or an Exponential Moving Average (EMA) over 60 periods.
• The resulting value is plotted directly on your active chart (daily, 4H, etc.), allowing you to visualize the long-term trend without switching timeframes.
⸻
⚙️ Settings
• Period: default = 60
• Source: default = close
• Type: choose between SMA or EMA
⸻
💡 Use Cases
• Identify whether the current price is above or below the weekly trend while working on lower-timeframe setups.
• Combine with daily MAs or shorter EMAs for multi-timeframe confluence.
• Great for swing traders and position traders who monitor long-term momentum while refining entries on the daily or 4H chart.
⸻
🛠 Technical Notes
• Built in Pine Script® v6 for full compatibility.
• Uses barmerge.gaps_off and barmerge.lookahead_off for accurate data alignment.
• Minimal and optimized for overlay display (no separate window).
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.