OPEN-SOURCE SCRIPT
MA 250 & 1250 + Overextension

This indicator is designed for long-term and macro traders who use moving averages to identify structural support levels and potential overextended tops.
It plots two key simple moving averages:
While the 1250-day MA often acts as strong support during major market bottoms, the 250-day MA serves as a dynamic reference for identifying potential tops.
The core innovation of this script is the addition of user-defined overextension zones above the 250-day MA:
You can independently choose which background zone to display:
Visual cues include:
Use cases:
Note: This tool does not generate buy/sell signals on its own. It is intended as a contextual filter to complement price action, volume, momentum, and macro analysis.
It plots two key simple moving averages:
- 250-day SMA (≈1-year average)
- 1250-day SMA (≈5-year average)
While the 1250-day MA often acts as strong support during major market bottoms, the 250-day MA serves as a dynamic reference for identifying potential tops.
The core innovation of this script is the addition of user-defined overextension zones above the 250-day MA:
- +30% zone: highlights potential cyclical tops (ideal for less volatile assets)
- +50% zone: marks extreme overextension levels (useful for volatile instruments)
You can independently choose which background zone to display:
- "+30% only"
- "+50% only"
- "Both" (with +50% taking visual priority)
- "None"
Visual cues include:
- Colored circles when price enters each overextension zone
- Optional semi-transparent background highlighting active zones
- Clean, non-repainting logic based on closing prices
Use cases:
- Confirming structural support near the 1250-day MA during deep corrections
- Assessing risk/reward when price moves far above the 250-day MA
- Avoiding late long entries in euphoric market phases
- Identifying potential distribution zones in long-term uptrends
Note: This tool does not generate buy/sell signals on its own. It is intended as a contextual filter to complement price action, volume, momentum, and macro analysis.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน