OPEN-SOURCE SCRIPT
Weekly 10/20/30/40 SMA Overlay

This indicator plots the 10, 20, 30, and 40-week Simple Moving Averages (SMAs) on any chart timeframe.
The purpose is to provide a higher-timeframe trend framework that can help traders and investors determine the overall market environment.
How to Use
Bullish Trend:
Price above all four SMAs.
10-week above the 20-week.
20-week above the 30-week.
30-week above the 40-week.
This suggests institutional participation may be supporting higher prices.
Bearish Trend:
Price below all four SMAs.
10-week below the 20-week.
20-week below the 30-week.
30-week below the 40-week.
This suggests the longer-term trend may be weakening or trending lower.
Transition / Consolidation:
The moving averages flatten or become intertwined.
This often indicates a market that is:
consolidating,
changing trend,
or lacking clear directional conviction.
Notes
This indicator is not intended as a standalone buy or sell signal.
It is designed to help traders and investors align themselves with the broader market trend.
Many trend-following approaches use higher-timeframe moving averages as a filter for position management and directional bias.
The purpose is to provide a higher-timeframe trend framework that can help traders and investors determine the overall market environment.
How to Use
Bullish Trend:
Price above all four SMAs.
10-week above the 20-week.
20-week above the 30-week.
30-week above the 40-week.
This suggests institutional participation may be supporting higher prices.
Bearish Trend:
Price below all four SMAs.
10-week below the 20-week.
20-week below the 30-week.
30-week below the 40-week.
This suggests the longer-term trend may be weakening or trending lower.
Transition / Consolidation:
The moving averages flatten or become intertwined.
This often indicates a market that is:
consolidating,
changing trend,
or lacking clear directional conviction.
Notes
This indicator is not intended as a standalone buy or sell signal.
It is designed to help traders and investors align themselves with the broader market trend.
Many trend-following approaches use higher-timeframe moving averages as a filter for position management and directional bias.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
N33RK9
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
N33RK9
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.