PROTECTED SOURCE SCRIPT
Trend Detection with Alerts and Consolidation

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.
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.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
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.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
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.