PROTECTED SOURCE SCRIPT

Trend Detection with Alerts and Consolidation

107
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.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.