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.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.