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
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.