MERV: Market Entropy & Rhythm Visualizer [BullByte]The MERV (Market Entropy & Rhythm Visualizer) indicator analyzes market conditions by measuring entropy (randomness vs. trend), tradeability (volatility/momentum), and cyclical rhythm. It provides traders with an easy-to-read dashboard and oscillator to understand when markets are structured or choppy, and when trading conditions are optimal.
Purpose of the Indicator
MERV’s goal is to help traders identify different market regimes. It quantifies how structured or random recent price action is (entropy), how strong and volatile the movement is (tradeability), and whether a repeating cycle exists. By visualizing these together, MERV highlights trending vs. choppy environments and flags when conditions are favorable for entering trades. For example, a low entropy value means prices are following a clear trend line, whereas high entropy indicates a lot of noise or sideways action. The indicator’s combination of measures is original: it fuses statistical trend-fit (entropy), volatility trends (ATR and slope), and cycle analysis to give a comprehensive view of market behavior.
Why a Trader Should Use It
Traders often need to know when a market trend is reliable vs. when it is just noise. MERV helps in several ways: it shows when the market has a strong direction (low entropy, high tradeability) and when it’s ranging (high entropy). This can prevent entering trend-following strategies during choppy periods, or help catch breakouts early. The “Optimal Regime” marker (a star) highlights moments when entropy is very low and tradeability is very high, typically the best conditions for trend trades. By using MERV, a trader gains an empirical “go/no-go” signal based on price history, rather than guessing from price alone. It’s also adaptable: you can apply it to stocks, forex, crypto, etc., on any timeframe. For example, during a bullish phase of a stock, MERV will turn green (Trending Mode) and often show a star, signaling good follow-through. If the market later grinds sideways, MERV will shift to magenta (Choppy Mode), warning you that trend-following is now risky.
Why These Components Were Chosen
Market Entropy (via R²) : This measures how well recent prices fit a straight line. We compute a linear regression on the last len_entropy bars and calculate R². Entropy = 1 - R², so entropy is low when prices follow a trend (R² near 1) and high when price action is erratic (R² near 0). This single number captures trend strength vs noise.
Tradeability (ATR + Slope) : We combine two familiar measures: the Average True Range (ATR) (normalized by price) and the absolute slope of the regression line (scaled by ATR). Together they reflect how active and directional the market is. A high ATR or strong slope means big moves, making a trend more “tradeable.” We take a simple average of the normalized ATR and slope to get tradeability_raw. Then we convert it to a percentile rank over the lookback window so it’s stable between 0 and 1.
Percentile Ranks : To make entropy and tradeability values easy to interpret, we convert each to a 0–100 rank based on the past len_entropy periods. This turns raw metrics into a consistent scale. (For example, an entropy rank of 90 means current entropy is higher than 90% of recent values.) We then divide by 100 to plot them on a 0–1 scale.
Market Mode (Regime) : Based on those ranks, MERV classifies the market:
Trending (Green) : Low entropy rank (<40%) and high tradeability rank (>60%). This means the market is structurally trending with high activity.
Choppy (Magenta) : High entropy rank (>60%) and low tradeability rank (<40%). This is a mostly random, low-momentum market.
Neutral (Cyan) : All other cases. This covers mixed regimes not strongly trending or choppy.
The mode is shown as a colored bar at the bottom: green for trending, magenta for choppy, cyan for neutral.
Optimal Regime Signal : Separately, we mark an “optimal” condition when entropy_norm < 0.3 and tradeability > 0.7 (both normalized 0–1). When this is true, a ★ star appears on the bottom line. This star is colored white when truly optimal, gold when only tradeability is high (but entropy not quite low enough), and black when neither condition holds. This gives a quick visual cue for very favorable conditions.
What Makes MERV Stand Out
Holistic View : Unlike a single-oscillator, MERV combines trend, volatility, and cycle analysis in one tool. This multi-faceted approach is unique.
Visual Dashboard : The fixed on-chart dashboard (shown at your chosen corner) summarizes all metrics in bar/gauge form. Even a non-technical user can glance at it: more “█” blocks = a higher value, colors match the plots. This is more intuitive than raw numbers.
Adaptive Thresholds : Using percentile ranks means MERV auto-adjusts to each market’s character, rather than requiring fixed thresholds.
Cycle Insight : The rhythm plot adds information rarely found in indicators – it shows if there’s a repeating cycle (and its period in bars) and how strong it is. This can hint at natural bounce or reversal intervals.
Modern Look : The neon color scheme and glow effects make the lines easy to distinguish (blue/pink for entropy, green/orange for tradeability, etc.) and the filled area between them highlights when one dominates the other.
Recommended Timeframes
MERV can be applied to any timeframe, but it will be more reliable on higher timeframes. The default len_entropy = 50 and len_rhythm = 30 mean we use 30–50 bars of history, so on a daily chart that’s ~2–3 months of data; on a 1-hour chart it’s about 2–3 days. In practice:
Swing/Position traders might prefer Daily or 4H charts, where the calculations smooth out small noise. Entropy and cycles are more meaningful on longer trends.
Day trader s could use 15m or 1H charts if they adjust the inputs (e.g. shorter windows). This provides more sensitivity to intraday cycles.
Scalpers might find MERV too “slow” unless input lengths are set very low.
In summary, the indicator works anywhere, but the defaults are tuned for capturing medium-term trends. Users can adjust len_entropy and len_rhythm to match their chart’s volatility. The dashboard position can also be moved (top-left, bottom-right, etc.) so it doesn’t cover important chart areas.
How the Scoring/Logic Works (Step-by-Step)
Compute Entropy : A linear regression line is fit to the last len_entropy closes. We compute R² (goodness of fit). Entropy = 1 – R². So a strong straight-line trend gives low entropy; a flat/noisy set of points gives high entropy.
Compute Tradeability : We get ATR over len_entropy bars, normalize it by price (so it’s a fraction of price). We also calculate the regression slope (difference between the predicted close and last close). We scale |slope| by ATR to get a dimensionless measure. We average these (ATR% and slope%) to get tradeability_raw. This represents how big and directional price moves are.
Convert to Percentiles : Each new entropy and tradeability value is inserted into a rolling array of the last 50 values. We then compute the percentile rank of the current value in that array (0–100%) using a simple loop. This tells us where the current bar stands relative to history. We then divide by 100 to plot on .
Determine Modes and Signal : Based on these normalized metrics: if entropy < 0.4 and tradeability > 0.6 (40% and 60% thresholds), we set mode = Trending (1). If entropy > 0.6 and tradeability < 0.4, mode = Choppy (-1). Otherwise mode = Neutral (0). Separately, if entropy_norm < 0.3 and tradeability > 0.7, we set an optimal flag. These conditions trigger the colored mode bars and the star line.
Rhythm Detection : Every bar, if we have enough data, we take the last len_rhythm closes and compute the mean and standard deviation. Then for lags from 5 up to len_rhythm, we calculate a normalized autocorrelation coefficient. We track the lag that gives the maximum correlation (best match). This “best lag” divided by len_rhythm is plotted (a value between 0 and 1). Its color changes with the correlation strength. We also smooth the best correlation value over 5 bars to plot as “Cycle Strength” (also 0 to 1). This shows if there is a consistent cycle length in recent price action.
Heatmap (Optional) : The background color behind the oscillator panel can change with entropy. If “Neon Rainbow” style is on, low entropy is blue and high entropy is pink (via a custom color function), otherwise a classic green-to-red gradient can be used. This visually reinforces the entropy value.
Volume Regime (Dashboard Only) : We compute vol_norm = volume / sma(volume, len_entropy). If this is above 1.5, it’s considered high volume (neon orange); below 0.7 is low (blue); otherwise normal (green). The dashboard shows this as a bar gauge and percentage. This is for context only.
Oscillator Plot – How to Read It
The main panel (oscillator) has multiple colored lines on a 0–1 vertical scale, with horizontal markers at 0.2 (Low), 0.5 (Mid), and 0.8 (High). Here’s each element:
Entropy Line (Blue→Pink) : This line (and its glow) shows normalized entropy (0 = very low, 1 = very high). It is blue/green when entropy is low (strong trend) and pink/purple when entropy is high (choppy). A value near 0.0 (below 0.2 line) indicates a very well-defined trend. A value near 1.0 (above 0.8 line) means the market is very random. Watch for it dipping near 0: that suggests a strong trend has formed.
Tradeability Line (Green→Yellow) : This represents normalized tradeability. It is colored bright green when tradeability is low, transitioning to yellow as tradeability increases. Higher values (approaching 1) mean big moves and strong slopes. Typically in a market rally or crash, this line will rise. A crossing above ~0.7 often coincides with good trend strength.
Filled Area (Orange Shade) : The orange-ish fill between the entropy and tradeability lines highlights when one dominates the other. If the area is large, the two metrics diverge; if small, they are similar. This is mostly aesthetic but can catch the eye when the lines cross over or remain close.
Rhythm (Cycle) Line : This is plotted as (best_lag / len_rhythm). It indicates the relative period of the strongest cycle. For example, a value of 0.5 means the strongest cycle was about half the window length. The line’s color (green, orange, or pink) reflects how strong that cycle is (green = strong). If no clear cycle is found, this line may be flat or near zero.
Cycle Strength Line : Plotted on the same scale, this shows the autocorrelation strength (0–1). A high value (e.g. above 0.7, shown in green) means the cycle is very pronounced. Low values (pink) mean any cycle is weak and unreliable.
Mode Bars (Bottom) : Below the main oscillator, thick colored bars appear: a green bar means Trending Mode, magenta means Choppy Mode, and cyan means Neutral. These bars all have a fixed height (–0.1) and make it very easy to see the current regime.
Optimal Regime Line (Bottom) : Just below the mode bars is a thick horizontal line at –0.18. Its color indicates regime quality: White (★) means “Optimal Regime” (very low entropy and high tradeability). Gold (★) means not quite optimal (high tradeability but entropy not low enough). Black means neither condition. This star line quickly tells you when conditions are ideal (white star) or simply good (gold star).
Horizontal Guides : The dotted lines at 0.2 (Low), 0.5 (Mid), and 0.8 (High) serve as reference lines. For example, an entropy or tradeability reading above 0.8 is “High,” and below 0.2 is “Low,” as labeled on the chart. These help you gauge values at a glance.
Dashboard (Fixed Corner Panel)
MERV also includes a compact table (dashboard) that can be positioned in any corner. It summarizes key values each bar. Here is how to read its rows:
Entropy : Shows a bar of blocks (█ and ░). More █ blocks = higher entropy. It also gives a percentage (rounded). A full bar (10 blocks) with a high % means very chaotic market. The text is colored similarly (blue-green for low, pink for high).
Rhythm : Shows the best cycle period in bars (e.g. “15 bars”). If no calculation yet, it shows “n/a.” The text color matches the rhythm line.
Cycle Strength : Gives the cycle correlation as a percentage (smoothed, as shown on chart). Higher % (green) means a strong cycle.
Tradeability : Displays a 10-block gauge for tradeability. More blocks = more tradeable market. It also shows “gauge” text colored green→yellow accordingly.
Market Mode : Simply shows “Trending”, “Choppy”, or “Neutral” (cyan text) to match the mode bar color.
Volume Regime : Similar to tradeability, shows blocks for current volume vs. average. Above-average volume gives orange blocks, below-average gives blue blocks. A % value indicates current volume relative to average. This row helps see if volume is abnormally high or low.
Optimal Status (Large Row) : In bold, either “★ Optimal Regime” (white text) if the star condition is met, “★ High Tradeability” (gold text) if tradeability alone is high, or “— Not Optimal” (gray text) otherwise. This large row catches your eye when conditions are ripe.
In short, the dashboard turns the numeric state into an easy read: filled bars, colors, and text let you see current conditions without reading the plot. For instance, five blue blocks under Entropy and “25%” tells you entropy is low (good), and a row showing “Trending” in green confirms a trend state.
Real-Life Example
Example : Consider a daily chart of a trending stock (e.g. “AAPL, 1D”). During a strong uptrend, recent prices fit a clear upward line, so Entropy would be low (blue line near bottom, perhaps below the 0.2 line). Volatility and slope are high, so Tradeability is high (green-yellow line near top). In the dashboard, Entropy might show only 1–2 blocks (e.g. 10%) and Tradeability nearly full (e.g. 90%). The Market Mode bar turns green (Trending), and you might see a white ★ on the optimal line if conditions are very good. The Volume row might light orange if volume is above average during the rally. In contrast, imagine the same stock later in a tight range: Entropy will rise (pink line up, more blocks in dashboard), Tradeability falls (fewer blocks), and the Mode bar turns magenta (Choppy). No star appears in that case.
Consolidated Use Case : Suppose on XYZ stock the dashboard reads “Entropy: █░░░░░░░░ 20%”, “Tradeability: ██████████ 80%”, Mode = Trending (green), and “★ Optimal Regime.” This tells the trader that the market is in a strong, low-noise trend, and it might be a good time to follow the trend (with appropriate risk controls). If instead it reads “Entropy: ████████░░ 80%”, “Tradeability: ███▒▒▒▒▒▒ 30%”, Mode = Choppy (magenta), the trader knows the market is random and low-momentum—likely best to sit out until conditions improve.
Example: How It Looks in Action
Screenshot 1: Trending Market with High Tradeability (SOLUSD, 30m)
What it means:
The market is in a clear, strong trend with excellent conditions for trading. Both trend-following and active strategies are favored, supported by high tradeability and strong volume.
Screenshot 2: Optimal Regime, Strong Trend (ETHUSD, 1h)
What it means:
This is an ideal environment for trend trading. The market is highly organized, tradeability is excellent, and volume supports the move. This is when the indicator signals the highest probability for success.
Screenshot 3: Choppy Market with High Volume (BTC Perpetual, 5m)
What it means:
The market is highly random and choppy, despite a surge in volume. This is a high-risk, low-reward environment, avoid trend strategies, and be cautious even with mean-reversion or scalping.
Settings and Inputs
The script is fully open-source; here are key inputs the user can adjust:
Entropy Window (len_entropy) : Number of bars used for entropy and tradeability (default 50). Larger = smoother, more lag; smaller = more sensitivity.
Rhythm Window (len_rhythm ): Bars used for cycle detection (default 30). This limits the longest cycle we detect.
Dashboard Position : Choose any corner (Top Right default) so it doesn’t cover chart action.
Show Heatmap : Toggles the entropy background coloring on/off.
Heatmap Style : “Neon Rainbow” (colorful) or “Classic” (green→red).
Show Mode Bar : Turn the bottom mode bar on/off.
Show Dashboard : Turn the fixed table panel on/off.
Each setting has a tooltip explaining its effect. In the description we will mention typical settings (e.g. default window sizes) and that the user can move the dashboard corner as desired.
Oscillator Interpretation (Recap)
Lines : Blue/Pink = Entropy (low=trend, high=chop); Green/Yellow = Tradeability (low=quiet, high=volatile).
Fill : Orange tinted area between them (for visual emphasis).
Bars : Green=Trending, Magenta=Choppy, Cyan=Neutral (at bottom).
Star Line : White star = ideal conditions, Gold = good but not ideal.
Horizontal Guides : 0.2 and 0.8 lines mark low/high thresholds for each metric.
Using the chart, a coder or trader can see exactly what each output represents and make decisions accordingly.
Disclaimer
This indicator is provided as-is for educational and analytical purposes only. It does not guarantee any particular trading outcome. Past market patterns may not repeat in the future. Users should apply their own judgment and risk management; do not rely solely on this tool for trading decisions. Remember, TradingView scripts are tools for market analysis, not personalized financial advice. We encourage users to test and combine MERV with other analysis and to trade responsibly.
-BullByte
Regime
ConeCastConeCast is a forward-looking projection indicator that visualizes a future price range (or "cone") based on recent trend momentum and adaptive volatility. Unlike lagging bands or reactive channels, this tool plots a predictive zone 3–50 bars ahead, allowing traders to anticipate potential price behavior rather than merely react to it.
How It Works
The core of ConeCast is a dynamic trend-slope engine derived from a Linear Regression line fitted over a user-defined lookback window. The slope of this trend is projected forward, and the cone’s width adapts based on real-time market volatility. In calm markets, the cone is narrow and focused. In volatile regimes, it expands proportionally, using an ATR-based % of price to scale.
Key Features
📈 Predictive Cone Zone: Visualizes a forward range using trend slope × volatility width.
🔄 Auto-Adaptive Volatility Scaling: Expands or contracts based on market quiet/chaotic states.
📊 Regime Detection: Identifies Bull, Bear, or Neutral states using a tunable slope threshold.
🧭 Multi-Timeframe Compatible: Slope and volatility can be calculated from higher timeframes.
🔔 Smart Alerts: Detects price entering the cone, and signals trend regime changes in real time.
🖼️ Clean Visual Output: Optionally includes outer cones, trend-trail marker, and dashboard label.
How to Use It
Use on 15m–4H charts for best forward visibility.
Look for price entering the cone as a potential trend continuation setup.
Monitor regime changes and volatility expansion to filter choppy market zones.
Tune the slope sensitivity and ATR multiplier to match your symbol's behavior.
Use outer cones to anticipate aggressive swings and wick traps.
What Makes It Unique
ConeCast doesn’t follow price — it predicts a possible future price envelope using trend + volatility math, without relying on lagging indicators or repainting logic. It's a hybrid of regression-based forecasting and dynamic risk zoning, designed for swing traders, scalpers, and algo developers alike.
Limitations
ConeCast projects based on current trend and volatility — it does not "know" future price. Like all projection tools, accuracy depends on trend persistence and market conditions. Use this in combination with confirmation signals and risk management.
[GYTS-CE] Market Regime Detector🧊 Market Regime Detector (Community Edition)
🌸 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. Detecting these regimes is essential for successful trading, which is why we've developed the Market Regime Detector to accurately identify market states using complementary detection methods.
🌸 --------- KEY FEATURES --------- 🌸
💮 Consensus-Based Detection
Rather than relying on a single method, our detector employs two complementary detection methodologies that analyse different aspects of market behaviour:
• Dominant Cycle Average (DCA) - analyzes price movement relative to its lookback period, a proxy for the dominant cycle
• Volatility Channel - examines price behaviour within adaptive volatility bands
These diverse perspectives are synthesised into a robust consensus that minimises false signals while maintaining responsiveness to genuine regime changes.
💮 Dominant Cycle Framework
The Market Regime Detector uses the concept of dominant cycles to establish a reference framework. You can input the dominant cycle period that best represents the natural rhythm of your market, providing a stable foundation for regime detection across different timeframes.
💮 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
• Customizable colour schemes to match your preferences or trading system
💮 Integration in the GYTS suite
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: Very sensitive, detects minor fluctuations but may produce frequent changes
This setting affects thresholds for regime detection across all methods.
💮 Dominant Cycle Period
This parameter allows you to specify the market's natural rhythm in bars. This represents a complete market cycle (up and down movement). Finding the right value for your specific market and timeframe might require some experimentation, but it's a crucial parameter that helps the detector accurately identify regime changes. Most of the times the cycle is between 20 and 40 bars.
💮 Consensus Mode
Determines how the signals from both detection methods are combined to produce the final market regime:
• Any Method (OR) : Signals bullish/bearish if either method detects that regime. If methods conflict (one bullish, one bearish), the stronger signal wins. More sensitive, catches more regime changes but may produce more false signals.
• All Methods (AND) : Signals only when both methods agree on the regime. More conservative, reduces false signals but might miss some legitimate regime changes.
• Weighted Decision : Balances both methods with equal weighting. Provides a middle ground between sensitivity and stability.
Each mode also calculates a continuous regime strength value that's used for colour 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 colour 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 (darker purple indicates stronger bullish trend)
• Pink shades: Bearish trending market (darker pink indicates stronger bearish trend)
• Yellow: Cyclic (range-bound) market
💮 Custom Colour Options
The Market Regime Detector allows you to customize the colour scheme to match your personal preferences or to coordinate with other indicators:
• Use custom colours: Toggle to enable your own colour 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 colour: Define a custom colour for cyclic (range-bound) market conditions
🌸 --------- DETECTION METHODS --------- 🌸
💮 Dominant Cycle Average (DCA)
The Dominant Cycle Average method forms a key part of our detection system:
1. Theoretical Foundation :
The DCA method builds on cycle analysis and the observation that in trending markets, price consistently remains on one side of a moving average calculated using the dominant cycle period. In contrast, during cyclic markets, price oscillates around this average.
2. Calculation Process :
• We calculate a Simple Moving Average (SMA) using the specified lookback period - a proxy for the dominant cycle period
• We then analyse the proportion of time that price spends above or below this SMA over a lookback window. The theory is that the price should cross the SMA each half cycle, assuming that the dominant cycle period is correct and price follows a sinusoid.
• This lookback window is adaptive, scaling with the dominant cycle period (controlled by the Adaptability setting)
• The different values are standardised and normalised to possess more resolving power and to be more robust to noise.
3. Regime Classification :
• When the normalised proportion exceeds a positive threshold (determined by Sensitivity setting), the market is classified as bullish trending
• When it falls below a negative threshold, the market is classified as bearish trending
• When the proportion remains between these thresholds, the market is classified as cyclic
💮 Volatility Channel
The Volatility Channel method complements the DCA method by focusing on price movement relative to adaptive volatility bands:
1. Theoretical Foundation :
This method is based on the observation that trending markets tend to sustain movement outside of normal volatility ranges, while cyclic markets tend to remain contained within these ranges. By creating adaptive bands that adjust to current market volatility, we can detect when price behaviour indicates a trending or cyclic regime.
2. Calculation Process :
• We first calculate a smooth base channel center using a low pass filter, creating a noise-reduced centreline for price
• True Range (TR) is used to measure market volatility, which is then smoothed and scaled by the deviation factor (controlled by Sensitivity)
• Upper and lower bands are created by adding and subtracting this scaled volatility from the centreline
• Price is smoothed using an adaptive A2RMA filter, which has a very flat and stable behaviour, to reduce noise while preserving trend characteristics
• The position of this smoothed price relative to the bands is continuously monitored
3. Regime Classification :
• When smoothed price moves above the upper band, the market is classified as bullish trending
• When smoothed price moves below the lower band, the market is classified as bearish trending
• When price remains between the bands, the market is classified as cyclic
• The magnitude of price's excursion beyond the bands is used to determine trend strength
4. Adaptive Behaviour :
• The smoothing periods and deviation calculations automatically adjust based on the Adaptability setting
• The measured volatility is calculated over a period proportional to the dominant cycle, ensuring the detector works across different timeframes
• Both the center line and the bands adapt dynamically to changing market conditions, making the detector responsive yet stable
This method provides a unique perspective that complements the DCA approach, with the consensus mechanism synthesising insights from both methods.
🌸 --------- USAGE GUIDE --------- 🌸
💮 Starting with Default Settings
The default settings (Normal for Adaptability and Sensitivity, Weighted Decision for Consensus Mode) provide a balanced starting point suitable for most markets and timeframes. Begin by observing how these settings identify regimes in your preferred instruments.
💮 Finding the Optimal Dominant Cycle
The dominant cycle period is a critical parameter. Here are some approaches to finding an appropriate value:
• Start with typical values, usually something around 25 works well
• Visually identify the average distance between significant peaks and troughs
• Experiment with different values and observe which provides the most stable regime identification
• Consider using cycle-finding indicators to help identify the natural rhythm of your market
💮 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
• 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 emphasize 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.
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
• 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!
Stock Sector ETF with IndicatorsThe Stock Sector ETF with Indicators is a versatile tool designed to track the performance of sector-specific ETFs relative to the current asset. It automatically identifies the sector of the underlying symbol and displays the corresponding ETF’s price action alongside key technical indicators. This helps traders analyze sector trends and correlations in real time.
---
Key Features
Automatic Sector Detection:
Fetches the sector of the current asset (e.g., "Technology" for AAPL).
Maps the sector to a user-defined ETF (default: SPDR sector ETFs) .
Technical Indicators:
Simple Moving Average (SMA): Tracks the ETF’s trend.
Bollinger Bands: Highlights volatility and potential reversals.
Donchian High (52-Week High): Identifies long-term resistance levels.
Customizable Inputs:
Adjust indicator parameters (length, visibility).
Override default ETFs for specific sectors.
Informative Table:
Displays the current sector and ETF symbol in the bottom-right corner.
---
Input Settings
SMA Settings
SMA Length: Period for calculating the Simple Moving Average (default: 200).
Show SMA: Toggle visibility of the SMA line.
Bollinger Bands Settings
BB Length: Period for Bollinger Bands calculation (default: 20).
BB Multiplier: Standard deviation multiplier (default: 2.0).
Show Bollinger Bands: Toggle visibility of the bands.
Donchian High (52-Week High)
Daily High Length: Days used to calculate the high (default: 252, approx. 1 year).
Show High: Toggle visibility of the 52-week high line.
Sector Selections
Customize ETFs for each sector (e.g., replace XLU with another utilities ETF).
---
Example Use Cases
Trend Analysis: Compare a stock’s price action to its sector ETF’s SMA for trend confirmation.
Volatility Signals: Use Bollinger Bands to spot ETF price squeezes or breakouts.
Sector Strength: Monitor if the ETF is approaching its 52-week high to gauge sector momentum.
Enjoy tracking sector trends with ease! 🚀
FX DispersionThis script calculates the dispersion of a basket of 5 FX pairs and then calculates the z-score the z-score is then made into a composite using the 30 and 60 ema of the z-score to smooth any noise. It must be used on one of the FX pairs in the basket and on the 1-minute timeframe as it has been hardcoded for 1 min use below.
Interpretation - Dispersion is a component of volatility - the dispersion of the underlying basket increases above 0.5 and decreases below 0.5.
Although increased dispersion is beneficial to momentum and trend-following strategies on the monthly and weekly timeframes. Observe this on the 1-minute timeframe and how dispersion crossing above/ below 0.5 it can signal reversion or momentum for the next period.
Blockunity Regime Monitoring (BRM)Efficiently analyze market conditions and detect overheating zones.
Regime Monitoring (BRM) is here to help you analyze the behavior of financial markets. The oscillator allows you to observe when an asset’s trend is likely to reverse. The trend is also given by the indicator, as is the phase the market is in (trending or congested). The BRM also provides the state of the Choppiness Index, indicating whether or not the asset is about to enter a more volatile phase.
The Idea
The goal is to provide the community with a comprehensive tool for tracking market conditions, with a visual approach to identifying overheating zones.
How to Use
This tool consists of 3 main components:
An oscillator, which we describe in detail below.
Bar color to transcribe oscillator information directly onto the graph. To activate Bar Color, make sure the first option is checked in the settings. You must also uncheck "Borders" and "Wick" in your Chart Settings.
A panel that summarizes the status of various indicator information.
Elements
The Regime Monitoring oscillator
The oscillator provides several information points. First, it gives the market trend of the asset:
Green: Bullish trend.
Red: Bearish trend.
Blue: Contested trend.
It then indicates areas of overheating, where it is considered statistically probable that we will see a change in trend dynamics. These moments are shown in yellow.
This market trend is also indicated in the table.
If you see that the oscillator is above or below these limits, but not yellow, this is because we use a Choppiness Index to filter this information.
The "Enable Choppiness Index Filter" is enabled by default in the settings. So, if the Chop is discharged (under 38.2), then the oscillator's overheating state is ignored.
You can see the difference in the images below, the first with the filter and the other without:
Market Phase
We use a Vertical Horizontal Filter (VHF) to define the market phase the asset is in. This phase can have two values:
Trending: Assets evolve within a trend.
Congestion: The asset is in a moment of congestion.
Chop State
Visualize the Choppiness Index, indicating whether an asset is gearing up to enter a phase of increased volatility. It can be:
Charged: Chop is considered to indicate to be entering a stable phase.
Neutral: Chop is neutral and does not provide any specific information.
Discharged: Chop is considered to indicate a continuation of the trend.
In addition, with the "Show Choppiness Index" option, you can plot the Chop on the oscillator:
Other Settings
You can also modify the standard Regime Monitoring parameters (Lookback, Smoothing, Limits), display or hide certain components, and change all the colors.
How it Works
Regime Monitoring's main oscillator is established as follows:
We calculate the percentage of times the closing price was higher than the opening price. This is then divided by a lookback period, which in this case defaults to 20. This calculation gives a probability of the current regime.
Regime Filter [CHE]About:
A market regime filter is a tool used by traders and investors to identify the current state or "regime" of the market and adjust their investment strategies accordingly. This can involve identifying trends in market behavior, such as bullish or bearish trends, and using that information to make decisions about which assets to buy or sell.
Market regime filters can be based on a variety of factors, including economic indicators, market sentiment, and technical analysis. They are often used in conjunction with other trading strategies and can help traders and investors manage risk and optimize their returns.
It's important to note that market regime filters are not always accurate and can change over time, so it's important for traders and investors to regularly review and update their filters to ensure that they are relevant and effective.
Understanding the use of a regime filter in trading:
The importance of a trading filter cannot be overemphasized. As a matter of fact, the chances of any trading system making consistent returns over the long term depends on it trading in the right market environment — buying when the market is bullish and selling when the market is bearish. Some traders may want to stay out of the market when the conditions are unfavorable.
The heard of this Regime Filter is the well kown Andean Oscillator. The proposed indicator aims to measure the degree of variations of individual up-trends and down-trends in the price, thus allowing to highlight the direction and amplitude of a current trend.
Settings
Length : Determines the significance of the trends degree of variations measured by the indicator.
Signal Length : Moving average period of the signal line.
The regime filter uses the color yellow and blue, yellow stands for bullish and blue for bearish.
In daily use I have found that it makes sense to use it in different timeframes to identify meaningful trends.
best regards and I hope you enjoy this new indicator
Chervolino
Qube [AstrideUnicorn]Qube is an indicator that shows market regimes. It is able to detect medium and long term trends and ranging markets. If the indicator bars are colored blue and are between the two blue lines, it means that the market is in sideways movement or consolidation. If indicator bars cross the upper boundary and are colored green, it means that the market is in an uptrend. Red bars crossing the lower blue line indicate a downward trend. The red or green columns are further referred as signal bars.
The indicator is based on the normalized momentum oscillator raised to the third power. This is done to increase the sensitivity of the indicator and to emphasize the difference between the market modes.
The indicator can be used in different ways. One of them is determining the trend direction based on the last signal bar. Even if the current indicator bar is blue (showing range or consolidation), the user should consider the longer-term market mode as upward if the last signal bar is green. And vice versa, if the last signal bar is red, the current market bias is downward. One other way to use the indicator is to catch active price impulses, when columns of the same color (red or green) appear consecutively.
SMA RegimeProvides a color coded indicator based upon both the slope of a moving average of choice, and the asset's position in relation to that moving average. If the specified moving average is downward sloping and the asset closes below the moving average the indicator will be red. If the specified moving average is upward sloping and the asset closes above the moving average the indicator will be green. Any other combination of these two factors will color the indicator yellow indicating indecision.
Price density [Measuring Market Noise:Take advantage]$$ Market noise can be problematic to some types of trading strategies yet beneficial to others.
By measuring noise using the 'Price Density' can enable us to improve our
trading edge and turn noise to our advantage.
Robust analysis of noise can inform us when it is best to avoid trend-following
systems (when noise is too high), and vice versa for systems based on a
mean-reverting trading premise (when market noise is low).
__________________________________________________________________________
Using Noise to our advantage
* Two techniques:
-Measure Noise and trade when suitable for the system
~ High noise = avoid trend-following
~ Low noise = avoid mean-reversion
-Match assets to strategies
~ Only trade 'noisy assets' with Mean-reversion Strategies
~ Only trade 'efficient assests' with Trend-following Strategies
## Price density:-
High values = High noise
Low values = Low noise
___________________________________________________________________________
Disclaimer!! Do your own research