PROTECTED SOURCE SCRIPT

Trend Detection with Alerts and Consolidation

86
Here’s a simple script in English that detects a trend based on two moving averages (MAs) and shows the trend direction on the chart. I’ll write it in Pine Script (TradingView), since it’s a common language for trading indicators:
How does it work?
* Green background — uptrend
* Red background — downtrend
* Gray background — consolidation (MAs are close to each other)
* Label with trend/consolidation description on the latest candle
Alerts triggered when the fast MA crosses the slow MA (trend change) — you can set these alerts as notifications in TradingView.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.