[GYTS-Pro] Market Regime Detector

🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- INTRODUCTION --------- 🌸
💮 What is the Market Regime Detector?
The Market Regime Detector is an advanced, consensus-based indicator that identifies the current market state to increase the probability of profitable trades. By distinguishing between trending (bullish or bearish) and cyclic (range-bound) market conditions, this detector helps you select appropriate tactics for different environments. Instead of forcing a single strategy across all market conditions, our detector allows you to adapt your approach based on real-time market behaviour.
💮 The Importance of Market Regimes
Markets constantly shift between different behavioural states or "regimes":
• Bullish trending markets - characterised by sustained upward price movement
• Bearish trending markets - characterised by sustained downward price movement
• Cyclic markets - characterised by range-bound, oscillating behaviour
Each regime requires fundamentally different trading approaches. Trend-following strategies excel in trending markets but fail in cyclic ones, while mean-reversion strategies shine in cyclic markets but underperform in trending conditions. However, detecting these regimes is easier said than done, and we have gone through hundreds of hours of testing to create the Market Regime Detector, using multiple very sophisticated methods in an easy-to-use indicator.
💮 Professional vs Community Edition
The Market Regime Detector comes in two versions: a comprehensive Professional Edition and a streamlined Community Edition.
Key advantages of the Professional Edition:
• Enhanced detection accuracy - Utilises 5 advanced detection methods (compared to only 2 in the CE version)
• Proprietary cycle measurement - Automatically detects the market's dominant cycle instead of requiring manual input
• Superior consensus mechanism - Includes a unique "strength-weighted decision" mode that gives more influence to stronger signals
• Reduced false signals - Multiple complementary methods working together provide more reliable regime identification
• Advanced DSP algorithms - Implements sophisticated digital signal processing techniques for superior market analysis
The Professional Edition delivers significant improvements in detection accuracy, signal stability, and overall trading performance.
🌸 --------- KEY FEATURES --------- 🌸
💮 Consensus-Based Detection
Rather than relying on a single method, our detector employs multiple complementary detection methodologies that analyse different aspects of market behaviour:
• Advanced digital signal processing techniques
• Volatility and momentum analysis
• Adaptive filters and mathematical transformations
• Cycle identification
• Channel breakout detection
These diverse perspectives are synthesised into a robust consensus that minimises false signals while maintaining responsiveness to genuine regime changes.
💮 Proprietary Dominant Cycle Measurement (Pro Edition only)
At the heart of our Professional Edition detector is a proprietary dominant cycle measurement system that automatically and adaptively identifies the market's natural rhythm. This system provides a stable reference framework that continuously adapts to changing market conditions while avoiding the erratic behaviour of typical cycle-finding algorithms like Hilbert Transforms, Discrete Fourier Transforms, or autocorrelation measurements.
Unlike the Community Edition which requires manual input of a single, constant dominant cycle period, the Professional Edition automatically detects and continuously adapts this critical parameter. This automated and adaptive approach ensures optimal detection accuracy across different markets and timeframes without requiring user expertise in cycle analysis, and provides significantly better responsiveness to evolving market conditions.
💮 Intuitive Parameter System
We've distilled complex technical parameters into intuitive controls that traders can easily understand:
• Adaptability - how quickly the detector responds to changing market conditions
• Sensitivity - how readily the detector identifies transitions between regimes
• Consensus requirement - how much agreement is needed among detection methods
This approach makes the detector accessible to traders of all experience levels while preserving the power of the underlying algorithms.
💮 Visual Market Feedback
The detector provides clear visual feedback about the current market regime through:
• Colour-coded chart backgrounds (purple shades for bullish, pink for bearish, yellow for cyclic)
• Colour-coded price bars
• Strength indicators showing the degree of consensus
• Customisable color schemes to match your preferences or trading system
💮 Integration in the GYTS suite
What is of paramount importance, is that the Market Regime Detector is compatible with the GYTS Suite, i.e. it passes the regime into the Order Orchestrator where you can set how to trade the trending and cyclic regime.
🌸 --------- CONFIGURATION SETTINGS --------- 🌸
💮 Adaptability
Controls how quickly the Market Regime detector adapts to changing market conditions. You can see it as a low-frequency, long-term change parameter:
• Very Low: Very slow adaptation, most stable but may miss regime changes
• Low: Slower adaptation, more stability but less responsiveness
• Normal: Balanced between stability and responsiveness
• High: Faster adaptation, more responsive but less stable
• Very High: Very fast adaptation, highly responsive but may generate false signals
This setting affects lookback periods and filter parameters across all detection methods.
💮 Sensitivity
Controls how sensitive the detector is to market regime transitions. This acts as a high-frequency, short-term change parameter:
• Very Low: Requires substantial evidence to identify a regime change
• Low: Less sensitive, reduces false signals but may miss some transitions
• Normal: Balanced sensitivity suitable for most markets
• High: More sensitive, detects subtle regime changes but may have more noise
• Very High: Extremely sensitive, detects minor fluctuations but may produce frequent changes
This setting affects thresholds for regime detection across all methods.
💮 Consensus Mode
Determines how the signals from all detection methods are combined to produce the final market regime:
• Any Method (OR): Signals bullish/bearish if any method detects that regime. If methods conflict, the stronger signal wins. More sensitive, catches more regime changes but may produce more false signals.
• All Methods (AND): Signals only when all methods agree on the regime. More conservative, reduces false signals but might miss some legitimate regime changes.
• Weighted Decision: Balances all methods with equal weighting. Signals bullish/bearish when the weighted consensus reaches 0.5 or higher. Provides a middle ground between sensitivity and stability.
• Strength-Weighted Decision (Pro Edition only): Methods with stronger signals have more influence in the final decision. This exclusive feature is particularly effective at capturing strong market regime signals even if they come from fewer methods, providing more accurate regime detection in transitional market phases.
Each mode also calculates a continuous regime strength value that's used for color intensity in the 'unconstrained' display mode.
💮 Display Mode
Choose how to display the market regime colours:
• Unconstrained regime: Shows the regime strength as a continuous gradient. This provides more nuanced visualisation where the intensity of the color indicates the strength of the trend.
• Consensus only: Shows only the final consensus regime with fixed colours based on the detected regime type.
The background and bar colours will change to indicate the current market regime:
• Purple shades: Bullish trending market. In 'unconstrained' mode, darker purple indicates a stronger bullish trend.
• Pink shades: Bearish trending market. In 'unconstrained' mode, darker pink indicates a stronger bearish trend.
• Yellow: Cyclic (range-bound) market.
💮 Custom Color Options
The Market Regime Detector allows you to customize the color scheme to match your personal preferences or to coordinate with other indicators:
• Use custom colours: Toggle to enable your own color choices instead of the default scheme
• Transparency: Adjust the transparency level of all regime colours
• Bullish colours: Define custom colours for strong, medium, weak, and very weak bullish trends
• Bearish colours: Define custom colours for strong, medium, weak, and very weak bearish trends
• Cyclic color: Define a custom color for cyclic (range-bound) market conditions
🌸 --------- DETECTION METHODS --------- 🌸
💮 Multi-Method Approach
The Professional Edition Market Regime Detector uses a diverse array of five complementary detection methods (compared to only two in the Community Edition), each analysing different market characteristics. These methods have been carefully selected to be orthogonal to each other, providing unique perspectives on market behaviour. The consensus mechanism combines these perspectives to produce a robust overall assessment of the current market regime.
💮 Complementary Detection Methods
The Professional Edition employs five sophisticated methods (compared to only two in the Community Edition), all powered by our proprietary adaptive dominant cycle detection. Each method provides a unique perspective on market behavior:
1. Cyclic Centroid Analysis - Calculates the market's 'centre point' over its dominant cycle. It then measures the price's displacement from this centre to determine if there's a directional bias (trend) or equilibrium (cyclic). This is the enhanced Pro version of the 'Dominant Cycle Average' (DCA) method found in the Community Edition.
2. Spectral Momentum - Measures momentum across the market's frequency spectrum. A strong trend is identified when momentum becomes concentrated in low-frequency (long-term) components.
3. Energy Distribution Gauge - Gauges how price movement energy is distributed. It flags a cyclic state when energy is concentrated at the dominant cycle frequency, and a trending state when the energy is spread out.
4. Volatility Channel - Models the market's volatility state. An 'expansive' state where price breaks volatility bands indicates a trend, while a 'compressive' state within the bands signals a cyclic regime. This is the enhanced Pro version of the 'Volatility Channel' method found in the Community Edition.
5. Phase Coherence Detector - Detects the degree of correlation between fast and slow adaptive price trackers. High coherence indicates a stable trend, while low coherence suggests a ranging or indecisive market.
What makes these methods powerful is not just their individual sophistication, but how they complement one another:
• Some excel at early detection while others provide confirmation
• Some analyse time-domain behaviour while others work in the frequency domain
• Some focus on momentum characteristics while others assess volatility patterns
• Some respond quickly to changes while others filter out market noise
This creates a comprehensive analytical framework that can detect regime changes more accurately than any single method. All methods utilize the automatically detected and continuously adaptive dominant cycle period, ensuring they remain precisely calibrated to current market conditions without manual intervention.
🌸 --------- USAGE GUIDE --------- 🌸
💮 Starting with Default Settings
The default settings (Normal for Adaptability, Sensitivity, and Consensus) provide a balanced starting point suitable for most markets and timeframes. Begin by observing how these settings identify regimes in your preferred instruments.
💮 Adjusting Parameters
• If you notice too many regime changes → Decrease Sensitivity or increase Consensus requirement
• If regime changes seem delayed → Increase Adaptability
• If a trending regime is not detected, the market is automatically assigned to be in a cyclic state. The majority of methods actually measure this explicitly.
• If you want to see more nuanced regime transitions → Try the "unconstrained" display mode (note that this will not affect the output to other indicators)
💮 Trading Applications
Regime-Specific Strategies:
• Bullish Trending Regime - Use trend-following strategies, trail stops wider, focus on breakouts, consider holding positions longer, and emphasise buying dips
• Bearish Trending Regime - Consider shorts, tighter stops, focus on breakdown points, sell rallies, implement downside protection, and reduce position sizes
• Cyclic Regime - Apply mean-reversion strategies, trade range boundaries, apply oscillators, target definable support/resistance levels, and use profit-taking at extremes
Strategy Switching:
Create a set of rules for each market regime and switch between them based on the detector's signal. This approach can significantly improve performance compared to applying a single strategy across all market conditions. The Pro Edition's multiple detection methods and advanced consensus mechanisms provide more reliable regime transitions, leading to better strategy switching decisions.
GYTS Suite Integration:
• In the GYTS 🎼 Order Orchestrator, select the '🔗 STREAM-int 🧊 Market Regime' as the market regime source
• Note that the consensus output (i.e. not the "unconstrained" display) will be used in this stream
• Create different strategies for trending (bullish/bearish) and cyclic regimes. The GYTS 🎼 Order Orchestrator is specifically made for this.
• The output stream is actually very simple, and can possibly be used in indicators and strategies as well. It outputs 1 for bullish, -1 for bearish and 0 for cyclic regime.
🌸 --------- FINAL NOTES --------- 🌸
💮 Development Philosophy
The Market Regime Detector has been developed with several key principles in mind:
1. Robustness - The detection methods have been rigorously tested across diverse markets and timeframes to ensure reliable performance.
2. Adaptability - The detector automatically adjusts to changing market conditions, requiring minimal manual intervention.
3. Complementarity - Each detection method provides a unique perspective, with the collective consensus being more reliable than any individual method.
4. Intuitiveness - Complex technical parameters have been abstracted into easily understood controls.
💮 Ongoing Refinement
The Market Regime Detector is under continuous development. We regularly:
• Fine-tune parameters based on expanded market data using state-of-the-art Machine Learning techniques
• Research and integrate new detection methodologies
• Optimise computational efficiency for real-time analysis
Your feedback and suggestions are very important in this ongoing refinement process!
- More easy to understand consensus mechanism
- Custom colouring options
* Updated Spectral Momentum method with latest training data
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact GoemonYae directly.
Note that this private, invite-only script has not been reviewed by script moderators, and its compliance with House Rules is undetermined. TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
🌐 Website: goemonyae.com
📖 Documentation: goemonyae.com/docs
💬 Discord server (including YaeBot): discord.gg/ef6Tu4kha3
👔 personal LinkedIn: linkedin.com/in/arthur-nazarian
Disclaimer
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact GoemonYae directly.
Note that this private, invite-only script has not been reviewed by script moderators, and its compliance with House Rules is undetermined. TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
🌐 Website: goemonyae.com
📖 Documentation: goemonyae.com/docs
💬 Discord server (including YaeBot): discord.gg/ef6Tu4kha3
👔 personal LinkedIn: linkedin.com/in/arthur-nazarian