OPEN-SOURCE SCRIPT
Weinstein Stage Analysis

Weinstein Stage Analysis [Final Color-Changing Version]
This is an enhanced version of Stan Weinstein's classic Stage Analysis, optimized for visual clarity on dark themes. The indicator instantly colors your candlesticks based on the current Weinstein Stage using a bright, fully opaque color scheme that stands out strongly even on dark charts.
Key Features:
- Uses Weekly 30-period SMA (customizable length) as the primary reference line
- Supports "Within Range %" parameter – set to 0% for super-strong stocks that must stay clearly above/below the MA
- Four distinct stages with vivid colors:
• Stage 1 (Accumulation) – Bright Cyan (#00FFFF) – Stock is basing or consolidating near the MA
• Stage 2 (Uptrend) – Bright Green (#00CD00) – Strong uptrend, price clearly above the weekly MA
• Stage 3 (Topping) – Bright Orange (#FFAA00) – Price is still above MA but weakening (potential distribution)
• Stage 4 (Downtrend) – Bright Red (#FF0000) – Strong downtrend, price clearly below the weekly MA
- Automatic stage transition logic with perfect color persistence (no flickering)
- Super visible on both light and dark themes – colors are 100% opaque and highly saturated
- Plots the Weekly 30 SMA as a thick white line for easy reference
How to Use:
1. Add to any chart (works best on daily or weekly timeframes)
2. For very strong momentum stocks, set "Within Range %" to 0% – this forces the indicator to only show Stage 2 when price is clearly above the MA
3. Use default 30-period length or adjust based on your preference
4. Watch for clean stage transitions – especially the switch from Stage 3 (orange) to Stage 4 (red) as a strong sell signal, or Stage 1 (cyan) to Stage 2 (green) as a powerful buy signal
This is an enhanced version of Stan Weinstein's classic Stage Analysis, optimized for visual clarity on dark themes. The indicator instantly colors your candlesticks based on the current Weinstein Stage using a bright, fully opaque color scheme that stands out strongly even on dark charts.
Key Features:
- Uses Weekly 30-period SMA (customizable length) as the primary reference line
- Supports "Within Range %" parameter – set to 0% for super-strong stocks that must stay clearly above/below the MA
- Four distinct stages with vivid colors:
• Stage 1 (Accumulation) – Bright Cyan (#00FFFF) – Stock is basing or consolidating near the MA
• Stage 2 (Uptrend) – Bright Green (#00CD00) – Strong uptrend, price clearly above the weekly MA
• Stage 3 (Topping) – Bright Orange (#FFAA00) – Price is still above MA but weakening (potential distribution)
• Stage 4 (Downtrend) – Bright Red (#FF0000) – Strong downtrend, price clearly below the weekly MA
- Automatic stage transition logic with perfect color persistence (no flickering)
- Super visible on both light and dark themes – colors are 100% opaque and highly saturated
- Plots the Weekly 30 SMA as a thick white line for easy reference
How to Use:
1. Add to any chart (works best on daily or weekly timeframes)
2. For very strong momentum stocks, set "Within Range %" to 0% – this forces the indicator to only show Stage 2 when price is clearly above the MA
3. Use default 30-period length or adjust based on your preference
4. Watch for clean stage transitions – especially the switch from Stage 3 (orange) to Stage 4 (red) as a strong sell signal, or Stage 1 (cyan) to Stage 2 (green) as a powerful buy signal
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.