OPEN-SOURCE SCRIPT
Cập nhật Improved Weinstein Stage Analysis

The code provides an actionable, disciplined, and visually informative implementation of the “Stage Analysis” approach pioneered by Stan Weinstein, with enhancements to modernize, automate, and clarify the methodology for today’s traders using TradingView. It faithfully follows the workflow recommended: identify long-term cycles, confirm with volume and relative strength, and only engage aggressively with the market during the advancing (bullish) stage with all “clues” aligned.
Phát hành các Ghi chú
Key Enhancements Implemented1. Advanced Stage Logic
Percentage-based MA slope calculation for better sensitivity
Multi-condition stage determination with improved accuracy
Dynamic confirmation system to reduce false signals
2. Sophisticated Volume Analysis
Multi-period volume averages (20 & 50 SMA)
Percentile ranking for context-aware volume spikes
Separate strong vs moderate volume classifications
3. Enhanced Relative Strength
Improved error handling for security data
Momentum-based RS strength detection
Customizable outperformance thresholds
4. Multi-Timeframe Support
Optional higher timeframe confirmation
Stage alignment validation
Visual indicators for timeframe conflicts
5. Advanced Visual Features
Dynamic transparency based on trend strength
Enhanced color coding system
Comprehensive information table with signal strength scoring
6. Improved Alert System
Multi-condition signal validation
Strength-based alert prioritization
Detailed alert messages with context
This enhanced version provides significantly more robust signal generation while maintaining the core Weinstein methodology principles.
Phát hành các Ghi chú
minor updatesPhát hành các Ghi chú
***
**Major Updates in This Release:**
1. **User-Selectable Colors for All Stages and Visual Elements**
- New color picker inputs allow users to personalize stage background, moving average, signal, table, and relative strength colors directly from the indicator settings, reflecting instantly on the chart.
- All main visual elements (stage backgrounds, MA lines, volume spike markers, RS plots/lines, table highlights, and labels) are now controlled via these inputs instead of fixed colors.
2. **Visual Consistency and Custom Brandability**
- Default color scheme remains unchanged for existing users, ensuring a seamless upgrade.
- Visual elements for different Weinstein stages, volume events, and table rows/colors can now be adapted for visual accessibility or organizational branding.
3. **Table and Label Color Enhancement**
- Informational table and on-chart labels reflect user-selected colors for:
- Stage highlights
- Signal (BUY/SELL/WAIT)
- Strength levels (LOW/MED/HIGH)
- Volume, RS, MA slope, and HTF alignment
4. **Improved Table Rendering Logic**
- Ensured no duplicate or overwritten cells; every table cell contains distinct, context-relevant content with the correct custom background color.
- Enhanced readability and clarity for table data with dynamic color backgrounds.
5. **Cleaner, Modular Code Structure**
- Grouped all color settings at the top for easy maintenance.
- All color assignments in the plotting and table logic now reference input variables, centralizing customizability.
***
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.