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.
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
N33RK9
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
N33RK9
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน