OPEN-SOURCE SCRIPT
Diupdate 21-Day Trend Direction

๐ 21-Day Trend Direction Indicator
๐ How It Works:
๐ฏ Trend Detection Logic:
Analyzes last 21 daily candles
Calculates total price change from start to end
Compares against sideways threshold (default 2%)
Counts bullish vs bearish days
Tracks higher highs and lower lows
๐ Trend Classifications:
โข ๐ UPTREND: Price change > +2% over 21 days
โข ๐ DOWNTREND: Price change < -2% over 21 days
โข โก๏ธ SIDEWAYS: Price change between -2% and +2%
๐ช Trend Strength Levels:
โข ๐ฅ Very Strong: >5% price change
โข ๐ช Strong: 3-5% price change
โข ๐ Moderate: 1.5-3% price change
โข ๐ Weak: <1.5% price change
๐จ Visual Features:
๐ Information Table Shows:
โข Trend Direction with color coding
โข Price Change % over 21 days
โข Trend Strength classification
โข Bull/Bear Days count
โข Higher Highs/Lower Lows count
โข Analysis Period (customizable)
๐ Chart Indicators:
โข Trend Line (21-day moving average)
โข Background Color for quick trend identification
โข Trend Arrows (โฒ โผ โก) on chart
โข Customizable display options
โ๏ธ Customizable Settings:
๐ฏ Analysis Settings:
โข Lookback Days: 5-50 days (default: 14)
โข Sideways Threshold: 0.5-10% (default: 2%)
โข Trend Strength: Low/Medium/High sensitivity
๐จ Display Options:
โข Table Position: 9 different positions
โข Table Size: Tiny to Large
โข Show/Hide: Table, Trend Line, Background, Arrows
๐จ Alert Options:
โข Trend Change to Uptrend
โข Trend Change to Downtrend
โข Trend Change to Sideways
This indicator gives you a clear, objective view of the 21-day trend with multiple confirmation signals! ๐
๐ How It Works:
๐ฏ Trend Detection Logic:
Analyzes last 21 daily candles
Calculates total price change from start to end
Compares against sideways threshold (default 2%)
Counts bullish vs bearish days
Tracks higher highs and lower lows
๐ Trend Classifications:
โข ๐ UPTREND: Price change > +2% over 21 days
โข ๐ DOWNTREND: Price change < -2% over 21 days
โข โก๏ธ SIDEWAYS: Price change between -2% and +2%
๐ช Trend Strength Levels:
โข ๐ฅ Very Strong: >5% price change
โข ๐ช Strong: 3-5% price change
โข ๐ Moderate: 1.5-3% price change
โข ๐ Weak: <1.5% price change
๐จ Visual Features:
๐ Information Table Shows:
โข Trend Direction with color coding
โข Price Change % over 21 days
โข Trend Strength classification
โข Bull/Bear Days count
โข Higher Highs/Lower Lows count
โข Analysis Period (customizable)
๐ Chart Indicators:
โข Trend Line (21-day moving average)
โข Background Color for quick trend identification
โข Trend Arrows (โฒ โผ โก) on chart
โข Customizable display options
โ๏ธ Customizable Settings:
๐ฏ Analysis Settings:
โข Lookback Days: 5-50 days (default: 14)
โข Sideways Threshold: 0.5-10% (default: 2%)
โข Trend Strength: Low/Medium/High sensitivity
๐จ Display Options:
โข Table Position: 9 different positions
โข Table Size: Tiny to Large
โข Show/Hide: Table, Trend Line, Background, Arrows
๐จ Alert Options:
โข Trend Change to Uptrend
โข Trend Change to Downtrend
โข Trend Change to Sideways
This indicator gives you a clear, objective view of the 21-day trend with multiple confirmation signals! ๐
Catatan Rilis
๐ 21-Day Trend Direction Indicator๐ How It Works:
๐ฏ Trend Detection Logic:
Analyzes last 21 daily candles
Calculates total price change from start to end
Compares against sideways threshold (default 2%)
Counts bullish vs bearish days
Tracks higher highs and lower lows
๐ Trend Classifications:
โข ๐ UPTREND: Price change > +2% over 21 days
โข ๐ DOWNTREND: Price change < -2% over 21 days
โข โก๏ธ SIDEWAYS: Price change between -2% and +2%
๐ช Trend Strength Levels:
โข ๐ฅ Very Strong: >5% price change
โข ๐ช Strong: 3-5% price change
โข ๐ Moderate: 1.5-3% price change
โข ๐ Weak: <1.5% price change
๐จ Visual Features:
๐ Information Table Shows:
โข Trend Direction with color coding
โข Price Change % over 21 days
โข Trend Strength classification
โข Bull/Bear Days count
โข Higher Highs/Lower Lows count
โข Analysis Period (customizable)
๐ Chart Indicators:
โข Trend Line (21-day moving average)
โข Background Color for quick trend identification
โข Trend Arrows (โฒ โผ โก) on chart
โข Customizable display options
โ๏ธ Customizable Settings:
๐ฏ Analysis Settings:
โข Lookback Days: 5-50 days (default: 14)
โข Sideways Threshold: 0.5-10% (default: 2%)
โข Trend Strength: Low/Medium/High sensitivity
๐จ Display Options:
โข Table Position: 9 different positions
โข Table Size: Tiny to Large
โข Show/Hide: Table, Trend Line, Background, Arrows
๐จ Alert Options:
โข Trend Change to Uptrend
โข Trend Change to Downtrend
โข Trend Change to Sideways
This indicator gives you a clear, objective view of the 21-day trend with multiple confirmation signals! ๐
Catatan Rilis
โSwisscoverโข โ Trend Atlas: The ultimate 21-day market compass. Detect uptrends, downtrends, and sideways phases with ATR-powered strength analysis, bullish/bearish stats, and a visual dashboard โ all in one tool.โโก Itโs short, professional, and highlights:
- The 21-day focus
- Trend detection
- ATR-powered analysis
- The visual dashboard
Catatan Rilis
โSwisscoverโข โ Trend Atlas: The ultimate 21-day market compass. Detect uptrends, downtrends, and sideways phases with ATR-powered strength analysis, bullish/bearish stats, and a visual dashboard โ all in one tool.โโก Itโs short, professional, and highlights:
- The 21-day focus
- Trend detection
- ATR-powered analysis
- The visual dashboard
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.