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.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。