OPEN-SOURCE SCRIPT
200 DMA Slope %

200 DMA Slope %
The 200 DMA Slope % indicator measures the rate of change of the 200-day moving average, helping traders identify whether long-term trend strength is accelerating, flattening, or deteriorating.
Instead of simply asking:
“Is price above or below the 200 DMA?”
This indicator answers the equally important question:
“Is the 200 DMA itself rising or falling?”
How It Works
The indicator calculates the percentage change in the 200-day moving average over a user-defined lookback period.
Formula:
Slope % =
((200 DMA Today − 200 DMA X Bars Ago) ÷ 200 DMA X Bars Ago) × 100
A positive reading indicates a rising long-term trend, while a negative reading signals a declining trend.
Default Settings
Moving Average Length: 200
Slope Lookback: 20 bars
Smoothing Length: 5
Interpretation
Above 0
The 200 DMA is rising
Long-term trend is strengthening
Near 0
Trend is flattening
Potential transition or consolidation phase
Below 0
The 200 DMA is declining
Long-term trend may be weakening
Suggested Use
This indicator pairs especially well with a Distance From 200 DMA indicator.
Together they can help answer two critical questions:
How extended is price from the long-term trend?
Is the long-term trend strengthening or rolling over?
Examples:
Price far above 200 DMA + slope accelerating → strong momentum regime
Price extended but slope flattening → caution / possible exhaustion
Price below 200 DMA + negative slope → weaker long-term trend
This tool is designed to help traders better visualize trend quality, not just trend direction.
The 200 DMA Slope % indicator measures the rate of change of the 200-day moving average, helping traders identify whether long-term trend strength is accelerating, flattening, or deteriorating.
Instead of simply asking:
“Is price above or below the 200 DMA?”
This indicator answers the equally important question:
“Is the 200 DMA itself rising or falling?”
How It Works
The indicator calculates the percentage change in the 200-day moving average over a user-defined lookback period.
Formula:
Slope % =
((200 DMA Today − 200 DMA X Bars Ago) ÷ 200 DMA X Bars Ago) × 100
A positive reading indicates a rising long-term trend, while a negative reading signals a declining trend.
Default Settings
Moving Average Length: 200
Slope Lookback: 20 bars
Smoothing Length: 5
Interpretation
Above 0
The 200 DMA is rising
Long-term trend is strengthening
Near 0
Trend is flattening
Potential transition or consolidation phase
Below 0
The 200 DMA is declining
Long-term trend may be weakening
Suggested Use
This indicator pairs especially well with a Distance From 200 DMA indicator.
Together they can help answer two critical questions:
How extended is price from the long-term trend?
Is the long-term trend strengthening or rolling over?
Examples:
Price far above 200 DMA + slope accelerating → strong momentum regime
Price extended but slope flattening → caution / possible exhaustion
Price below 200 DMA + negative slope → weaker long-term trend
This tool is designed to help traders better visualize trend quality, not just trend direction.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน