OPEN-SOURCE SCRIPT
Rachev Regime Analyzer

Rachev Regime Analyzer ~ GForge
What It Does
Measures the ratio of extreme gains to extreme losses to identify whether markets favor bulls or bears. When your best moves are bigger than your worst moves, conditions are bullish. When the opposite is true, conditions are bearish.
Simple Interpretation:
Ratio > 1.2 → Bullish regime (tail gains exceed tail losses)
Ratio < 0.8 → Bearish regime (tail losses exceed tail gains)
Between → Neutral/transitional
Key Features
Two Modes:
Single Asset: Analyze current chart
Multi-Asset: Aggregate regime across 5 assets with custom weights (great for gauging overall crypto/market conditions)
Customizable:
Lookback period (20-200 bars)
Tail percentile (what counts as "extreme")
Bullish/bearish thresholds
6 color schemes
Optional MA smoothing
Visual Signals:
Buy/sell markers at threshold crosses
Background regime coloring
Info table with current values and confidence score
Configurable alerts
How to Use
Choose lookback period based on your timeframe (40-60 bars is a good start)
Watch for threshold crosses - these mark regime changes
Check confidence score - higher = more reliable
Use multi-asset mode to see if entire market is shifting (not just one coin)
Best combined with: Trend indicators, support/resistance, volume analysis
Parameters
Lookback: More bars = smoother, less responsive
Alpha (0.10): Defines extreme events - lower = more extreme
Thresholds: Adjust based on asset volatility
Return Type: Log returns recommended for most assets
What Makes It Useful
Unlike simple volatility measures, this shows asymmetry - whether extreme moves favor upside or downside. A ratio of 1.5 means your extreme gains are 50% larger than extreme losses - that's actionable information about risk-reward dynamics.
Multi-asset aggregation is particularly powerful for crypto traders wanting to gauge if BTC, ETH, SOL, etc. are all showing similar regime characteristics.
Disclaimer
Educational tool only. Not financial advice. Use proper risk management. No indicator works in isolation - always consider broader market context.
Developed by GForge
Comments and feedback welcome! 👍
What It Does
Measures the ratio of extreme gains to extreme losses to identify whether markets favor bulls or bears. When your best moves are bigger than your worst moves, conditions are bullish. When the opposite is true, conditions are bearish.
Simple Interpretation:
Ratio > 1.2 → Bullish regime (tail gains exceed tail losses)
Ratio < 0.8 → Bearish regime (tail losses exceed tail gains)
Between → Neutral/transitional
Key Features
Two Modes:
Single Asset: Analyze current chart
Multi-Asset: Aggregate regime across 5 assets with custom weights (great for gauging overall crypto/market conditions)
Customizable:
Lookback period (20-200 bars)
Tail percentile (what counts as "extreme")
Bullish/bearish thresholds
6 color schemes
Optional MA smoothing
Visual Signals:
Buy/sell markers at threshold crosses
Background regime coloring
Info table with current values and confidence score
Configurable alerts
How to Use
Choose lookback period based on your timeframe (40-60 bars is a good start)
Watch for threshold crosses - these mark regime changes
Check confidence score - higher = more reliable
Use multi-asset mode to see if entire market is shifting (not just one coin)
Best combined with: Trend indicators, support/resistance, volume analysis
Parameters
Lookback: More bars = smoother, less responsive
Alpha (0.10): Defines extreme events - lower = more extreme
Thresholds: Adjust based on asset volatility
Return Type: Log returns recommended for most assets
What Makes It Useful
Unlike simple volatility measures, this shows asymmetry - whether extreme moves favor upside or downside. A ratio of 1.5 means your extreme gains are 50% larger than extreme losses - that's actionable information about risk-reward dynamics.
Multi-asset aggregation is particularly powerful for crypto traders wanting to gauge if BTC, ETH, SOL, etc. are all showing similar regime characteristics.
Disclaimer
Educational tool only. Not financial advice. Use proper risk management. No indicator works in isolation - always consider broader market context.
Developed by GForge
Comments and feedback welcome! 👍
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.