Possible Reversal Zone DetectorThis indicator is a comprehensive tool designed to identify potential market reversal zones and mean-reversion opportunities. It utilizes a dynamic volatility channel to detect when the price becomes overextended and is likely to reverse its short-term direction.
To eliminate false signals during strong trends, it comes packed with multiple highly customizable technical filters, including RSI, Volume Spikes, and Price Action patterns. Furthermore, it visually assists traders by drawing automated Risk/Reward boxes directly on the chart upon signal generation.
Key Features & Mechanics:
Dynamic Volatility Channel: The core of the indicator relies on an EMA baseline and a Standard Deviation multiplier. It creates an envelope around the price action. Signals are generated when the price pierces these outer boundaries and shows rejection.
Volume Spike Filter (Default: ON): A reversal is much stronger when backed by heavy volume. This filter ensures that a signal is only valid if the current volume exceeds the moving average of the volume by a specified multiplier.
Automated Risk/Reward Boxes (Default: ON): Once a valid reversal signal is confirmed, the indicator instantly plots a customizable Risk/Reward box (Default 1:2 RR, 1% Stop Loss) on your chart. This allows you to visually plan your trade, target, and invalidation level effortlessly.
RSI Filter (Default: OFF): When enabled, it checks if the asset is mathematically overbought or oversold before confirming a reversal from the channel boundaries.
Price Action Filters (Default: OFF): For the ultimate "sniper" entry, you can require the indicator to look for specific candlestick patterns—such as a Pinbar (Wick Rejection) or an Engulfing pattern—at the exact moment the price tests the channel boundary.
How to Use:
Wait for the visual arrows (Yellow for Bullish, Red for Bearish) to appear. These indicate that the price has breached the volatility band and satisfied your selected filters (like volume spikes). Evaluate the automatically drawn Risk/Reward box to see if the setup matches your risk management strategy.
Customization:
Every aspect of this indicator is adjustable. You can tweak the channel sensitivity, volume requirements, RSI levels, and the exact dimensions of the Risk/Reward boxes to fit any timeframe or asset class.
Disclaimer: This script is for educational purposes only and does not constitute financial advice. Always use proper risk management. Indicator

Echelon Regime Gauge [JOAT]Echelon Regime Gauge
Introduction
The Echelon Regime Gauge is an open-source market regime detection and session awareness indicator built in Pine Script v6. It classifies the current market state into one of six regimes — Trend Up, Trend Down, Range, Volatile, Squeeze, or Mixed — using a combination of SMA alignment, VWAP slope analysis, and Bollinger Band volatility metrics. On top of regime detection, the indicator provides session identification (Asian, London, New York, Kill Zones, Power Hour), volatility state tracking (Expansion, Contraction, Squeeze), R-squared trend quality measurement, historical volatility percentile, Wyckoff effort/result analysis, and an institutional activity score that colors candles by multi-factor heatmap logic.
The core question this indicator answers is: "What kind of market am I in right now?" Knowing whether the market is trending, ranging, squeezing, or volatile changes everything about how you should trade — from entry type to stop placement to position sizing. This indicator provides that context in real-time with a confidence percentage and a comprehensive HUD dashboard.
Why This Indicator Exists
Most traders apply the same strategy regardless of market conditions. A breakout strategy in a ranging market produces whipsaws. A mean-reversion strategy in a trending market produces losses. This indicator solves the context problem by providing a clear, quantified regime classification:
Regime Detection: Six distinct market states, each requiring different trading approaches. The classification uses three independent inputs — SMA alignment, VWAP slope direction, and Bollinger Band percentile — to produce a robust, multi-factor regime reading.
Regime Confidence: A 0-100 score indicating how clearly the market fits the detected regime. High confidence means the classification is strong and reliable. Low confidence suggests transitional or ambiguous conditions.
Session Awareness: Identifies the current trading session (Asian, London, New York) and highlights Kill Zones (London 2-5am, NY 7-10am) and Power Hour (3-4pm) — the periods when institutional activity is highest and moves are most significant.
Volatility State: Tracks whether volatility is in Expansion, Contraction, Squeeze, or Normal state. Squeeze conditions (Bollinger width in the bottom 10th percentile) often precede explosive moves.
Trend Quality (R-Squared): Measures how linear and clean the current trend is on a 0-1 scale. R-squared above 0.6 indicates a clean, tradeable trend. Below 0.4 indicates choppy, random price action.
Institutional Activity Score: A multi-factor score (0-100) computed from body ratio, volume ratio, R-squared, Bollinger Band position, and VWAP distance. This score drives the candle heatmap coloring.
How Regime Detection Works
The regime engine combines three independent analytical dimensions:
Dimension 1 — SMA Alignment:
The indicator calculates three Simple Moving Averages (default 20, 50, 200). When all three are aligned in order (20 > 50 > 200), the market is in bull alignment. When reversed (20 < 50 < 200), bear alignment. Any other configuration is diverged/mixed.
Dimension 2 — VWAP Slope:
The VWAP (Volume Weighted Average Price) slope is calculated over a configurable lookback and normalized by ATR to make it comparable across instruments. A normalized slope above the threshold indicates upward momentum. Below the negative threshold indicates downward momentum. Within the threshold band indicates flat/ranging conditions.
Dimension 3 — Volatility Percentile:
Bollinger Band width percentile rank over 120 bars determines volatility state. Below the 10th percentile is a squeeze. Above the configurable expansion percentile (default 75th) is expansion. ATR percentile rank provides a secondary volatility measure.
These three dimensions combine into the regime classification:
Squeeze: BB width in bottom 10th percentile — volatility compression, potential breakout imminent
Trend Up: Bull SMA alignment AND positive VWAP slope — clear directional momentum upward
Trend Down: Bear SMA alignment AND negative VWAP slope — clear directional momentum downward
Volatile: ATR in expansion percentile WITHOUT SMA alignment — high volatility but no clear trend direction
Range: Flat VWAP slope WITHOUT SMA alignment — sideways, mean-reverting conditions
Mixed: Conditions do not clearly fit any category — transitional state
Regime Confidence Calculation
Each regime has its own confidence formula based on how strongly the inputs support the classification:
Trend Up/Down: SMA alignment (40pts) + slope direction (30pts) + slope magnitude (up to 30pts)
Range: Flat slope (40pts) + no alignment (30pts) + low ATR percentile (up to 30pts)
Squeeze: Low BB percentile (70%) + low ATR percentile (30%)
Volatile: High ATR percentile (70%) + high BB percentile (30%)
Mixed: Fixed at 25 — low confidence by definition
The confidence is displayed as both a number and a visual bar (||||......) in the HUD, making it easy to assess at a glance.
Session and Time-of-Day Analysis
The indicator identifies seven session states with configurable timezone (default America/New_York):
Asia (7pm-3am): Low volatility, range-building session. Quality: Low.
London (3am-9:30am): Increasing volatility, often sets the day's direction. Quality: Medium.
London Kill Zone (2-5am): Peak London institutional activity. Quality: High.
New York (9:30am-4pm): Highest volume session for US instruments. Quality: Medium.
NY Kill Zone (7-10am): Peak NY institutional activity, overlap with London. Quality: High.
Lunch (10am-12pm): Low conviction, choppy price action. Quality: Low.
Power Hour (3-4pm): End-of-day positioning, often produces strong moves. Quality: High.
Kill Zones are highlighted with a subtle gold background tint. Lunch hours receive a dark tint as a visual warning of low-quality conditions.
Institutional Signal System
The indicator detects and labels six types of institutional events using a priority-based system with cooldowns to prevent label stacking:
P1 — BULL/BEAR CONFLUENCE (highest priority): Full alignment of SMA, VWAP slope, R-squared trend quality, regime confidence > 70, and price vs VWAP. This is the strongest possible directional signal — all factors agree.
P2 — MAJOR GOLDEN/DEATH CROSS: Mid SMA (50) crosses the Slow SMA (200). These are rare, high-impact structural events that signal major trend shifts.
P2b — GOLDEN X / DEATH X: Fast SMA (20) crosses Mid SMA (50). More frequent than major crosses but still significant structural events.
P3 — REGIME CHANGE: The regime classification changes from one state to another. Labels show the new regime name.
P4 — SQZ BREAK: Squeeze releases into expansion with price above (bull) or below (bear) the fast SMA. These are high-energy breakout events.
P5 — VWAP RECLAIM/REJECT: Price crosses above VWAP with positive slope (reclaim) or below with negative slope (rejection). VWAP is the institutional benchmark — reclaiming or losing it is significant.
P6 — DISP (Displacement, lowest priority): Large-body candles (body > 70% of range, body > 2x average) indicating aggressive institutional order flow.
Each signal checks a cooldown counter before firing. Higher-priority signals suppress lower-priority ones within the cooldown window, ensuring the chart shows only the most important signal at any given time.
Candle Heatmap Coloring
When enabled, candles are colored based on the current regime and trend quality rather than simple bull/bear direction:
Bull Aligned + Clean Trend: Bright aurora lime (bullish candles) / aurora green (bearish candles)
Bull Aligned: Aurora green / aurora teal
Bear Aligned + Clean Trend: Aurora pink / aurora purple
Bear Aligned: Aurora purple / aurora pink
Squeeze: Aurora gold / warm orange
Neutral: Ice blue / arctic blue
This coloring scheme makes it immediately obvious what regime the market is in without looking at the HUD — the entire chart changes character with the regime.
Advanced Metrics
R-Squared Trend Quality: Calculated as the square of the correlation between close price and bar_index over a configurable period. Values above 0.7 indicate a clean, linear trend. Values below 0.4 indicate choppy, non-directional price action. This metric helps distinguish between trending markets that are tradeable and trending markets that are too choppy to trade reliably.
Historical Volatility: Annualized standard deviation of log returns, displayed as a percentage with percentile ranking over 252 bars. This provides a longer-term volatility context beyond the Bollinger-based squeeze detection.
Wyckoff Effort/Result: Volume divided by range — when this ratio is high (high volume, small range), institutional absorption is occurring. The indicator detects these events and displays them in the HUD.
Regime Duration: Counts how many bars the current regime has persisted. Long-duration regimes are more established. Short-duration regimes may be transitional.
Institutional Score: A 0-100 composite from body ratio, volume ratio, R-squared, BB position extremes, and VWAP distance. Higher scores indicate more institutional-quality price action.
HUD Dashboard
The HUD displays 12 metrics with color-coded values:
Regime State with regime-specific color
Confidence score with visual bar (||||......)
VWAP Slope direction (Rising/Falling/Flat)
Volatility state with squeeze duration counter
Current Session name
Session Quality rating (High/Medium/Low)
SMA Alignment (Bull Aligned/Bear Aligned/Diverged)
R-Squared trend quality (Clean/Moderate/Choppy)
Historical Volatility with percentile classification
Regime Duration in bars
Institutional Activity Score
Input Parameters
Regime Detection:
Fast/Mid/Slow SMA: Moving average periods (default: 20/50/200)
VWAP Slope Lookback: Period for slope calculation (default: 20)
Slope Threshold: Normalized slope threshold for trend detection (default: 0.12)
Volatility:
ATR Length: Period for ATR calculation (default: 14)
Bollinger Length/Multiplier: BB parameters (default: 20/2.0)
Squeeze Lookback: Percentile rank period (default: 120)
Expansion Percentile: ATR percentile threshold for expansion (default: 75)
Sessions:
Show Session Zones: Toggle session background highlighting
Timezone: Configurable timezone (default: America/New_York)
Highlight Kill Zones: Toggle kill zone emphasis
Visual:
Regime Background: Toggle regime-adaptive background tinting
SMA Trend Ribbon: Toggle ribbon fill between fast and mid SMA
Candle Heatmap Coloring: Toggle institutional activity-based candle colors
Show Prior Day H/L: Toggle PDH/PDL reference lines
HUD Panel: Toggle with configurable position
How to Use This Indicator
Step 1: Check the Regime
Before entering any trade, check what regime the market is in. Trend Up/Down = directional strategies. Range = mean-reversion. Squeeze = wait for breakout. Volatile = reduce size or stand aside.
Step 2: Verify Confidence
A regime reading with 80+ confidence is reliable. Below 50 suggests the market is in transition — be cautious.
Step 3: Check the Session
Kill Zones and Power Hour produce the most reliable moves. Lunch hour and Asian session moves are less reliable for most instruments.
Step 4: Watch for Signals
BULL/BEAR CONFLUENCE is the highest-conviction signal — all factors agree. SQZ BREAK signals high-energy breakouts. VWAP RECLAIM/REJECT provides key level context.
Step 5: Use Trend Quality for Filtering
R-squared above 0.6 means the trend is clean and tradeable. Below 0.4 means the trend is choppy — consider waiting for cleaner conditions.
Best Practices
The regime classification is most reliable on timeframes of 5 minutes and above
Session features are most relevant for instruments with clear session structures (equities, futures, major forex)
Squeeze conditions can persist for extended periods. Do not assume a squeeze will break immediately.
Regime transitions (Mixed state) are the most dangerous periods. Consider reducing exposure during transitions.
The institutional score is a heuristic — use it as one input among many, not as a standalone signal
SMA crosses are lagging by nature. They confirm trend changes rather than predict them.
Combine this indicator with structure or momentum tools for entry timing — this indicator provides context, not entries.
Limitations
Regime detection uses lagging indicators (SMAs, BB percentile). Regime changes are confirmed after they occur, not predicted in advance.
The six-regime classification is a simplification. Real markets exist on a continuum, not in discrete states.
Session times are hardcoded for EST timezone sessions. Instruments traded primarily in other timezones may need different session definitions.
R-squared measures linearity, not direction. A perfectly linear downtrend has the same R-squared as a perfectly linear uptrend.
The institutional activity score is estimated from available data (body ratio, volume, BB position). True institutional activity detection requires order flow data not available in Pine Script.
VWAP resets daily on most instruments. Intraday VWAP slope is most meaningful for day trading timeframes.
Kill Zone highlighting assumes EST-based session times. Adjust the timezone input for your local market.
Technical Implementation
Built with Pine Script v6 using:
Three-dimensional regime classification (SMA alignment + VWAP slope + BB volatility)
Regime confidence scoring with per-regime formulas
Session detection using time() with configurable timezone
R-squared trend quality via ta.correlation()
Annualized historical volatility with percentile ranking
Wyckoff effort/result absorption detection
Multi-factor institutional activity scoring
Priority-based signal system with 6 tiers and cooldown anti-overlap
Volatility-adaptive gradient background coloring
Aurora-themed SMA ribbon with alignment-responsive colors
10 alert conditions covering regime changes, SMA crosses, absorption, and clean trend detection
Originality Statement
This indicator is original in its comprehensive regime detection and session awareness integration. While SMA alignment and Bollinger squeeze are established concepts, this indicator is justified because:
The three-dimensional regime classification (SMA + VWAP slope + BB volatility) produces a more robust state detection than any single method
Regime confidence scoring quantifies how clearly the market fits the detected state, providing actionable uncertainty information
Session awareness with quality ratings integrates time-of-day context directly into the regime framework
R-squared trend quality measurement distinguishes between clean tradeable trends and choppy non-directional trends
The priority-based signal system with 6 tiers ensures only the most important events are displayed
Candle heatmap coloring driven by regime and trend quality provides immediate visual context
The Aurora Borealis theme with volatility-adaptive background creates a dynamic visual environment that changes character with market conditions
Squeeze duration tracking and regime duration counting provide temporal context for current conditions
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Regime detection classifies current market conditions based on historical data — it does not predict future regime changes. Markets can transition between regimes without warning. Squeeze conditions do not guarantee breakouts. Session quality ratings are generalizations that may not apply to all instruments or market conditions. Past regime patterns do not guarantee future behavior. Always use proper risk management and never risk more than you can afford to lose. The author is not responsible for any losses incurred from using this indicator.
-Made by officialjackofalltrades
Indicator

Indicator

Institutional Decision Engine [JOAT]Institutional Decision Engine
Introduction
The Institutional Decision Engine is a comprehensive, unified trading system that integrates six distinct analytical engines into a cohesive decision-making framework. This is not just another indicator - it's a complete trading intelligence system designed to replicate the analytical approach of institutional trading desks. By combining market regime classification, structural analysis, momentum pressure, volatility intelligence, directional bias, and signal qualification into one unified system, this engine provides the holistic market analysis that professional traders rely on for consistent success.
This tool is built for serious traders who understand that successful trading requires multiple layers of analysis and confirmation. Whether you're a systematic trader needing a complete decision framework, a discretionary trader seeking comprehensive market intelligence, or an algorithm developer requiring robust signal generation, this engine provides the institutional-grade analysis needed to trade with the confidence and precision of professional market participants.
Why This Engine Exists
Most traders use fragmented indicators that provide conflicting signals, leading to confusion and poor decisions. This engine solves that fundamental problem by:
Unified Framework: Six engines working together as one cohesive system
Regime-Adaptive Logic: Automatically adjusts analysis based on market conditions
Multi-Layer Confirmation: Requires confluence across multiple analytical dimensions
Signal Qualification: Objectively scores and grades every potential signal
Risk Intelligence: Dynamic risk management based on market volatility and structure
Visual Clarity: Comprehensive visualization of all analytical components
The engine transforms the chaotic world of multiple indicators into a single, unified source of market truth that provides clear, actionable trading intelligence.
Core Components Explained
Engine 1: Market Regime Classification
The first engine identifies the current market environment:
// Regime Classification: 0=Neutral, 1=Trending, 2=Ranging, 3=Volatile
int market_regime = 0
if volatility_state == 1 and adx_value < i_trend_threshold
market_regime := 3 // Volatile Expansion
else if adx_value >= i_trend_threshold
market_regime := 1 // Trending
else if volatility_state == -1
market_regime := 2 // Ranging/Consolidation
// Regime Strength (0-100)
float regime_strength = 0.0
if market_regime == 1
regime_strength := math.min(adx_value / 50.0 * 100, 100)
else if market_regime == 2
regime_strength := math.min((1 - volatility_ratio) / (1 - i_contraction_mult) * 100, 100)
Regime types:
Trending: Strong directional markets with ADX > 25
Ranging: Low volatility consolidation phases
Volatile: High volatility, chaotic conditions
Neutral: Transition periods between defined states
Regime Strength: How strongly the market exhibits regime characteristics
Regime classification determines which strategies are appropriate and how risk should be managed.
Engine 2: Structural Behavior Analysis
The second engine maps market structure and key levels:
// Structure Analysis
bool higher_high = not na(last_swing_high) and not na(prev_swing_high) and last_swing_high > prev_swing_high
bool lower_low = not na(last_swing_low) and not na(prev_swing_low) and last_swing_low < prev_swing_low
bool higher_low = not na(last_swing_low) and not na(prev_swing_low) and last_swing_low > prev_swing_low
bool lower_high = not na(last_swing_high) and not na(prev_swing_high) and last_swing_high < prev_swing_high
// Structure Score (0-100)
float structure_score = 0.0
structure_score += structure_bias == 1 ? 30 : structure_bias == -1 ? 0 : 15
structure_score += higher_high ? 20 : lower_low ? 0 : 10
structure_score += bos_bullish ? 30 : bos_bearish ? 0 : 15
Structure components:
Swing Points: Key highs and lows defining market structure
Market Structure: Higher highs/higher lows (bullish) or lower highs/lower lows (bearish)
Break of Structure: Confirmation of trend changes
Liquidity Zones: Equal highs/lows where orders cluster
Structure Score: Quantifies structural quality (0-100)
Structural analysis identifies the levels where professional traders place orders.
Engine 3: Momentum Pressure Analysis
The third engine measures buying and selling pressure:
// Composite Momentum Score
float momentum_bull_score = 0.0
momentum_bull_score += wt_bullish ? 25 : 0
momentum_bull_score += rsi_bullish ? 25 : 0
momentum_bull_score += weighted_pressure > 0.1 ? 25 : weighted_pressure > 0 ? 12.5 : 0
momentum_bull_score += macd_bullish ? 25 : 0
// Net Momentum State
float net_momentum = momentum_bull_score - momentum_bear_score
int momentum_state = net_momentum > 25 ? 1 : net_momentum < -25 ? -1 : 0
Momentum components:
WaveTrend: Trend-following momentum oscillator
RSI: Relative strength with momentum filter
Pressure Analysis: Volume-weighted buying/selling pressure
MACD: Trend acceleration and deceleration
Momentum State: Bullish, bearish, or neutral momentum
Momentum analysis confirms the strength and timing of potential moves.
Engine 4: Volatility Intelligence Layer
The fourth engine analyzes volatility cycles and squeezes:
// Squeeze Detection
bool squeeze_on = bb_lower > kc_lower and bb_upper < kc_upper
bool squeeze_off = bb_lower < kc_lower or bb_upper > kc_upper
// Volatility Cycle Phase
int vol_cycle_phase = 0
if squeeze_on and squeeze_duration > 5
vol_cycle_phase := 1 // Compression
else if squeeze_off and squeeze_duration > 0
vol_cycle_phase := 2 // Expansion Trigger
else if volatility_ratio > 1.2
vol_cycle_phase := 3 // Active Expansion
// Adaptive Multipliers
float stop_multiplier = vol_cycle_phase == 3 ? 1.5 : vol_cycle_phase == 1 ? 0.8 : 1.0
float target_multiplier = vol_cycle_phase == 3 ? 1.3 : vol_cycle_phase == 1 ? 1.5 : 1.0
Volatility components:
Bollinger Bands: Standard deviation-based volatility
Keltner Channels: ATR-based volatility
Squeeze Detection: Volatility compression patterns
Cycle Phases: Compression, trigger, expansion, normal
Adaptive Multipliers: Dynamic risk adjustments
Volatility intelligence ensures risk management adapts to market conditions.
Engine 5: Directional Bias Model
The fifth engine establishes directional conviction:
// Bias Computation
float bullish_bias = 0.0
bullish_bias += ma_bullish_stack ? 30 : 0
bullish_bias += price_above_structure ? 20 : 0
bullish_bias += close > ma_anchor ? 15 : 0
bullish_bias += pos_di > neg_di ? 20 : 0
bullish_bias += slopes_aligned_bull ? 15 : 0
// Net Bias
float net_bias = bullish_bias - bearish_bias
int bias_direction = net_bias > i_bias_threshold / 2 ? 1 : net_bias < -i_bias_threshold / 2 ? -1 : 0
Bias components:
MA Stack: Fast/slow/anchor moving average relationships
Price Position: Where price sits relative to MAs
ADX Direction: +DI vs -DI for trend confirmation
MA Slopes: Directional momentum of moving averages
Bias Strength: 0-100 indicating directional conviction
Directional bias provides the primary directional framework for trading decisions.
Engine 6: Signal Qualification System
The sixth engine evaluates and qualifies all signals:
// Confluence Scoring
int bull_confluence = 0
bull_confluence += market_regime == 1 and trend_direction == 1 ? 2 : 0
bull_confluence += structure_bias == 1 ? 1 : 0
bull_confluence += bos_bullish ? 1 : 0
bull_confluence += momentum_state == 1 ? 2 : 0
bull_confluence += bias_direction == 1 ? 2 : 0
bull_confluence += squeeze_off and net_momentum > 0 ? 1 : 0
// Qualification Check
bool bull_qualified = bull_confluence >= i_min_confluence
bool bear_qualified = bear_confluence >= i_min_confluence
// Final Signal Generation
bool long_signal = bull_qualified and bull_trigger and bars_since_bull > i_signal_cooldown and
bar_confirmed and market_regime != 3
Qualification components:
Confluence Score: Points from each engine (max 10)
Minimum Threshold: Required confluence for signals (default: 5)
Signal Triggers: Entry conditions (crossovers, breakouts, etc.)
Cooldown Management: Prevents overtrading
Quality Grades: A-D grades based on confluence score
Signal qualification ensures only high-probability setups are traded.
Visual Elements
Directional Cloud: Dynamic cloud showing trend and conviction
Signal Markers: Clear entry signals with quality grades
Risk Levels: Visual stop loss and target levels
Structure Points: Marked swing highs and lows
Squeeze Background: Volatility compression indication
Signal Background: Signal strength background shading
Moving Averages: Color-coded MA system
Dashboard: Comprehensive intelligence panel
The dashboard displays:
1. Current market regime and strength
2. Trend direction and bias scores
3. Momentum state and pressure readings
4. Volatility cycle and squeeze status
5. Structure analysis and bias
6. Signal qualification and grade
7. Risk metrics and multipliers
8. Active position information
Input Parameters
Regime Engine:
ADX Period: Trend strength calculation (default: 14)
Trend Threshold: Minimum ADX for trend (default: 25)
Volatility Multipliers: Expansion/contraction thresholds
Structure Engine:
Swing Sensitivity: Pivot detection sensitivity (default: 10)
Structure Confirmation: Bars for confirmation (default: 3)
Show Liquidity: Display liquidity zones
Momentum Engine:
Pressure Period: Pressure calculation (default: 14)
WaveTrend Settings: Channel and average periods
RSI Period: Momentum oscillator (default: 14)
Volatility Layer:
Bollinger Settings: Period and deviation
Keltner Settings: Period and multiplier
Adaptive Stops: Enable dynamic stops
Signal Qualification:
Minimum Confluence: Required score (default: 5)
Signal Cooldown: Bars between signals (default: 5)
Minimum R:R: Risk/reward requirement (default: 1.5)
How to Use This Engine
Step 1: Understand Market Regime
Check the dashboard for current regime. Avoid trading in volatile regimes (red), focus on trending regimes (green), and adapt strategy for ranging regimes (purple).
Step 2: Assess Directional Bias
Look for strong bias scores (>60) with MA stack confirmation. The bias should be clear across multiple components before considering entries.
Step 3: Confirm Momentum
Ensure momentum supports the directional bias. Look for pressure in the direction of trade and momentum acceleration.
Step 4: Verify Structure
Entries near structural levels have higher probability. Look for BOS confirmation and avoid trading against established structure.
Step 5: Check Volatility
Be aware of volatility cycles. Squeeze releases offer high-probability breakout opportunities. Adjust stops based on volatility multipliers.
Step 6: Qualify Signals
Only take signals with 5+ confluence points. A-grade signals (8+ points) offer the highest probability and deserve larger position sizing.
Best Practices
Always trade in the direction of the dominant bias
Higher confluence scores mean higher probability setups
Respect regime changes - they signal strategy adjustments
Use the directional cloud as primary trend guidance
Place stops using the volatility-adjusted levels
Scale out at multiple targets as provided
Avoid trading during volatile regimes unless experienced
Wait for A-grade setups rather than forcing mediocre trades
Keep a trade journal tracking regime/bias combinations
Never override the system's risk management without strong reason
Strategy Integration
This engine is a complete trading system:
Use signal qualification as primary entry filter
Apply regime-based position sizing
Import bias scores for trend confirmation
Use structure levels for stop placement
Integrate volatility multipliers for risk management
Export all engine outputs for custom strategies
Technical Implementation
Built with Pine Script v6 featuring:
Six-engine architecture with unified signal processing
Advanced regime detection with ADX/ATR analysis
Comprehensive structure analysis with swing detection
Multi-factor momentum scoring system
Volatility cycle analysis with squeeze detection
Directional bias calculation with multiple confirmations
Signal qualification with confluence scoring
Dynamic risk management with adaptive multipliers
Comprehensive visualization with directional cloud
Real-time dashboard with 12 key metrics
Export functions for complete system integration
The code uses confirmed bars throughout to prevent repainting and ensure reliable signals.
Originality Statement
This engine is original in its comprehensive integration of six distinct analytical systems into a unified decision framework. While individual components (ADX, moving averages, RSI, etc.) are established tools, this engine is justified because:
It synthesizes six independent analytical engines into one cohesive system
The regime-adaptive logic automatically adjusts behavior based on market conditions
Signal qualification provides objective, numerical evaluation of trade quality
The directional cloud visualization offers intuitive trend analysis
Dynamic risk management adapts to volatility and structure
Comprehensive dashboard presents all critical metrics in one view
Each engine contributes unique insights: regime shows when to trade, structure shows where, momentum shows timing, volatility shows how much, bias shows direction, and qualification shows quality
The engine solves the real problem of indicator overload and conflicting signals
Export functions enable complete system integration and customization
This is institutional-grade analysis typically available only to professional traders
The engine's value lies in providing a complete, unified trading intelligence system that eliminates analysis paralysis and provides clear, actionable signals based on comprehensive market analysis.
Disclaimer
This engine is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. This is a comprehensive analysis tool, not a guaranteed profit system.
Even with comprehensive analysis, markets can behave unpredictably due to news events, economic data, or changes in market structure. Past performance of the system does not guarantee future results. The engine's signals are mathematical calculations based on historical patterns and should be used with proper risk management.
Always use stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose on any single trade, regardless of signal quality or confluence score.
The author is not responsible for any losses incurred from using this engine. Users assume full responsibility for all trading decisions made using this system.
-Made with passion by officialjackofalltrades
Indicator

Volatility Regime Engine [JOAT]Volatility Regime Engine
Introduction
The Volatility Regime Engine is a sophisticated volatility analysis tool designed to identify market cycles through expansion and contraction patterns. This indicator goes beyond simple volatility measurement by classifying volatility into distinct regimes, detecting squeeze patterns, and forecasting potential volatility shifts. It's built for traders who understand that volatility is not just noise but a predictable cycle that creates trading opportunities when properly understood.
Volatility is the lifeblood of markets - it creates opportunities, determines risk, and influences strategy selection. This engine provides institutional-grade volatility analysis that helps traders adapt their approach to current market conditions. Whether you're a day trader adjusting stop distances, a swing trader timing entries after volatility contractions, or a position trader sizing positions based on volatility forecasts, this tool provides the critical volatility intelligence needed for superior decision-making.
Why This Indicator Exists
Most traders treat volatility as a single number (like ATR) without understanding its cyclical nature and predictive properties. This indicator addresses that limitation by:
Regime Classification: Identifies whether volatility is expanding, contracting, or normal, allowing strategy adaptation
Squeeze Detection: Pinpoints volatility compression patterns that often precede significant price moves
Cycle Analysis: Tracks volatility cycles to identify optimal entry and exit timing
Forecasting Capability: Uses mean reversion principles to predict likely volatility shifts
Adaptive Multipliers: Provides dynamic stop loss and target multipliers based on current volatility
Historical Context: Places current volatility in percentile context for better decision making
The engine solves the critical problem of using static risk management in dynamic volatility environments. By understanding where you are in the volatility cycle, you can anticipate market behavior and position yourself accordingly.
Core Components Explained
1. Multi-Layer ATR Analysis
The indicator uses three ATR timeframes to capture volatility across different horizons:
// Multiple ATR timeframes
float atr_fast = ta.atr(i_atr_fast)
float atr_slow = ta.atr(i_atr_slow)
float atr_baseline = ta.sma(ta.atr(i_atr_slow), i_atr_baseline)
// ATR ratios
float atr_ratio = atr_baseline > 0 ? atr_slow / atr_baseline : 1.0
float atr_momentum = atr_fast / atr_slow
ATR layers:
Fast ATR (7 periods): Captures immediate volatility changes
Slow ATR (21 periods): Medium-term volatility trend
Baseline ATR (50 periods smoothed): Long-term volatility average
ATR Ratio: Current volatility relative to baseline (key for regime detection)
ATR Momentum: Short-term volatility acceleration/deceleration
The ATR ratio is the primary driver of regime classification - values above 1.4 indicate expansion, below 0.6 indicate contraction.
2. Squeeze Detection System
The indicator uses the classic TTM Squeeze concept with enhanced features:
// Squeeze state
bool squeeze_on = bb_lower > kc_lower and bb_upper < kc_upper
bool squeeze_off = bb_lower < kc_lower and bb_upper > kc_upper
// Squeeze duration tracking
var int squeeze_duration = 0
if squeeze_on
squeeze_duration := squeeze_duration + 1
else
squeeze_duration := 0
// Squeeze intensity (longer squeeze = more explosive release)
float squeeze_intensity = math.min(float(squeeze_duration) / 20.0 * 100, 100)
Squeeze components:
Bollinger Bands: Measure volatility through standard deviation
Keltner Channels: Measure volatility through ATR
Squeeze On: BB inside KC indicates volatility compression
Squeeze Duration: Time in compression - longer durations build more energy
Squeeze Intensity: Percentage score of compression buildup
Squeeze Release: Transition from compression to expansion
Squeeze releases are among the most reliable volatility signals - they often precede significant price moves.
3. Historical Volatility Analysis
For additional confirmation, the indicator calculates statistical volatility:
f_historical_vol(int period, int annual_days) =>
float log_return = math.log(close / close )
float hv = ta.stdev(log_return, period) * math.sqrt(annual_days) * 100
hv
float hv_current = i_use_hv ? f_historical_vol(i_hv_len, i_hv_annual) : 0
float hv_avg = i_use_hv ? ta.sma(hv_current, i_hv_len * 2) : 0
float hv_ratio = hv_avg > 0 ? hv_current / hv_avg : 1.0
HV features:
Log Returns Calculation: Statistically sound volatility measurement
Annualization: Converts to annualized volatility percentage
HV Ratio: Current volatility relative to historical average
HV Regime: High/low volatility classification
Confirmation Layer: Validates ATR-based regime detection
Historical volatility adds a statistical layer that confirms what the ATR analysis is showing.
4. Volatility Regime Classification
The indicator classifies volatility into four distinct states:
// Raw regime based on ATR ratio
int raw_vol_regime = 0
if atr_ratio >= i_exp_thresh
raw_vol_regime := 1 // Expansion
else if atr_ratio <= i_con_thresh
raw_vol_regime := -1 // Contraction
// Confirmed regime with bar count filter
var int regime_counter = 0
var int confirmed_vol_regime = 0
if raw_vol_regime == raw_vol_regime and raw_vol_regime != 0
regime_counter := math.min(regime_counter + 1, i_regime_confirm + 1)
else if raw_vol_regime != raw_vol_regime
regime_counter := 1
if regime_counter >= i_regime_confirm
confirmed_vol_regime := raw_vol_regime
Regime types:
Expansion (ATR ratio > 1.4): High volatility, wide ranges, increased risk
Contraction (ATR ratio < 0.6): Low volatility, narrow ranges, preparing for breakouts
Normal (0.6 < ATR ratio < 1.4): Balanced volatility, normal market conditions
Transitioning: Regime changes requiring confirmation before acting
Regime confirmation prevents whipsaws by requiring multiple bars in the same regime before classification.
5. Volatility Cycle Phases
Beyond simple regimes, the indicator identifies where you are in the volatility cycle:
// Cycle phases: 0=neutral, 1=building, 2=peak, 3=declining, 4=trough
var int vol_cycle_phase = 0
float atr_slope = atr_slow - atr_slow
float atr_accel = atr_slope - nz(atr_slope )
if confirmed_vol_regime == 1
if atr_accel > 0
vol_cycle_phase := 1 // Building expansion
else
vol_cycle_phase := 2 // Peak expansion
else if confirmed_vol_regime == -1
if atr_accel < 0
vol_cycle_phase := 3 // Declining to contraction
else
vol_cycle_phase := 4 // Trough contraction
Cycle phases:
Building Expansion: Volatility increasing, acceleration positive
Peak Expansion: High volatility but decelerating
Declining to Contraction: Volatility decreasing rapidly
Trough Contraction: Low volatility stabilizing
Neutral: Transition periods between phases
Cycle analysis helps anticipate the next phase and prepare strategy adjustments.
6. Adaptive Multipliers
The indicator provides dynamic multipliers for risk management:
// Dynamic stop multiplier based on regime
float adaptive_stop_mult = switch confirmed_vol_regime
1 => 1.5 // Wider stops in expansion
-1 => 0.8 // Tighter stops in contraction
=> 1.0 // Normal
// Dynamic target multiplier
float adaptive_target_mult = switch confirmed_vol_regime
1 => 2.0 // Larger targets in expansion
-1 => 1.2 // Smaller targets in contraction
=> 1.5 // Normal
Adaptive features:
Stop Multiplier: Adjusts stop distance based on volatility regime
Target Multiplier: Scales profit targets to volatility conditions
Risk Adjustment: Helps maintain consistent risk across volatility regimes
Export Functions: Available for integration with trading systems
These multipliers help maintain consistent risk-to-reward ratios across different volatility environments.
Visual Elements
Multi-Layer Histogram: Core volatility ratio with gradient coloring
Glow Effects: Intensity-based glow around extreme volatility
Squeeze Momentum: Separate plot showing squeeze building/release
Cycle Momentum: Volatility cycle acceleration/deceleration
Background Shading: Regime-based background colors
Signal Markers: Premium volatility signals with labels
Dashboard: Real-time volatility metrics and forecasts
The dashboard displays:
1. Current volatility regime and strength
2. Cycle phase and momentum
3. ATR ratio and percentage
4. Percentile ranking of current volatility
5. Squeeze status and duration
6. Quality score of current setup
7. Volatility forecast (expansion/contraction)
8. Adaptive multipliers for risk management
Input Parameters
ATR Settings:
Fast ATR Period: Short-term volatility (default: 7)
Slow ATR Period: Medium-term volatility (default: 21)
Baseline Period: Long-term volatility average (default: 50)
Regime Thresholds:
Expansion Threshold: ATR ratio for expansion regime (default: 1.4)
Contraction Threshold: ATR ratio for contraction regime (default: 0.6)
Regime Confirmation: Bars for regime confirmation (default: 3)
Squeeze Detection:
Bollinger Period: BB calculation period (default: 20)
Bollinger Multiplier: BB standard deviation (default: 2.0)
Keltner Period: KC calculation period (default: 20)
Keltner Multiplier: KC ATR multiplier (default: 1.5)
Visual Settings:
Color Scheme: Customizable colors for each regime
Glow Effects: Enable/disable visual enhancements
Dashboard Display: Show/hide metrics panel
Signal Labels: Control signal label frequency
How to Use This Indicator
Step 1: Identify Current Regime
Check the dashboard for the current volatility regime. In expansion (red), expect larger ranges and adjust stops wider. In contraction (blue), prepare for potential breakouts. Normal conditions (purple) allow standard trading approaches.
Step 2: Monitor Squeeze Patterns
Watch for squeeze onset (compression) and duration. Longer squeezes (high intensity) often lead to more explosive releases. The squeeze release signal is one of the most reliable volatility breakout patterns.
Step 3: Analyze Cycle Phase
Understanding the cycle phase helps anticipate the next move. Building expansion suggests continued volatility, while peak expansion warns of potential contraction ahead.
Step 4: Use Percentile Context
The ATR percentile shows how current volatility compares to historical levels. Extremely high percentiles (>90) suggest mean reversion to lower volatility, while low percentiles (<10) suggest expansion is likely.
Step 5: Apply Adaptive Multipliers
Use the provided stop and target multipliers to adjust your risk management to current conditions. This maintains consistent risk across different volatility environments.
Step 6: Watch for Premium Signals
Premium expansion signals (squeeze release + high volatility + HV confirmation) offer high-probability breakout opportunities. Premium contraction signals (early contraction + low HV) suggest optimal entry points before breakouts.
Best Practices
Use the indicator to adapt your strategy to volatility conditions rather than fighting them
Squeeze releases are most reliable when they occur after long compression periods (>10 bars)
Volatility expansion often follows news events - be aware of economic calendars
In low volatility environments, reduce position size but increase stop distance proportionally
High volatility periods offer larger profit potential but require wider stops and smaller position sizes
The volatility forecast is mean-reversion based - extreme volatility tends to revert to normal
Combine with trend analysis for best results - volatility expansion in the direction of trend is powerful
Use the adaptive multipliers in your automated strategies for dynamic risk management
Monitor the cycle phase to anticipate regime changes before they occur
Keep a volatility journal to track how different instruments behave in various regimes
Strategy Integration
This indicator is designed to integrate seamlessly with other trading systems:
Export plots provide volatility data for strategy consumption
Adaptive multipliers can be imported for dynamic risk management
Regime classification can filter trades based on volatility conditions
Squeeze signals can trigger breakout strategies
Cycle analysis can optimize entry/exit timing
Quality scores can weight signal strength in composite systems
The indicator includes 12 export functions for integration:
ATR Ratio Export: Normalized volatility level
Vol Regime Export: Current regime classification (-1, 0, 1)
ATR Percentile Export: Historical volatility context
Adaptive ATR Export: Volatility-adjusted ATR value
Stop Multiplier Export: Dynamic stop adjustment factor
Target Multiplier Export: Dynamic target adjustment factor
Squeeze State Export: Binary squeeze on/off signal
Squeeze Momentum Export: Squeeze building/release momentum
Vol Score Export: Normalized volatility score (-100 to +100)
Technical Implementation
Built with Pine Script v6 featuring:
Multi-timeframe volatility analysis across three ATR periods
Statistical historical volatility calculation with log returns
Advanced squeeze detection with duration and intensity tracking
Regime classification with confirmation logic to prevent whipsaws
Cycle phase analysis using slope and acceleration
Adaptive multiplier system for dynamic risk management
Comprehensive visualization with multi-layer glow effects
Real-time dashboard with 11 key volatility metrics
Alert conditions for all major volatility events
Export functions for strategy integration
The code uses confirmed bars for all calculations to prevent repainting and ensure reliable signals.
Originality Statement
This indicator is original in its comprehensive approach to volatility analysis and regime classification. While individual components (ATR, Bollinger Bands, Keltner Channels) are established tools, this indicator is justified because:
It synthesizes multiple volatility measurement approaches into a unified framework
The regime classification system provides actionable market state information
Cycle phase analysis adds predictive capability beyond simple volatility measurement
The squeeze detection system includes duration and intensity scoring for signal quality
Adaptive multipliers provide practical risk management adjustments based on volatility
Historical volatility adds statistical confirmation to price-based volatility measures
The forecasting system uses mean reversion principles for volatility prediction
Comprehensive visualization makes complex volatility concepts accessible and actionable
Export functions enable integration with other trading systems
Each component contributes unique insights: ATR shows current volatility, squeeze shows compression, HV shows statistical volatility, cycles show direction, and multipliers provide practical application
The indicator's value lies in transforming volatility from a single number into a rich, multi-dimensional analysis that helps traders understand not just how volatile the market is, but where it is in the volatility cycle and what that means for trading opportunities.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Volatility analysis is a tool for understanding market conditions, not a prediction system.
Volatility patterns can change suddenly due to market events, news, or changes in market structure. Past volatility patterns do not guarantee future behavior. The indicator's signals are mathematical calculations based on historical patterns and should be used in conjunction with other forms of analysis.
Always use proper risk management, including stop losses and position sizing appropriate for current volatility conditions. High volatility periods require smaller position sizes due to increased risk, while low volatility periods may require wider stops to avoid premature exits.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this system.
-Made with passion by officialjackofalltrades
Indicator

Adaptive Volatility Matrix [JOAT]Adaptive Volatility Matrix
Introduction
The Adaptive Volatility Matrix (AVM) is an advanced open-source volatility regime classification indicator that combines Bollinger Band Width Percentile (BBWP), ATR percentile analysis, regime transition prediction, volatility clustering detection, and historical regime statistics to classify market conditions into distinct volatility regimes. This indicator helps traders adapt their strategies to current market conditions by systematically identifying when volatility is expanding, contracting, or transitioning between regimes.
Unlike basic volatility indicators that simply plot ATR or Bollinger Bands, AVM employs a sophisticated dual-metric system that combines BBWP (measuring price range compression/expansion) with ATR percentile (measuring absolute volatility) to create a combined volatility score (0-100%). The indicator then classifies this score into five distinct regimes and predicts regime transitions through momentum analysis.
Why This Indicator Exists
This indicator addresses the challenge of adapting trading strategies to volatility conditions. Different market regimes require different approaches - mean reversion works in low volatility, breakout strategies work in expansion, and risk management becomes critical in extreme volatility. AVM systematically reveals:
BBWP Analysis: Measures Bollinger Band width percentile to identify compression/expansion cycles
ATR Percentile: Tracks normalized ATR percentile to measure absolute volatility levels
Combined Volatility Score: Weighted average (60% BBWP, 40% ATR) for robust regime classification
Regime Classification: Five distinct regimes (Extreme Expansion, Expansion, Normal, Contraction, Extreme Contraction)
Transition Prediction: Momentum-based forecasting of next regime with probability
Volatility Clustering: Detects sustained high/low volatility periods
Historical Statistics: Tracks regime duration and frequency for context
Each component provides unique intelligence. BBWP shows compression cycles, ATR shows absolute volatility, combined score provides robust classification, regime system categorizes conditions, transition prediction anticipates changes, clustering detects persistence, and statistics provide historical context.
Core Components Explained
1. BBWP (Bollinger Band Width Percentile) Calculation
BBWP measures where current Bollinger Band width ranks relative to historical width:
f_calculate_bbwp(int length, int lookback) =>
float basis = ta.sma(close, length)
float dev = ta.stdev(close, length)
float bb_width = (dev * 2) / basis * 100
// Calculate percentile rank
int count = 0
for i = 1 to lookback
if bb_width > nz(bb_width )
count += 1
float bbwp = (count / lookback) * 100
BBWP ranges from 0-100%:
- 0-20%: Extreme compression (volatility squeeze)
- 20-40%: Contraction (below average volatility)
- 40-60%: Normal (average volatility)
- 60-80%: Expansion (above average volatility)
- 80-100%: Extreme expansion (volatility breakout)
2. ATR Percentile Analysis
ATR percentile measures where current normalized ATR ranks historically:
f_atr_percentile(int period, int lookback) =>
float atr_val = ta.atr(period)
float natr = close > 0 ? (atr_val / close) * 100 : 0.0
float percentile = ta.percentrank(natr, lookback)
Normalized ATR (NATR) accounts for price level differences, making volatility comparable across different price ranges. Percentile ranking shows where current volatility sits in historical distribution.
3. Combined Volatility Score & Regime Classification
The combined score weights BBWP more heavily than ATR percentile:
float combined_score = (bbwp_value * 0.6) + (atr_percentile * 0.4)
f_classify_regime(float bbwp_val, float atr_perc, float exp_th, float con_th, float ext_th) =>
string regime = "Normal"
int regime_code = 0
if bbwp_val >= ext_th or atr_perc >= ext_th
regime := "Extreme Expansion"
regime_code := 4
else if bbwp_val >= exp_th or atr_perc >= exp_th
regime := "Expansion"
regime_code := 3
// Additional classifications...
Five regime classifications:
1. Extreme Contraction (code 1): Both metrics <30%, volatility squeeze
2. Contraction (code 2): One metric <40%, below average volatility
3. Normal (code 0): Both metrics 40-60%, average conditions
4. Expansion (code 3): One metric >70%, above average volatility
5. Extreme Expansion (code 4): Both metrics >85%, volatility breakout
4. Regime Transition Prediction
AVM predicts next regime through momentum analysis:
float regime_momentum = combined_score - combined_score
string momentum_direction = regime_momentum > 2 ? "Accelerating" :
regime_momentum < -2 ? "Decelerating" : "Stable"
string predicted_regime = regime_code == 4 and regime_momentum < -5 ? "→ Expansion" :
regime_code == 3 and regime_momentum < -3 ? "→ Normal" :
// Additional predictions...
"Stable"
float transition_prob = math.min(math.abs(regime_momentum) * 10, 100)
Transition probability (0-100%) based on momentum magnitude. >50% probability triggers warning.
5. Volatility Clustering Detection
Clustering identifies sustained high/low volatility periods:
int cluster_lookback = 20
float cluster_threshold = 70.0
int high_vol_count = 0
for i = 0 to cluster_lookback - 1
if combined_score >= cluster_threshold
high_vol_count += 1
float cluster_ratio = high_vol_count / cluster_lookback * 100
bool in_vol_cluster = cluster_ratio >= 60 // 60% of bars are high vol
string cluster_strength = cluster_ratio >= 80 ? "Strong" :
cluster_ratio >= 60 ? "Moderate" :
cluster_ratio >= 40 ? "Weak" : "None"
Clusters indicate persistent volatility conditions that tend to continue.
6. Historical Regime Statistics
AVM tracks regime history for context:
var array regime_history = array.new_int(0)
var array regime_durations = array.new_int(0)
if regime_changed
array.push(regime_history, regime_code)
array.push(regime_durations, bars_in_regime)
// Calculate statistics
float avg_expansion_duration = exp_sum / exp_cnt
float avg_contraction_duration = con_sum / con_cnt
float duration_ratio = bars_in_regime / avg_expansion_duration
bool regime_extended = duration_ratio > 1.5
Statistics show if current regime is extended (>1.5x average duration), suggesting potential transition.
Visual Elements
Combined Score Line: Main plot (0-100%) with regime-based coloring
ATR Percentile Overlay: Circles showing ATR percentile for comparison
Histogram: Gradient-colored bars showing volatility score with regime colors
Reference Lines: 70% (expansion), 50% (neutral), 30% (contraction), 85% (extreme)
Background Zones: Regime-colored backgrounds (purple for expansion, yellow for contraction)
Transition Warnings: ⚠ symbols when transition probability >50%
BBWP Percentile Bands: 20th, 50th, 80th percentile circles for context
Dashboard: Real-time metrics including regime, score, BBWP, ATR%, trend, duration, momentum, transition prediction, cluster status, duration ratio, historical stats
Input Parameters
BBWP Parameters:
BBWP Length: Bollinger Band period (default: 13)
BBWP Lookback: Historical comparison period (default: 252)
ATR Analysis:
ATR Period: ATR calculation period (default: 14)
ATR Percentile Lookback: Historical ranking period (default: 100)
Regime Classification:
Expansion Threshold: Score for expansion regime (default: 70%)
Contraction Threshold: Score for contraction regime (default: 30%)
Extreme Threshold: Score for extreme regimes (default: 85%)
Visualization:
Show Regime Zones: Toggle background coloring
Show Histogram: Toggle volatility histogram
Show ATR Overlay: Toggle ATR percentile circles
How to Use This Indicator
Step 1: Identify Current Regime
Check dashboard "Regime" row. Adjust strategy based on classification.
Step 2: Monitor Combined Score
Score >70% = expansion (use breakout strategies)
Score <30% = contraction (use mean reversion)
Score 40-60% = normal (use balanced approach)
Step 3: Check Momentum Direction
"Accelerating" = volatility increasing
"Decelerating" = volatility decreasing
"Stable" = no significant change
Step 4: Watch for Transition Warnings
⚠ symbols indicate >50% probability of regime change. Prepare to adjust strategy.
Step 5: Assess Cluster Status
"Strong" or "Moderate" cluster = persistent conditions likely to continue
Step 6: Consider Duration Ratio
Ratio >1.5x = extended regime, higher probability of mean reversion
Best Practices
Use regime classification to select appropriate trading strategies
Extreme contraction often precedes volatility breakouts - prepare for expansion
Extreme expansion often mean-reverts - reduce position sizes
Transition warnings provide early signal to adjust risk management
Volatility clusters suggest persistence - don't fight the regime
Extended regimes (>1.5x average) have higher reversal probability
BBWP and ATR percentile divergence suggests regime uncertainty
Historical statistics provide context for current regime duration
Combine with directional indicators - AVM shows conditions, not direction
Indicator Limitations
Regime classification is backward-looking - transitions lag actual changes
BBWP calculation is computationally intensive on large lookback periods
Transition predictions are probabilistic, not deterministic
Extreme regimes can persist longer than expected during major events
Historical statistics require sufficient data (50+ regime changes)
Clustering detection has fixed lookback - may miss longer-term patterns
Combined score weighting (60/40) may not be optimal for all instruments
Regime thresholds may need adjustment for different markets
Technical Implementation
Built with Pine Script v6 using:
Custom BBWP calculation with percentile ranking
ATR percentile analysis with normalized ATR
Weighted combined score (60% BBWP, 40% ATR)
Five-tier regime classification system
Momentum-based transition prediction with probability
Volatility clustering detection (20-bar lookback)
Historical regime tracking with arrays (last 50 regimes)
Duration ratio calculation vs historical averages
BBWP percentile bands (20th, 50th, 80th)
Adaptive background coloring based on regime and duration
Comprehensive dashboard with 12 metrics
The code is fully open-source and can be modified to suit individual trading styles.
Originality Statement
This indicator is original in its comprehensive volatility regime classification approach. While BBWP and ATR are established concepts, this indicator is justified because:
It combines BBWP and ATR percentile into weighted combined score for robust classification
The five-tier regime system provides granular volatility categorization
Momentum-based transition prediction with probability quantification is unique
Volatility clustering detection identifies persistent regime conditions
Historical regime statistics provide context for current regime duration
Duration ratio calculation identifies extended regimes with mean reversion potential
BBWP percentile bands add additional context layers
Adaptive background intensity based on regime stability
Each component contributes unique information: BBWP shows compression cycles, ATR shows absolute volatility, combined score provides robust classification, regime system categorizes conditions, transition prediction anticipates changes, clustering detects persistence, statistics provide context, and duration ratio identifies extremes. The indicator's value lies in presenting these complementary perspectives simultaneously with unified regime framework.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Regime classifications do not guarantee future volatility behavior. Trading involves substantial risk of loss. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
-Made with passion by officialjackofalltrades Indicator

Volatility Regime Switch [Metrify]VRS is a regime classifier that tries to separate two things most indicators mix together: direction and tradability. It doesn’t just ask "is price above/below a line?". it estimates whether the market is currently behaving more like a trend regime or a noise/chop regime, then adapts its switching logic and trailing structure accordingly. The output is a state machine (bull/bear) with a volatility-normalized corridor, plus explicit markers for switch accepted vs switch rejected.
Core idea: switching should depend on regime
Most trend flip tools fail in choppy markets because they apply the same confirmation rules everywhere. VRS tries to avoid that by measuring a continuous regime score:
trreg ≈ how “trend-like” conditions are
nsreg ≈ how “noise-like” conditions are
That regime estimate is then used to:
shape the trailing band distance (wider in chop, tighter in trend),
change the required confirmation for a switch (more strict in noise), and
demand follow-through after a candidate switch (acceptance check).
Regime estimation: how it decides “trend-like” vs “noise-like”
The regime score is built from three normalized features, then blended using inverse-variance weighting again:
Efficiency ratio (ER): Measures directional efficiency: net displacement over a horizon vs total movement. Trends have higher efficiency; chop has lower.
ADX-like trend strength: A custom ADX calculation is normalized (adxn), giving a bounded “trend strength” component.
Volatility ratio (fast/slow): Compares fast ATR to slow ATR and normalizes it. This helps distinguish active expansion vs quieter conditions.
These three components are combined into trreg (0..1). Noise regime is nsreg = 1 - trreg.
The important part is it can behave differently when the market is structurally trending versus when it is structurally noisy.
The anchor + adaptive bands: how the corridor is built
VRS uses two EMAs:
a fast EMA (emaf)
a slower EMA (emas)
It then creates an anchor that interpolates between them based on regime:
when trend regime is strong (trreg high), the anchor leans toward the fast EMA (more responsive)
when noise regime is strong (nsreg high), it leans toward the slow EMA (more stable)
Band distance is bdist = volc * bmult, and bmult is also regime-dependent:
in noise, bmult becomes larger → bands widen → fewer false flips
in trend, bmult tightens → better trailing sensitivity
Finally, the trailing bands (fup, flo) use a classic "non-decreasing band" logic similar to trailing-stop structures: the band only moves in the favorable direction unless price invalidates it, preventing constant band oscillation.
Bias and conviction layer
A switch is not triggered merely by close above/below a band. VRS computes conviction, which mixes:
Intra-bar price action bias
Two normalized elements are used: CLV (close location value) inside the candle range and body direction/strength relative to candle range. Both are Z-scored and squashed (atan-based) to avoid extreme outliers dominating.
Trend bias
Difference between fast and slow EMA, normalized by volatility, then Z-scored and squashed.
Displacement breakout quality
If price breaks above fup or below flo, it computes a breakout 'distance' normalized by volatility, then converts it into a Z-score relative to recent breakout behavior (dbullz, dbearz)
These get blended into a conviction signal that is smoothed, and then compared against a dynamic trigger threshold built from the average + stdev of conviction magnitude. A flip should happen when price action + trend bias + breakout quality jointly exceed what is normal for this market recently.
Practical reading notes
VRS generally behaves best when read as "current regime context + boundary + switch events" rather than as a constant entry/exit engine. In trending conditions, the trail will tend to hug price more tightly and switches will be less frequent. In noisy conditions, the corridor widens and the script becomes more conservative, often producing rejected switch attempts rather than rapid flips.
The rejected-switch markers (yellow X) are explicit evidence that the script detected an attempted regime change but did not see enough acceptance. For discretionary use, those rejection points can be useful as information about failed break attempts or lack of follow-through.
This script is designed to be adaptive, but it still has structural constraints. It uses volatility normalization and regime weighting to reduce parameter brittleness, yet extreme regime changes (sudden volatility spikes, news-driven moves, illiquid gaps) can still cause behavior that looks late or 'overly strict', because acceptance and confirmation are intentionally conservative in high-noise conditions. Conversely, on very smooth trend legs, the trail can appear tight and switches may look clean, but that depends on how the chosen lengths match the instrument’s tempo.
Also, because this is a state machine with acceptance logic, you should expect situations where price briefly breaks a boundary and then returns—those are exactly the environments that produce rejected switches. The indicator surfaces that behavior explicitly instead of hiding it. Indicator

Jensen's Convexity ScoreThe Jensen Convexity Score is a quantitative indicator that measures asymmetric volatility patterns in asset returns, identifying securities with positive convexity (higher upside volatility than downside volatility).
It's based on Jensen's inequality from probability theory and it helps investors to identify assets with favorable risk-return asymmetries.
I was inspired to write this indicator while reading the book "The Statistical Consequences of Fat Tails by Nassim Nicholas Taleb.
"The payoff of a human venture is, in general, inversely proportional to what it is expected to be... Convexity is one way to remedy the problem of prediction." Nassim Nicholas Taleb
Jensen's Inequality
Jensen's inequality states that for a convex function f and random variable X:
E ≥ f(E )
For concave functions, the inequality reverses. This fundamental principle reveals that:
Convex payoffs benefit from volatility (options, venture capital, growth stocks)
Concave payoffs suffer from volatility (short options, leveraged positions, meme stocks)
The Convexity Score Formula
The indicator calculates a normalized convexity score by comparing upside and downside volatility. It's a simple but beautiful expression:
Convexity Score = / (σ_total)² × 100
Where:
- σ_up = Standard deviation of positive log returns
- σ_down = Standard deviation of negative log returns
- σ_total = Standard deviation of all log returns
Interpretation:
Positive scores (+10 to +50+): Upside volatility exceeds downside volatility → Convex opportunity
Negative scores (-10 to -50+): Downside volatility exceeds upside volatility → Concave risk
Near zero (-10 to +10): Symmetric volatility → Gaussian-like behavior
How The Indicator Works - Core Calculation
Step 1: Return Separation
- Computes log returns over a lookback period (default: 50 and 120 bars)
- Separates returns into upside moves (positive) and downside moves (negative)
Step 2: Volatility Measurement
- Calculates standard deviation for upside returns (σ_up)
- Calculates standard deviation for downside returns (σ_down)
- Calculates total volatility (σ_total)
Step 3: Score Normalization
- Computes convexity score as variance ratio
- Multiplies by 100 for percentage display
- Calculates historical percentile ranking (252-bar lookback)
Step 4: Momentum Analysis
- Linear regression slope on 20-bar score history
- Identifies improving vs deteriorating convexity patterns
Use Cases
Asset Screening & Selection
Scan multiple stocks to identify:
- High positive convexity (score > +25): Assets with asymmetric upside potential
- High negative convexity (score < -25): Assets to avoid or hedge
Portfolio Construction
- Overweight assets with persistent positive convexity
- Underweight or hedge assets with persistent negative convexity
- Build "barbell" portfolios: safe assets + high convexity opportunities
Risk Management
- Deteriorating convexity (score declining, negative momentum): Early warning signal
- Extreme negative readings (< -40): Potential tail risk, reduce exposure
- Improving convexity (score rising, positive momentum): Building positive asymmetry
Market Regime Analysis
- High average convexity: Risk-on environment, growth favored
- Low/negative convexity: Risk-off environment, defensive positioning
Interpretation Guide
Strong Buy Signals (Score > +25)" Upside volatility significantly exceeds downside
Buy Signals (Score +10 to +25): Moderate positive asymmetry
Neutral (Score -10 to +10): Symmetric volatility profile
Caution Signals (Score -25 to -10): Downside volatility exceeds upside
Avoid/Hedge Signals (Score < -25): Strong negative convexity
Why Convexity Matters
Nassim Taleb emphasizes that in an uncertain world, convexity is more valuable than prediction: "If you have favorable asymmetries, or positive convexity, options being a special case, then in the long run you will do reasonably well, outperforming the average in the presence of uncertainty."
Traditional risk metrics (Sharpe ratio, volatility) assume symmetric distributions. The Jensen Convexity Score reveals the hidden structure:
- Positive convexity: Benefits from volatility (antifragile)
- Negative convexity: Harmed by volatility (fragile)
Let me know if you have any suggestions :)
- Henrique Centieiro Indicator

Vortex Volatility Engine [Pineify]Vortex Volatility Engine: Advanced Directional Volatility Momentum Indicator with Squeeze Detection
The Vortex Volatility Engine is a sophisticated momentum oscillator that combines directional volatility analysis with squeeze detection to identify high-probability trading opportunities. Unlike traditional volatility indicators that simply measure price dispersion, this indicator decomposes volatility into bullish and bearish components, revealing the underlying directional strength of market movements. By integrating True Range normalization, directional momentum filtering, and dynamic volatility bands, it provides traders with a comprehensive framework for detecting volatility compression periods (squeezes) and subsequent explosive breakout signals.
Key Features
Directional Volatility Decomposition: Separates upward and downward price movements into distinct volatility components, revealing which side of the market controls momentum.
Squeeze Detection System: Identifies low-volatility consolidation periods by comparing short-term True Range against long-term baselines, signaling potential setup phases for major moves.
Dynamic Volatility Bands: Adaptive upper and lower bands calculated using standard deviation, creating context-aware thresholds that adjust to changing market conditions.
Breakout Signal Generation: Automated detection of volatility expansion events when the delta crosses outside dynamic bands during non-squeeze periods.
Four-Color Momentum Gradient: Visual differentiation between strong/weak bullish and bearish momentum using bright and dim color coding.
Comprehensive Alert System: Real-time notifications for bullish breakouts, bearish breakouts, squeeze initiation, and squeeze release events.
How It Works
The Vortex Volatility Engine employs a multi-stage calculation methodology that transforms raw price data into actionable volatility intelligence:
Stage 1: True Range Baseline Calculation
The indicator begins by calculating a smoothed True Range using the Running Moving Average (RMA) method over the user-defined lookback period (default 14 bars). True Range captures the maximum of three values: current high-low range, absolute value of high minus previous close, and absolute value of low minus previous close. This provides a comprehensive measure of actual market volatility that accounts for gaps and limit moves.
Stage 2: Directional Volatility Separation
Price changes are decomposed into two distinct components:
Upward Volatility (up_vol): Captures only positive price changes using math.max(ta.change(close), 0), then smooths with RMA to create an average upward momentum measure.
Downward Volatility (dn_vol): Captures only negative price changes (converted to positive values) using math.max(-ta.change(close), 0), then smooths with RMA to create an average downward momentum measure.
Stage 3: Power Normalization
Both directional volatility components are normalized against the True Range baseline and converted to a 0-100 scale:
Bull Power = (up_vol / tr_smooth) × 100
Bear Power = (dn_vol / tr_smooth) × 100
This normalization ensures that the indicator adapts to different volatility regimes and instruments. Values above 50 indicate bullish dominance, while values below 50 indicate bearish dominance.
Stage 4: Vortex Delta Calculation
The core signal is derived by subtracting Bear Power from Bull Power, creating the Vortex Delta. This delta is then smoothed using a Simple Moving Average (default 5 periods) to reduce noise and prevent false signals. Positive delta values indicate bullish volatility dominance, while negative values indicate bearish dominance.
Stage 5: Squeeze Detection Logic
The indicator compares short-term True Range (using the primary length parameter) against a long-term True Range baseline (3× the primary length). When short-term volatility falls below a user-defined threshold (default 0.8× the long-term average), a squeeze condition is triggered. This identifies consolidation periods where the market is "coiling" before a potential explosive move.
Stage 6: Dynamic Band Construction
Upper and lower volatility bands are constructed using:
Basis Line: SMA of the Vortex Delta over 2× the primary length
Standard Deviation: Calculated over the same period
Upper Band: Basis + (StdDev × Band Multiplier)
Lower Band: Basis - (StdDev × Band Multiplier)
These bands create adaptive thresholds that expand during high-volatility periods and contract during low-volatility periods, providing context-aware breakout detection.
Trading Ideas and Insights
Breakout Trading Strategy
The primary trading methodology involves waiting for squeeze periods followed by volatility expansion breakouts:
Identify Squeeze: Watch for gray dots appearing on the zero line, indicating volatility compression.
Wait for Release: Monitor for the squeeze to fire (gray dots disappear), signaling the end of consolidation.
Confirm Direction: Enter trades when the Vortex Delta crosses above the upper band (bullish breakout) or below the lower band (bearish breakout) during non-squeeze periods.
Momentum Confirmation: Prioritize trades where the histogram shows bright colors (strong momentum) rather than dim colors (weak momentum).
Trend Continuation Signals
Use the histogram color gradient to identify trend strength:
Bright green bars (delta > 0 and increasing) suggest strong bullish momentum continuation
Dark green bars (delta > 0 but decreasing) suggest weakening bullish momentum, potential reversal warning
Bright red bars (delta < 0 and decreasing) suggest strong bearish momentum continuation
Dark red bars (delta < 0 but increasing) suggest weakening bearish momentum, potential reversal warning
Mean Reversion Opportunities
When the Vortex Delta reaches extreme levels outside the dynamic bands but fails to sustain momentum (color shifts from bright to dim), this can signal exhaustion and potential mean reversion back toward the zero line or basis.
How Multiple Indicators Work Together
The Vortex Volatility Engine integrates four distinct analytical components into a unified framework:
1. True Range Foundation
Provides the volatility baseline that normalizes all other calculations, ensuring the indicator adapts to different market conditions and instruments without requiring recalibration.
2. Directional Momentum Decomposition
By separating upward and downward price movements, the indicator reveals which side controls the market. This is superior to simple momentum oscillators that only show net movement, as it exposes the underlying battle between bulls and bears.
3. Squeeze Detection System
The squeeze component acts as a filter and setup identifier. By comparing short-term versus long-term volatility, it identifies periods of compression that historically precede significant directional moves. This prevents traders from taking breakout signals during normal volatility fluctuations.
4. Dynamic Volatility Bands
The standard deviation-based bands provide context-aware thresholds that adapt to changing market regimes. During high-volatility periods, the bands widen to prevent false signals. During low-volatility periods, they contract to capture smaller but significant moves.
Synergistic Integration:
These components work together in a logical sequence: True Range establishes the baseline → Directional decomposition reveals momentum → Squeeze detection identifies setup periods → Dynamic bands define breakout thresholds. Each component enhances the others, creating a robust system that filters noise while capturing genuine volatility expansion events.
Unique Aspects
Volatility Normalization Method: Unlike standard vortex indicators that use absolute price differences, this engine normalizes directional movements against True Range, creating a percentage-based power metric that works across all timeframes and instruments.
Four-Tier Color Coding: The histogram uses a sophisticated color gradient that distinguishes not just direction (bullish/bearish) but also momentum strength (accelerating/decelerating), providing instant visual feedback on trend quality.
Squeeze Filtering Logic: Breakout signals are only generated during non-squeeze periods, preventing false signals during consolidation and ensuring traders only act on genuine volatility expansion events.
Dual Smoothing Approach: Applies RMA smoothing to directional components and SMA smoothing to the final delta, balancing responsiveness with noise reduction.
Multi-Timeframe Volatility Analysis: Uses different lookback periods for squeeze detection (3× primary length) versus band calculation (2× primary length), creating a hierarchical volatility framework.
How to Use
Adding to Your Chart
Add the Vortex Volatility Engine to your chart - it displays in a separate pane below price.
The histogram shows the Vortex Delta (bullish/bearish volatility balance).
Gray circular dots on the upper and lower edges represent dynamic volatility bands.
Gray dots on the zero line indicate squeeze periods (low volatility compression).
Small colored circles on the histogram mark breakout signals.
Interpreting Signals
Histogram Above Zero: Bullish volatility dominance - upward price movements are stronger than downward movements.
Histogram Below Zero: Bearish volatility dominance - downward price movements are stronger than upward movements.
Bright Green Bars: Strong bullish momentum (delta positive and increasing) - trend continuation likely.
Dark Green Bars: Weak bullish momentum (delta positive but decreasing) - potential reversal warning.
Bright Red Bars: Strong bearish momentum (delta negative and decreasing) - downtrend continuation likely.
Dark Red Bars: Weak bearish momentum (delta negative but increasing) - potential reversal warning.
Squeeze Dots Present: Market in consolidation, volatility compressed - prepare for potential breakout.
Bullish Breakout Signal: Delta crosses above upper band during non-squeeze - enter long positions.
Bearish Breakout Signal: Delta crosses below lower band during non-squeeze - enter short positions.
Setting Up Alerts
Right-click on the indicator and select "Add Alert"
Choose from four alert conditions: Bullish Vortex Breakout, Bearish Vortex Breakout, Squeeze Started, Squeeze Fired
Configure notification preferences (popup, email, webhook, etc.)
Alerts will trigger automatically when conditions are met, allowing hands-free monitoring
Customization
Volatility Length (Default: 14)
Controls the lookback period for True Range and directional momentum calculations. Lower values (8-10) create a more responsive indicator suitable for intraday trading and volatile markets. Higher values (20-30) produce smoother signals better suited for swing trading and trending markets. Adjust based on your trading timeframe and market conditions.
Signal Smoothing (Default: 5)
Applies final smoothing to the Vortex Delta histogram to reduce noise and prevent whipsaws. Lower values (2-3) maintain responsiveness but may generate more false signals. Higher values (7-10) create cleaner signals but with increased lag. Use lower smoothing for scalping, higher smoothing for position trading.
Squeeze Threshold (Default: 0.8)
Determines how strict the squeeze detection is. Lower values (0.6-0.7) require more significant volatility compression, resulting in fewer but higher-quality squeeze signals. Higher values (0.9-1.0) detect squeezes more frequently but may include less significant consolidations. Adjust based on your preferred trade frequency.
Volatility Band Multiplier (Default: 2.0)
Controls the width of the dynamic volatility bands. Lower values (1.5-1.8) create tighter bands that generate more frequent breakout signals but with higher false positive rates. Higher values (2.5-3.0) create wider bands that filter out noise but may miss smaller breakout opportunities. Optimize based on backtesting results for your specific instrument and timeframe.
Recommended Settings by Trading Style
Scalping (1-5 min charts): Length: 8, Smoothing: 3, Squeeze: 0.7, Bands: 1.8
Day Trading (15-60 min charts): Length: 14, Smoothing: 5, Squeeze: 0.8, Bands: 2.0
Swing Trading (4H-Daily charts): Length: 21, Smoothing: 7, Squeeze: 0.85, Bands: 2.5
Conclusion
The Vortex Volatility Engine represents a comprehensive approach to volatility-based momentum trading by combining directional decomposition, squeeze detection, and adaptive band analysis into a single, cohesive framework. By normalizing volatility components against True Range and implementing multi-stage filtering logic, it provides traders with high-probability setup identification and breakout confirmation signals. Whether you're trading breakouts from consolidation, following momentum trends, or identifying exhaustion reversals, this indicator delivers the volatility intelligence needed to make informed trading decisions across all timeframes and market conditions. Indicator

Nova Statistical Filtering Oscillator [Pineify]Nova Statistical Filtering Oscillator - Advanced Mean Reversion Trading Tool
A sophisticated statistical oscillator that identifies overbought and oversold market conditions using Z-Score normalization and dynamic volatility bands
The Nova Statistical Filtering Oscillator (NSFO) is an advanced technical analysis tool designed to help traders identify potential mean reversion opportunities in financial markets. By combining statistical price normalization with adaptive smoothing techniques, this indicator provides a unique approach to detecting extreme price conditions and anticipating momentum reversals.
Z-Score based statistical analysis
Triple Exponential Moving Average (TEMA) smoothing
Dynamic volatility bands
Automatic mean reversion signal generation
Gradient color visualization
Customizable parameters
Statistical overbought/oversold detection
Noise reduction through TEMA smoothing
Adaptive bands that adjust to market volatility
Clear buy and sell signal indicators
Visual gradient coloring for quick analysis
Configurable alert conditions
The NSFO operates through a sophisticated three-step statistical process that transforms raw price data into actionable trading signals.
Step 1: Z-Score Calculation
The indicator first calculates the Z-Score, which measures how many standard deviations the current price is from its historical mean. This statistical normalization allows traders to objectively identify when price has moved to statistically extreme levels. The formula uses a configurable lookback period (default 20 bars) to compute both the simple moving average (mean) and standard deviation. A Z-Score greater than +2 or less than -2 indicates statistically rare extreme conditions, occurring approximately only 5% of the time.
Step 2: TEMA Smoothing
Raw Z-Score values can be volatile and produce choppy signals. The NSFO applies Triple Exponential Moving Average (TEMA) smoothing to reduce market noise while maintaining responsiveness. TEMA combines three successive EMAs using the formula: 3×EMA1 - 3×EMA2 + EMA3, achieving smoother results with less lag compared to traditional moving averages.
Step 3: Dynamic Volatility Bands
Unlike static overbought/oversold levels, the NSFO creates adaptive bands based on the volatility of the smoothed oscillator itself. This self-referential approach automatically adjusts to changing market conditions - becoming wider during volatile markets and narrower during calm periods. The bands are calculated using the standard deviation of the smoothed oscillator multiplied by a configurable factor (default 2.0).
The NSFO is built on the fundamental principle of mean reversion - the statistical observation that prices tend to return to their average over time. This concept has been validated through decades of market research and forms the basis of many successful trading strategies.
Statistical Extremes as Trade Setups : When the oscillator reaches the upper or lower bands, it indicates the price has moved to a statistically extreme level. These conditions often precede reversals as the market corrects itself back toward the mean.
Momentum Confirmation : The gradient coloring system provides instant visual feedback on current momentum. When the oscillator transitions from extreme levels toward the center, it confirms that momentum is shifting and the reversal may be gaining strength.
Time Frame Flexibility : The NSFO performs well across various time frames, from intraday charts to weekly frames. Shorter time frames generate more signals but require tighter risk management, while longer time frames produce fewer but potentially more reliable signals.
The NSFO uniquely combines three distinct technical concepts into a cohesive system:
Statistical Analysis (Z-Score) : Provides the mathematical foundation for identifying extreme price conditions using probability theory. This transforms subjective "overbought" or "oversold" labels into quantifiable statistical measurements.
Moving Average Smoothing (TEMA) : Reduces the inherent noise in raw statistical values while maintaining sensitivity to genuine price movements. The triple-layer EMA approach minimizes lag that typically affects simple moving averages.
Volatility-Based Bands : Creates adaptive thresholds that automatically adjust to current market conditions. This dynamic approach outperforms fixed-level indicators by accounting for the reality that market volatility changes over time.
The synergy between these three components creates a robust system where each element addresses a weakness in the others. The Z-Score provides statistical rigor, TEMA adds smoothness for actionable signals, and dynamic bands ensure the indicator remains effective across varying market conditions.
The Nova Statistical Filtering Oscillator offers several distinctive features that set it apart from traditional technical indicators:
Self-Referential Adaptation : The volatility bands are calculated from the oscillator's own standard deviation, creating a truly adaptive system that automatically adjusts to current market conditions without manual parameter changes.
Gradient Visualization : The color gradient provides at-a-glance understanding of current market position relative to statistical extremes, making it easy to identify both extreme conditions and transitions.
Zero Baseline Clarity : The central baseline at zero represents the statistical mean, providing an immediate visual reference point for understanding whether price is above or below its historical average.
Clean Signal Generation : Buy and sell signals are generated only when the oscillator crosses back from extreme levels, filtering out premature entries and focusing on confirmed reversals.
Using the NSFO effectively requires understanding both its signals and its limitations. Here's how to integrate it into your trading strategy:
Identifying Overbought Conditions : When the oscillator crosses below the upper band (red line), it indicates the price has extended statistically above its average. This suggests a potential selling opportunity as the market may revert toward the mean.
Identifying Oversold Conditions : When the oscillator crosses above the lower band (green line), it indicates the price has dropped statistically below its average. This suggests a potential buying opportunity as the price may bounce back toward the mean.
Signal Confirmation : Wait for the oscillator to cross back toward the center (zero line) before entering a trade. This confirms the reversal is underway rather than just touching the extreme level.
Trend Context : Always consider the broader trend direction. In strong trending markets, the oscillator may remain at extreme levels for extended periods. Use additional trend indicators for confirmation.
Important Note: No indicator guarantees profitable trades. Always use proper risk management and consider combining NSFO with other technical or fundamental analysis tools for better decision-making.
The NSFO provides several customizable parameters to suit different trading styles and market conditions:
Statistical Window (default: 20) : Controls the lookback period for calculating mean and standard deviation. Higher values produce more stable readings but respond slower to price changes. Lower values are more responsive but may generate more false signals.
Smoothing Length (default: 10) : TEMA period for reducing noise in the Z-Score. Higher values create smoother lines with more lag, while lower values are more responsive but potentially noisier.
Bands Multiplier (default: 2.0) : Controls the width of dynamic bands in standard deviations. Higher values create wider bands, reducing false signals but potentially missing some opportunities. Lower values generate more signals but with increased noise.
Color Customization : Traders can customize bullish (green) and bearish (red) colors to match their visual preferences or other indicators in their chart setup.
The Nova Statistical Filtering Oscillator represents a sophisticated approach to identifying statistical extremes in financial markets. By combining Z-Score normalization with TEMA smoothing and dynamic volatility bands, it provides traders with a powerful tool for detecting potential mean reversion opportunities.
Its adaptive nature ensures effectiveness across various market conditions, while the clear visual signals make it accessible to traders of all experience levels. Whether used as a primary trading system or as a confirmation tool alongside other indicators, the NSFO offers a unique perspective on market dynamics that can enhance your trading decisions.
Remember to always test any new indicator thoroughly on historical data before using it with real capital, and maintain disciplined risk management practices regardless of the signals generated.
This indicator is provided for educational and informational purposes only. Past performance does not guarantee future results. Trading financial markets involves substantial risk, and you should only trade with capital you can afford to lose. Always conduct your own research and consider your financial situation before making any trading decisions.
Indicator

Momentum Decay Field [BullByte]Momentum Decay Field : Physics-Based Momentum Energy Visualization
WHAT IS THE MOMENTUM DECAY FIELD?
The Momentum Decay Field (MDF) models price momentum as a decaying physical energy field using an exponential half-life model. MDF visualizes impulse energy on the price chart, detects exhaustion and energy divergence, and stores past exhaustion zones as reference levels. This is an informational visualization tool - not a buy/sell signal generator.
In nuclear science, every radioactive element emits energy that decays exponentially over time following a precise mathematical law. MDF applies this exact principle to price momentum.
Every strong price impulse carries kinetic energy. That energy does not last forever. It fades, weakens, and eventually depletes - just like a radioactive isotope losing its charge. MDF measures this process in real time and wraps price in a living energy field that expands, contracts, changes color, and ultimately signals exhaustion when the energy runs out.
This is not a moving average. Not an oscillator. Not a mashup of existing tools . It is a standalone physics engine that models momentum as a decaying energy system directly on the price chart.
THE CORE PHYSICS
The engine is built on the exponential decay formula from nuclear physics:
E(t) = E0 x exp(-lambda x t)
Where:
E(t) is the remaining energy at time t (measured in bars after the impulse)
E0 is the initial energy assigned to the impulse at the moment it occurs
lambda is the decay constant, derived from the half-life: lambda = ln(2) / Half-Life
t is the number of bars elapsed since the impulse
The half-life is the number of bars it takes for energy to decay to exactly 50% of its initial value. After two half-lives, 25% remains. After three, 12.5%. This creates the smooth, predictable decay curve visible in the dashboard sparkline.
When the adaptive half-life option is enabled, stronger impulses automatically receive a longer half-life. This means powerful moves with high volume and velocity sustain their energy field longer before exhausting, while weak impulses fade quickly. This mirrors real market behavior where institutional-grade moves carry momentum further than retail noise.
HOW IMPULSES ARE DETECTED
Not every candle qualifies as an impulse. The detection engine requires three conditions to be met simultaneously:
First , the candle body size (distance between open and close) must exceed a user-defined multiple of the Average True Range. This ensures only candles with genuine directional magnitude qualify.
Second , the total candle range (high to low) must also exceed an ATR-based threshold. This confirms the move had real price displacement, not just a wide body on a small-range bar.
Third , the body-to-range ratio must exceed 0.45. This filters out doji candles, pin bars, and high-wick candles that suggest indecision rather than conviction. Only candles where the body represents a significant portion of the total range pass through.
When an impulse qualifies, its initial energy (E0) is calculated by combining three factors: the normalized body magnitude (body size divided by ATR), a velocity boost (how fast price moved over the velocity window compared to average), and an optional volume boost (current bar volume relative to the rolling volume average). The result is capped at 5.0 to prevent extreme outliers from dominating the field.
THE ENERGY FIELD : WHAT YOU SEE ON THE CHART
The energy field is the colored aura that appears around price. It communicates the current momentum state through three visual properties:
Width: The field expands when energy is high and contracts as energy decays. At full energy, the field reaches its maximum width (controlled by the Max Field Width setting). As energy approaches zero, the field collapses to nothing. The width is always proportional to ATR so it adapts automatically to any instrument and timeframe.
Color: The field color morphs through three stages as energy decays. At high energy levels (above 55%), the field displays the bright directional color - the bullish theme color for upward impulses, the bearish theme color for downward impulses. As energy drops into the mid range (20-55%), the color transitions through warm amber, a universal warning tone indicating momentum is fading. Below 20%, the field shifts to cool gray, signaling that momentum is nearly spent. This color morphing happens smoothly and continuously on every bar.
Layering: The field is rendered in up to three concentric tiers - inner, mid, and outer - each progressively more transparent. The inner layer sits closest to price and is most opaque. The mid layer extends further with reduced opacity. The outer layer provides the widest aura at the lowest visibility. This creates a natural gradient that makes the field feel organic rather than blocky.
THREE VISUAL MODES
Clean mode renders no energy field at all. Only the signal markers (diamond, EXH, WEAK) and the dashboard appear on the chart. This mode is designed for traders who want a completely uncluttered chart and only care about the event markers and data panel. The momentum engine still runs in the background, powering the dashboard metrics and signals.
Standard mode activates the inner and mid field layers along with the energy spine - a central reference line running through the price that pulses with momentum. This is the default mode and provides a balanced view of the energy state without overwhelming the chart.
Full mode enables all three field tiers and adds candle tinting, where the candle bodies themselves are colored according to the current energy state and direction. High-energy bars glow with the directional color while depleted bars take on neutral tones. This mode provides maximum visual information for traders who want to see the full energy picture at a glance.
SIGNAL MARKERS : WHAT EACH ONE MEANS
Diamond (below bar for bullish, above bar for bearish): This marks the bar where a qualified impulse was detected and energy was injected into the system. It tells you that the decay physics engine has been activated or refreshed with new energy. Not every strong candle produces a diamond - the cooldown system prevents clustering by enforcing a minimum number of bars between consecutive impulse markers.
EXH (cross shape, amber color): This marks the bar where the energy ratio dropped below the exhaustion threshold. It means the momentum that was driving price has fully depleted according to the decay model. These exhaustion points often coincide with areas where price pauses, reverses, or enters consolidation. The anti-repeat filter ensures that the same directional exhaustion does not fire consecutively without a change in context - either a new direction must establish or sufficient time must pass.
WEAK (triangle shape, orange color): This marks an energy divergence. It appears when price makes a new high (for bullish) or new low (for bearish) but the impulse energy behind that move is at least 25% weaker than the previous impulse in the same direction. The price is extending but the fuel behind it is diminishing. This is a momentum divergence detected purely through the energy physics model, not through any traditional oscillator comparison. When WEAK fires on the same bar as an impulse, the diamond marker is automatically suppressed because the WEAK label already communicates that an impulse occurred - it simply carried less energy than its predecessor.
EXHAUSTION MEMORY ZONES
When an exhaustion event occurs, the indicator stores the price range of that bar as a memory zone. These zones are rendered as semi-transparent colored rectangles that extend from the exhaustion bar to the right edge of the chart. Bullish exhaustion zones use the bullish theme color and bearish exhaustion zones use the bearish theme color.
These zones represent price levels where momentum previously failed to sustain. They often act as areas of interest for future price action because they mark locations where aggressive directional energy was fully consumed. Fresh zones appear more opaque and gradually fade as they age, eventually becoming fully transparent after the user-configured fade period.
The Max Zones Displayed setting controls how many zones appear simultaneously. Only the most recent zones are shown. The Zone Fade Period controls how many bars a zone remains visible before disappearing. A three-stage memory management system runs continuously to prevent the zone array from growing unbounded on long-history charts: old zones beyond twice the fade period are pruned, the array is capped at a safe maximum, and the rendering loop enforces a drawing budget to stay within platform limits.
THE DASHBOARD : EVERY ELEMENT EXPLAINED
The dashboard uses a fully opaque dark background that renders identically on both light and dark chart themes. Every cell has its own explicit background color so nothing is inherited from the chart environment.
ENERGY: A 16-character progress bar showing remaining energy as a visual fill gauge, followed by the numerical percentage. The bar transitions from bright green (charged) through cyan (active) to amber (decaying) to orange (fading) to red (depleted).
PHASE: Displays the current energy state classification. CHARGED means energy is above 70% - momentum is strong and active. ACTIVE means 45-70% - momentum is present and sustaining. DECAYING means 20-45% - momentum is fading but not yet spent. FADING means energy is above the exhaustion threshold but below 20% - momentum is weak. DEPLETED means energy has fallen below the exhaustion threshold - the current cycle has exhausted.
The directional bias (BULL, BEAR, or FLAT) appears alongside the phase to show which direction the current energy cycle belongs to.
E0 INITIAL: Shows the initial energy magnitude that was assigned to the current impulse cycle when it began. The classification label (Extreme, Strong, Moderate, Light) provides quick context about how powerful the originating impulse was.
HALF-LIFE: Displays the current half-life in bars - how long it takes for energy to decay to 50%. When adaptive half-life is enabled, this value changes with each impulse based on its strength. The ELP (elapsed) counter shows how many bars have passed since the last impulse event.
ETA TO EXH: The predicted number of bars remaining until energy reaches the exhaustion threshold. This is calculated by solving the decay equation for time. The visual countdown bar (filled and empty blocks) provides a quick gauge of how close exhaustion is. When the current cycle has already exhausted, this displays EXHAUSTED in red.
DECAY CURVE: A 20-character sparkline that projects how energy will diminish over approximately three half-lives into the future. Each character represents a future time step. The curve reads from left (current moment, marked by NOW) toward the right (future). Tall blocks indicate high energy, dots indicate near-zero energy. This gives traders a visual preview of the entire remaining decay trajectory at a glance.
IMPULSES / EXHAUSTIONS / DIVERGENCES: Lifetime counters showing how many of each event type have occurred since the indicator was loaded on the chart. These provide context about the current session's activity level.
CHART EXAMPLE
Chart 1: ENERGY FIELD DYNAMICS & IMPULSE DETECTION
What This Chart Represents
This chart demonstrates the Momentum Decay Field's core visual engine showing how the energy field expands, contracts, and morphs in real-time as momentum cycles through impulse, sustain, and decay phases.
Key Visual Elements Highlighted:
1. ENERGY FIELD COLOR MORPHING The aura transitions through three distinct color phases as energy decays:
- Bright directional color (green for bullish, magenta for bearish) = High energy (>55% remaining)
- Warm amber/orange = Mid-energy decay phase (20-55% remaining)
- Cool gray = Low energy, momentum nearly spent (<20% remaining)
2. FIELD WIDTH DYNAMICS The energy band's width is directly proportional to remaining energy:
Wide, expansive field = Strong active momentum with high kinetic energy
Contracting field = Energy decaying, momentum losing strength
Thin/collapsed field = Minimal momentum, approaching exhaustion
Width scales with ATR to adapt across all instruments and timeframes
3. IMPULSE SIGNAL MARKERS (Diamonds) Pink/Green diamond markers identify the exact bars where qualified momentum impulses occurred:
Below price = Bullish impulse (upward energy injection)
Above price = Bearish impulse (downward energy injection)
Each diamond represents a new E0 (initial energy) assignment
Cooldown system prevents marker clustering during volatile periods
4. MULTI-CYCLE MOMENTUM VISUALIZATION The chart captures several complete momentum lifecycles:
Fresh impulses creating wide, bright energy fields
Progressive decay causing field contraction and color shift
Direction changes showing energy field polarity reversals
Energy stacking when same-direction impulses occur during active cycles
5.ENERGY DIVERGENCE SIGNAL (WEAK Marker)
Orange triangle with "WEAK" label
Triangle Up Position (Below Price):
Signal Type: Bearish energy divergence
Location: Bottom of the move after the bullish run
What It Detected: Price made a new low BUT the impulse energy behind that low was 25%+ weaker than the previous bearish impulse
CHART 2: EXHAUSTION SIGNALS, MEMORY ZONES & DASHBOARD DEEP DIVE
What This Chart Represents
This chart demonstrates the complete signal ecosystem of the Momentum Decay Field indicator, showcasing exhaustion detection, energy divergence, memory zones, and a full dashboard metrics breakdown. The chart captures a Solana (SOL/USDT) 15-minute timeframe showing the transition from strong bearish momentum through exhaustion to reversal with weakening energy.
1. ENERGY FIELD EVOLUTION
LEFT SIDE (Early Period - 1:00 to 10:00):
Bright magenta field = Strong bearish energy active
Wide field width = High momentum magnitude
Color morphing visible = Transition from bright magenta → brown/amber as energy decays
Field shows downtrend = Bearish impulse energy driving price lower
2. EXHAUSTION SIGNAL (EXH Marker)
Meaning: Momentum energy fully depleted - energy ratio dropped below 8% threshold
Location: Above the price bars (bearish exhaustion that preceded the bullish reversal)
Trigger Conditions Met:
Energy ratio < 0.08 (exhaustion threshold)
Minimum E0 > 0.5 (filters noise)
Minimum 3 bars elapsed since impulse
Cooldown period satisfied (8 bars between signals)
Anti-repeat filter passed (different direction or sufficient time gap)
What Happened Here: The strong bearish momentum (magenta field on left) progressively decayed until energy was fully consumed. The EXH marker fired at the exact bar where the decay equation calculated remaining energy had fallen below the 8% threshold.
3. EXHAUSTION MEMORY ZONE (Green Rectangle)
Large semi-transparent green box
Zone Type: Bullish exhaustion memory zone
Price Range: Captures the high-low range of the bar where bullish momentum exhausted
Color: Green with ~92% opacity at creation, fading over time
Border: Green border at ~78% opacity
Extension: Extends from exhaustion bar to right edge of chart (+10 bars beyond current)
Why It Matters: Price levels where momentum exhausted represent areas where directional energy was fully consumed. Market often "remembers" these levels as they frequently become magnets for future price action, areas of consolidation, or reversal zones.
4.ENERGY SPINE (Coloured Line Through Price Center)
Visible as dark line running through candle midpoints:
Technical Details:
Plots at hlc3 (average of high, low, close)
Color matches field color, opacity varies with energy level
Only visible when energy > 12%
Provides visual anchor showing momentum center of gravity
Style: Line breaks (plot.style_linebr) to avoid connecting across gaps
Purpose: The spine acts as a dynamic momentum equilibrium line. When field is wide, spine shows the center of energy distribution. As field contracts, spine becomes the last visible element before total energy depletion. Helps traders identify the core momentum flow without relying solely on field boundaries.
RECOMMENDED SETTINGS AND TIMEFRAMES
The default settings are calibrated for intraday trading on timeframes between 1 minute and 15 minutes. The indicator works on all timeframes and all instruments but the default parameters are optimized for the pace of day trading where impulse-to-exhaustion cycles complete within a visible chart window.
For scalping on 1-minute charts, consider reducing the Base Half-Life to 5-6 bars and the Impulse Lookback to 8-10. This makes the system more responsive to the rapid impulse cycles on lower timeframes.-
For swing trading on 1-hour or 4-hour charts, consider increasing the Base Half-Life to 12-16 bars and the Impulse Threshold to 2.0-2.5. This filters out intrabar noise and focuses on only the most significant impulses that drive multi-hour moves.
For daily charts, increase the Half-Life to 15-20 bars and enable Adaptive Half-Life to let strong institutional moves sustain their field across multiple sessions.
The Volume Weighting option is recommended to be kept enabled on instruments with reliable volume data (stocks, futures, major crypto pairs). For forex pairs where volume represents tick count rather than actual traded volume, consider disabling it or treating it as a secondary factor.
THOUGHT BEHIND THE INDICATOR
The concept originated from a simple observation: every momentum move in the market follows a lifecycle that mirrors energy decay in physics. A strong impulse starts with maximum energy, sustains for a period, then gradually loses force until it is fully spent. Traditional momentum indicators attempt to measure this through oscillators that lag behind price. MDF takes a fundamentally different approach by modeling the decay process itself using established physics rather than measuring its symptoms through lagging mathematical transformations.
The exponential decay model was chosen specifically because it matches the empirical behavior of momentum in financial markets. Momentum does not decay linearly - it holds relatively steady in the early phase after an impulse, then accelerates its decline as it approaches exhaustion. This is precisely the shape of an exponential decay curve and is why the half-life model produces a more accurate representation than a simple moving average or percentage-based countdown.
The energy divergence detection was added after observing that many trend reversals are preceded by a sequence of price extremes with diminishing impulse energy. The price chart shows strength (higher highs or lower lows) while the underlying energy tells a different story (each push requires less fuel). This hidden weakness is invisible on a standard chart but becomes immediately apparent when measured through the energy model.
WHAT THIS INDICATOR DOES NOT DO
This indicator does not generate buy or sell signals. It does not tell you when to enter or exit a trade. It does not predict future price direction. It measures and visualizes the current state of momentum energy to help you make more informed decisions within your own trading framework.
The exhaustion markers identify zones where momentum energy has depleted according to the physics model. Price may reverse at these zones, consolidate, or continue in the same direction after a new impulse injects fresh energy. The markers are informational reference points, not trading signals.
The energy divergence detection (WEAK markers) highlights instances where price extremes are driven by weakening energy. This is an observation about momentum quality, not a prediction about price direction. Divergences can persist through multiple cycles before price responds.
NON REPAINT BEHAVIOUR
Every calculation in this indicator uses only confirmed bar data (open, high, low, close, volume) from completed bars. No future data is referenced. No calculations change retroactively after a bar closes. The impulse detection, energy assignment, decay computation, exhaustion detection, and divergence detection all operate exclusively on confirmed historical data. What you see on a closed bar will never change.
DISCLAIMER
Trading financial instruments involves substantial risk of loss. Past energy states and exhaustion patterns do not guarantee future price behavior. This tool visualizes momentum dynamics to support analysis - it does not provide financial advice. The author assumes no responsibility for trading decisions or losses. Always employ proper risk management and never risk capital you cannot afford to lose.
- BullByte Indicator

Indicator

Smart SafeZone Stops [MarkitTick]💡 This script represents a sophisticated evolution of volatility-based trailing stop methodologies. It is designed to assist traders in managing trend-following positions by dynamically adjusting stop-loss levels based on market noise, directional momentum, and volume flows. Unlike static trailing stops that move by a fixed percentage or simple ATR multiples, this tool calculates the "safe zone" by analyzing how far price has penetrated against the trend over a specific lookback period, offering a granular approach to risk management that adapts to changing market conditions.
✨ Originality and Utility
The primary utility of this indicator lies in its ability to filter out market noise while remaining tight enough to protect profits during strong trends. While the classic SafeZone concept (popularized by Dr. Alexander Elder) is effective, this script introduces several modern enhancements that increase its robustness:
● Dynamic ADX Integration Standard SafeZone stops use a fixed multiplier. This script integrates the Average Directional Index (ADX) to gauge trend strength. When the trend is strong, the stop tightens (Aggressive Multiplier) to lock in profits rapidly. When the trend is weak or choppy, the stop widens (Conservative Multiplier) to prevent premature shakeouts. ● Volume-Weighted Noise Price movement on low volume is often considered "noise," while high-volume movement signifies conviction. This script optionally weights the noise calculation by Relative Volume. A downward spike on low volume will affect the stop level less than a downward spike on high volume.
● 3-Day Smoothing Mechanism To prevent the stop line from becoming too jagged or reacting to single-bar anomalies, the script applies a 3-day smoothing algorithm. It utilizes the "worst-case" scenario of the last three calculated stop levels, ensuring the stop only moves when the trend structure genuinely shifts.
🔬 Methodology and Concepts
The underlying logic operates on a "Ratchet" mechanism, meaning the stop line can only move in the direction of the trade (up for longs, down for shorts) and never retraces until a trend reversal occurs.
● Directional Noise Calculation The script separates market noise into two components: Downside Penetration (for Longs): The distance the price dips below the previous bar's low. Upside Penetration (for Shorts): The distance the price spikes above the previous bar's high. The average of these penetrations is calculated over the Noise Lookback Period .
● The SafeZone Formula The raw stop level is derived as follows: Long Stop = Previous Low - (Average Downside Noise × Multiplier) Short Stop = Previous High + (Average Upside Noise × Multiplier)
● Adaptive Multiplier Logic If Dynamic ADX is enabled: If ADX > Strong Threshold: Use Aggressive Multiplier (e.g., 1.5x). If ADX < Weak Threshold: Use Conservative Multiplier (e.g., 3.5x). Otherwise: Use the Base Safety Coefficient.
● Exhaustion Detection The script calculates the distance between the current Close price and the Active Stop. If this distance exceeds a specific multiple of the ATR (Average True Range), it flags a "Mean Reversion" or "Exhaustion" warning, suggesting price has extended too far from equilibrium.
🎨 Visual Guide
The indicator plots distinct visual elements to guide decision-making without cluttering the chart excessively.
● Trailing Stop Lines Green Line (Solid): Represents the SafeZone Long Stop. This line appears below price during an uptrend. As long as price closes above this line, the bullish bias is intact. Red Line (Solid): Represents the SafeZone Short Stop. This line appears above price during a downtrend. A close above this line signals a potential short exit or reversal.
● Trend Signals Green Triangle (Below Bar): Marks the "Bull Start." This occurs when the price crosses above the Trend Filter EMA and the trend logic flips to bullish. Red Triangle (Above Bar): Marks the "Bear Start." Indicates the start of a downtrend sequence.
● Exhaustion Warnings Yellow Labels (⚠️): These appear when price has extended significantly away from the stop line (based on the ATR Exhaustion Multiplier). This is not an immediate sell signal but a warning that the trend may be overextended and a pullback is probable.
● MTF Consensus Cloud Background Color: If enabled, the chart background changes color to reflect the Higher Timeframe (HTF) trend. Green Background: Current trend matches HTF Uptrend. Red Background: Current trend matches HTF Downtrend. Gray Background: Trends are mismatched (Consolidation/Conflict).
● Quantitative Dashboard A table located in the top-right corner displays real-time statistics: Trend: Current state (BULLISH/BEARISH). Age: Number of bars since the trend began. Stop Price: Exact price level of the trailing stop. Risk %: The percentage distance from the current Close to the Stop. If this exceeds 3%, the text turns red to highlight elevated risk. Active Mult: The current multiplier being used (Dynamic or Fixed). ADX State: Shows if the trend is Strong, Weak, or Normal.
📖 How to Use
1. Entry Timing Wait for a Trend Switch signal (Triangle). For a long entry (Green Triangle), ensure the price is above the Trend Baseline (EMA). Ideally, look for confluence with the MTF Cloud (Green Background).
2. Position Management Once in a trade, use the Trailing Stop Line as your hard exit or invalidation point. Do not manually move the stop away from price; the script automatically "ratchets" the stop tighter as the trend progresses.
3. Taking Profits Use the "Exhaustion Warnings" (⚠️) as opportunities to scale out of positions. When price moves parabolically away from the stop line, the probability of a snap-back increases.
4. Managing Chop If the dashboard shows "ADX State: WEAK," expect the stop line to remain wider. This allows the asset "room to breathe" without stopping you out on random volatility.
⚙️ Inputs and Settings
The script is highly customizable to fit different asset classes (Crypto, Forex, Stocks).
● Trend Definitions Trend Filter (EMA Length): Determines the baseline trend bias (Default: 22). Price must be above this EMA to initiate a long calculation.
● Noise Calculation Noise Lookback Period: The number of bars used to calculate average penetration (Default: 10). Base Safety Coefficient: The standard multiplier applied to the noise average (Default: 2.5). Higher values = wider stops. Use Volume Weighting: Enables the volume-adjustment logic. Use 3-Day Smoothing: Recommended keeping this TRUE to avoid stop-hunts.
● Dynamic Multiplier (ADX) Enable Dynamic ADX: Toggles the adaptive multiplier. Strong/Weak Thresholds: The ADX levels that trigger aggressive or conservative multipliers.
● Multi-Timeframe Consensus Higher Timeframe: Select the TF for the cloud background (e.g., Daily or Weekly).
● Exhaustion Warning ATR Multiplier: Defines how far price must be from the stop to trigger a warning (Default: 3.0).
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The "Smart SafeZone" indicator is grounded in the statistical analysis of market noise versus signal.
● Theory of Noise Penetration Conventional stops often use Standard Deviation (Bollinger Bands) or Average True Range (Keltner Channels/Chandelier Stops). While effective, these measures assume volatility is symmetrical. This script adopts the view that directional volatility matters more. In an uptrend, upside volatility is "good" signal, while downside volatility is "noise." By explicitly calculating the average downside penetration (Low - Low), the script isolates the specific counter-trend force acting on the asset. ● Volume-Weighted Price Analysis (VWPA) The inclusion of volume weighting draws upon Dow Theory principles, which state that volume must confirm the trend. Math: Penetration × (Volume / AverageVolume) This formula asserts that a price drop on low volume is statistically less significant than a drop on high volume. By dampening the impact of low-volume moves, the stop becomes more resistant to liquidity vacuums and algorithmic stop-hunts.
● Trend Efficiency (ADX) The integration of J. Welles Wilder’s ADX (Average Directional Index) adds a dimension of Trend Efficiency. High ADX values indicate a highly efficient trend with little retracement. Mathematically, this justifies a lower standard deviation (or noise multiplier) for the stop, as the probability of a deep retracement without a trend change is lower in high-momentum environments.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Indicator

Apex Adaptive Trend Navigator [Pineify]Apex Adaptive Trend Navigator
The Apex Adaptive Trend Navigator is a comprehensive trend-following indicator that combines adaptive moving average technology, dynamic volatility bands, and market structure analysis into a single, cohesive trading tool. Designed for traders who want to identify trend direction with precision while filtering out market noise, this indicator adapts its sensitivity based on real-time market efficiency calculations.
Key Features
Adaptive Moving Average with efficiency-based smoothing factor
Dynamic ATR-based volatility bands that expand and contract with market conditions
Market Structure detection including BOS (Break of Structure) and CHoCH (Change of Character)
Real-time performance dashboard displaying trend status and efficiency metrics
Color-coded cloud visualization for intuitive trend identification
How It Works
The core of this indicator is built on an Adaptive Moving Average that uses a unique efficiency-based calculation method inspired by the Kaufman Adaptive Moving Average (KAMA) and TRAMA concepts. The efficiency ratio measures the directional movement of price relative to total price movement over the lookback period:
Efficiency = |Price Change over N periods| / Sum of |Individual Bar Changes|
This ratio ranges from 0 to 1, where values closer to 1 indicate a strong trending market with minimal noise, and values closer to 0 indicate choppy, sideways conditions. The smoothing factor is then squared to penalize noisy markets more aggressively, causing the adaptive line to flatten during consolidation and respond quickly during strong trends.
The Dynamic Volatility Bands are calculated using the Average True Range (ATR) multiplied by a user-defined factor. These bands create a channel around the adaptive moving average, helping traders visualize the current volatility regime and potential support/resistance zones.
Trading Ideas and Insights
When price stays above the adaptive line with the bullish cloud forming, consider this a confirmation of uptrend strength
The efficiency percentage in the dashboard indicates trend quality - higher values suggest more reliable trends
Watch for price interactions with the upper and lower bands as potential reversal or continuation zones
A flat adaptive line indicates consolidation - wait for a clear directional break before entering trades
How Multiple Indicators Work Together
This indicator integrates three complementary analytical approaches:
The Adaptive Moving Average serves as the trend backbone, providing a dynamic centerline that automatically adjusts to market conditions. Unlike fixed-period moving averages, it reduces lag during trends while minimizing whipsaws during ranging markets.
The ATR Volatility Bands work in conjunction with the adaptive MA to create a volatility envelope. When the adaptive line is trending and price remains within the cloud (between the MA and outer band), this confirms trend strength. Price breaking through the opposite band may signal exhaustion or reversal.
The Market Structure Analysis using swing point detection adds a Smart Money Concepts (SMC) layer. BOS signals indicate trend continuation when price breaks previous swing highs in uptrends or swing lows in downtrends. CHoCH signals warn of potential reversals when the structure shifts against the prevailing trend.
Unique Aspects
The squared efficiency factor creates a non-linear response that dramatically reduces noise sensitivity
Cloud fills only appear on the trend side, providing clear visual distinction between bullish and bearish regimes
The integrated dashboard eliminates the need to switch between multiple indicators for trend assessment
Pivot-based swing detection ensures accurate market structure identification
How to Use
Add the indicator to your chart and adjust the Lookback Period based on your trading timeframe (shorter for scalping, longer for swing trading)
Monitor the cloud color - green clouds indicate bullish conditions, red clouds indicate bearish conditions
Use the efficiency reading in the dashboard to gauge trend reliability before entering positions
Consider entries when price pulls back to the adaptive line during strong trends (high efficiency)
Use the volatility bands as dynamic take-profit or stop-loss reference levels
Customization
Lookback Period : Controls the sensitivity of trend detection and swing point identification (default: 20)
Volatility Multiplier : Adjusts the width of the ATR bands (default: 2.0)
Show Market Structure : Toggle visibility of BOS and CHoCH labels
Show Performance Dashboard : Toggle the trend status table
Color Settings : Customize bullish, bearish, and neutral colors to match your chart theme
Conclusion
The Apex Adaptive Trend Navigator offers traders a sophisticated yet intuitive approach to trend analysis. By combining adaptive smoothing technology with volatility measurement and market structure concepts, it provides multiple layers of confirmation for trading decisions. Whether you are a day trader seeking quick trend identification or a swing trader looking for reliable trend-following signals, this indicator adapts to your market conditions and trading style. The efficiency-based calculations ensure you always know not just the trend direction, but also the quality and reliability of that trend.
Indicator

BE-QuantFlow: Adaptive Momentum Trading█ Overview: QuantFlow: Adaptive Momentum Trading
QuantFlow is a sophisticated algorithmic momentum trading method designed specifically for indices and high-beta stocks. However, its logic is universal; with appropriate parameter tuning, it adapts to various asset classes and timeframes.
While the standard momentum indicators (like RSI or MACD) simply measure how fast price is moving (Velocity), QuantFlow analyzes the quality and conviction of the trend . Features like Dynamic Volatility Filtering and Trend Shielding, combined with volatility weighting and a "Dual-Line" approach to distinguish between a sustainable institutional trend and a temporary retail spike, make the indicator unique and more powerful.
█ Why QuantFlow ?
Quant (The Engine): This replaces subjective guessing with objective math.
Instead of just seeing that the price is "up," we measure "how it got there". For example, a stock that rises 1 currency value every day for 10 days (smooth trend) gets a much higher score than a stock that jumps 10 currency value in one minute and does nothing else (erratic noise). This mathematical rigor provides the structure.
█ Core Logic & Philosophy
To understand how QuantFlow calculates momentum, imagine a "Tug-of-War" between Buyers (Bulls) and Sellers (Bears). Most indicators (like RSI) use a single line. If RSI is at 50, it means "Neutral." But "Neutral" can mean two very different things:
Peace: Nothing is happening. No one is buying or selling.
War: Buyers are pushing hard, but Sellers are pushing back equally hard. Volatility is massive.
A single line hides this reality. QuantFlow splits the market into two separate scores:
Bull Score (Green Line): How hard are the buyers pushing?
Bear Score (Red Line): How hard are the sellers pushing?
The Layman's Advantage:
If both lines are low = Sleepy Market (Avoid).
If Green is high and Red is low = Clean Uptrend (Buy).
If Red is high and Green is low = Clean Downtrend (Sell).
If both lines are high = Chaos/War Zone (Wait).
█ How it Weight "Sustenance" (The Critical Quality Check)
This is the most unique aspect of QuantFlow: Trend direction alone is not enough; Sustenance is weighed equally . Standard indicators treat every 10 currency value movements the same way with no distinction. However, QuantFlow asks, "Did you hold the ground you gained?"
Scenario A (High Sustenance) : A stock opens at 100, marches to 110, and closes at 110.
Verdict : Buyers pushed up and sustained the price.
QuantFlow Weight : 100%. This is a high-quality move.
Scenario B (Low Sustenance) : A stock opens at 100, spikes to 110, but gets sold off to close at 102.
Verdict : Buyers pushed up (Trend is Up), but failed to sustain it (Long Wick).
QuantFlow Weight : 20%. This is treated as "Noise" or a trap.
By mathematically weighing the Close Location Value (where the candle closes relative to its high/low), QuantFlow filters out "Gap-and-Fade" traps and exhaustion spikes that fool traditional indicators.
Comparisons: QuantFlow vs. The Rest
Calculation Logic : Standard RSI/MACD measures simple price change over time. QuantFlow measures Price Change 'times (x)' Conviction (Sustenance Weighting).
Visual Output : Standard tools show a single line (0-100), often hiding market conflict. QuantFlow displays Dual Lines (Bull vs Bear Intensity) to reveal the true state of the battle.
Trap Handling : Standard indicators are often fooled by sharp spikes. QuantFlow ignores "Gap-and-Fade" moves with poor closing conviction.
Adaptability : Standard tools use static levels (e.g., Overbought > 70). QuantFlow uses Dynamic Bands that adjust automatically to recent volatility.
█ Dynamic Volatility Filtering
Unlike standard indicators that use fixed levels (e.g., "Buy if RSI > 50"), QuantFlow acknowledges that "50" means something different in a quiet market versus a crashing market. This section explains the statistical engine driving the signals.
The Problem with Static Levels : In a low-volatility environment, a momentum score of 55 might indicate a massive breakout. In a high-volatility environment, a score of 55 might just be random noise. A fixed threshold cannot handle both scenarios.
The Solution: Adaptive Statistics : The script maintains a memory of the Momentum Events. It doesn't just look at price; it looks at where the momentum occurred in the past and draws a "Noise Zone" (Grey Band). This logic acts as a "Smart Gatekeeper" for trade entries:
Scenario A: Inside the Noise (The Filter)
If a new momentum signal happens inside the Noise Zone, the script assumes it is likely chop or noise.
Action : It forces a wait period. The signal is delayed until the trend sustains itself for Confirm Bars; else the signal is cancelled. This filters out ~70% of false signals in sideways markets.
Scenario B: Outside the Noise (The Breakout)
If a new momentum signal happens outside the Noise Zone (or the momentum score smashes through the Upper Band), it is statistically significant (an outlier event).
Action: It triggers an Immediate Entry. No waiting is required because the move is powerful enough to escape the historical noise zone.
█ The ⚠️ "Warning" System (Heads-up for Smart Reversals)
While you are directional if there is potential reversal signal, it provides the heads-up warning for a better decision-making
█ Special Utility: Ghost Mode
For intraday traders, the biggest disruption to "Flow" is the mandatory broker square-off at 3:15 PM (considering Indian Market). Often, a trend continues overnight, and the trader misses the gap-up opening the next morning because their algo was flat.
Ghost Mode is a unique feature that runs silently in the background:
At Square-off: The strategy closes your official position to satisfy the broker.
In the Background: It keeps the trade "alive" virtually (Ghost).
Next Morning: If the market opens in the trend's favor, the strategy re-enters the trade automatically. This approach ensures you capture the full swing of the trend, even if you are forced to exit at the previous session.
█ Advice on this indicator:
Parameter Calibration: The default settings are optimized for BankNifty on 5-minute charts. If you trade stocks, crypto, commodities, or any higher timeframes (e.g., 15-min or hourly), you must adjust these.
Low Volatility Assets: Reduce Stop Multiplier to 2.0.
High Volatility Assets: Increase Momentum Lookback to 50 to filter noise.
Confluence (Additional Confirmation): While QuantFlow is a complete system, using it alongside Key Support/Resistance Levels or Volume Profile provides the highest probability setups. Strategy

Volatility Regimes | GainzAlgo📊 OVERVIEW:
=========
This is a comprehensive ATR-based trading system designed for professional
traders who need advanced volatility analysis, precise trade management, and
intelligent market regime detection. The indicator combines multiple proven
volatility concepts into one powerful, customizable tool.
⭐ WHY THIS SYSTEM IS UNIQUE AND WORTHY OF PUBLICATION:
====================================================
This is not simply a collection of ATR-based indicators placed together.
It represents a unified volatility analysis framework where each component
is specifically designed to work in concert with the others, creating a
complete trading workflow that cannot be replicated by using multiple
separate indicators.
🔗 SYNERGISTIC INTEGRATION - How Components Work Together:
🧠 1. CONTEXT-AWARE ANALYSIS
The Volatility Regime Detection acts as the "brain" of the system,
classifying market conditions into 4 distinct phases. Every other
component then adapts its behavior based on this regime classification:
- ATR Bands expand/contract with regime changes
- Stop Loss distances automatically adjust (tighter in compression,
wider in high volatility)
- Take Profit targets scale proportionally to current regime
- Signal sensitivity filters itself based on market phase
📐 2. UNIFIED VOLATILITY FOUNDATION
All calculations share a single ATR baseline calculation, ensuring
internal consistency across the entire system. When ATR changes, every
element updates in perfect synchronization:
- Bands recalculate from the same ATR value
- Risk management levels use the same volatility measurement
- Regime classification and signals reference identical data
🛡️ 3. INTEGRATED RISK MANAGEMENT
The system doesn't just show WHERE to enter - it calculates HOW MUCH
to risk:
- Dynamic Stop Loss adapts to current ATR automatically
- Position Size Calculator uses the dynamic stop to compute exact quantities
- Take Profit levels scale proportionally, maintaining optimal risk:reward
✅ 4. TWO-STAGE SIGNAL CONFIRMATION
The alert system creates a logical progression:
Step 1: Volatility Breakout → Market energy is building
Step 2: Trend Confirmation → Direction confirmed with volatility support
This prevents false breakouts by requiring both volatility AND direction.
🏦 5. PROFESSIONAL WORKFLOW INTEGRATION
The system mirrors how institutional traders analyze markets:
Phase 1: Assess regime → What's the market doing?
Phase 2: Identify setup → Where's the opportunity?
Phase 3: Calculate risk → What's my exposure?
Phase 4: Set targets → Where do I take profit?
Phase 5: Monitor regime → When do conditions change?
❌ WHY NOT USE SEPARATE INDICATORS?
- Separate ATR Bands: Don't know about regime changes, remain static
- Separate Regime Indicator: Doesn't automatically adjust stop/targets
- Separate Position Calculator: Doesn't know your actual ATR-based stop
- Manual Integration: Requires constant mental calculation and cross-referencing
🧮 DETAILED CALCULATION METHODOLOGY:
=================================
📏 ATR (AVERAGE TRUE RANGE) CALCULATION:
- True Range = Maximum of:
1. Current High - Current Low
2. Absolute value of (Current High - Previous Close)
3. Absolute value of (Current Low - Previous Close)
- ATR = Simple Moving Average of True Range over specified period (default: 14)
📊 DYNAMIC ATR BANDS:
- Upper Band = Current Close + (ATR × Band Multiplier)
- Lower Band = Current Close - (ATR × Band Multiplier)
- Band 1: 1.0× ATR (closest support/resistance)
- Band 2: 2.0× ATR (intermediate zone)
- Band 3: 3.0× ATR (extended zone)
🌡️ VOLATILITY REGIME CLASSIFICATION:
Step 1: Calculate ATR Baseline
- Baseline ATR = SMA or EMA of ATR over long period (default: 50 bars)
- This represents "normal" volatility for the instrument
Step 2: Calculate ATR Ratio
- ATR Ratio = Current ATR ÷ Baseline ATR
- Example: If current ATR = 70 and baseline = 50, ratio = 1.40
Step 3: Classify Regime Based on Ratio
- COMPRESSION: Ratio < 0.70 (ATR is 30% below normal)
Market consolidating, volatility contracting, energy building
- EXPANSION: Ratio between 1.15 and 1.40 (ATR is 15-40% above normal)
Volatility breaking out, early phase of directional movement
- HIGH VOLATILITY: Ratio > 1.40 (ATR is 40%+ above normal)
Strong sustained trend with high participation
- EXHAUSTION: ATR declining after high volatility period
Requires: Previous high ratio + declining ATR over X bars (default: 5)
Trend maturity, potential reversal or consolidation approaching
🛑 DYNAMIC STOP LOSS CALCULATION:
- For Long Positions: Stop Loss = Entry Price - (ATR × SL Multiplier)
- For Short Positions: Stop Loss = Entry Price + (ATR × SL Multiplier)
- Default Multiplier: 2.0× ATR
- Adjusts automatically: Wider in high volatility, tighter in compression
🎯 TAKE PROFIT LEVELS:
- TP1 = Entry Price ± (ATR × TP1 Multiplier)
- TP2 = Entry Price ± (ATR × TP2 Multiplier)
- TP3 = Entry Price ± (ATR × TP3 Multiplier)
- Direction (+ or -) depends on trade direction
📦 POSITION SIZE CALCULATION:
Formula: Position Size = Account Risk Amount ÷ Stop Loss Distance
Step-by-step:
1. Risk Amount = Account Size × (Risk Percentage ÷ 100)
2. Stop Distance = |Entry Price - Stop Loss Price|
3. Position Size = Risk Amount ÷ Stop Distance
📈 ATR PERCENTILE RANKING:
- >80% = Extremely high volatility
- 20-80% = Normal volatility range
- <20% = Extremely low volatility
🌀 VOLATILITY CONTRACTION PATTERN:
Detects extended low-volatility periods indicating imminent breakout.
🧭 TREND DETECTION SIGNALS:
Bullish: Price > MA AND Current ATR > ATR MA
Bearish: Price < MA AND Current ATR > ATR MA
⚡ VOLATILITY BREAKOUT SIGNALS:
Triggered when ATR exceeds its moving average by a defined threshold.
🧩 CORE FEATURES:
==============
1. ATR BANDS (Dynamic Support/Resistance)
2. VOLATILITY REGIME DETECTION
3. DYNAMIC STOP LOSS SYSTEM
4. MULTIPLE TAKE PROFIT LEVELS
5. SUPPORT & RESISTANCE LEVELS
6. RISK MANAGEMENT CALCULATOR
7. ATR PERCENTILE RANKING
8. VOLATILITY CONTRACTION PATTERN
9. TREND DETECTION SIGNALS
10. VOLATILITY BREAKOUT SIGNALS
⚙️ RECOMMENDED SETTINGS BY TRADING STYLE:
======================================
DAY TRADING • SWING TRADING • POSITION TRADING • SCALPING
📘 HOW TO USE THIS INDICATOR:
==========================
STEP 1: Identify Market Regime
STEP 2: Wait for Entry Signal
STEP 3: Set Stop Loss
STEP 4: Set Take Profits
STEP 5: Position Sizing
STEP 6: Monitor & Manage
🔔 ALERT SYSTEM:
=============
Alerts for volatility breakouts, trend changes, regime transitions,
ATR band crossings, contraction completion, and percentile extremes.
🎨 CUSTOMIZATION:
==============
All visuals, thresholds, multipliers, colors, alerts, and risk parameters
can be fully customized.
⚠️ IMPORTANT DISCLAIMER:
=====================
This indicator is a volatility analysis tool and does NOT provide financial advice.
Past performance does not guarantee future results.
All trading involves substantial risk.
All trading decisions are the sole responsibility of the user. Indicator

QUANT TRADING ENGINE [PointAlgo]Quant Trading Engine is a quantitative market-analysis indicator that combines multiple statistical factors to study trend behavior, mean reversion, volatility, execution efficiency, and market stability.
The indicator converts raw price behavior into standardized signals to help evaluate directional bias and risk conditions in a systematic way.
This script focuses on factor alignment and regime awareness, not prediction certainty.
Design Philosophy
Markets move through different regimes such as trending, ranging, volatile expansion, and instability.
This indicator attempts to model these regimes by blending:
Momentum strength
Mean-reversion pressure
Volatility risk
Trend filtering
Execution context (VWAP)
Correlation structure
Each component is normalized and combined into a single Quant Alpha framework.
Factor Construction
1. Momentum Factor
Measures directional strength using percentage price change over a rolling window.
Standardized using mean and standard deviation.
Represents trend continuation pressure.
2. Mean Reversion Factor
Measures deviation from a longer moving average.
Standardized to identify stretched conditions.
Designed to capture counter-trend behavior.
Directional Clamping
Mean-reversion signals are dynamically restricted:
No counter-trend buying during downtrends.
No counter-trend selling during uptrends.
Allows both sides only in neutral regimes.
This prevents conflicting signals in strong trends.
3. Volatility Factor
Uses realized volatility derived from price changes.
Penalizes environments where volatility deviates significantly from its norm.
Acts as a risk adjustment rather than a directional driver.
4. Composite Quant Alpha
The final Quant Alpha is a weighted blend of:
Momentum
Mean reversion (trend-clamped)
Volatility risk
The composite is standardized into a Z-score, allowing consistent interpretation across instruments and timeframes.
Signal Logic
Buy signal occurs when Quant Alpha crosses above zero.
Sell signal occurs when Quant Alpha crosses below zero.
Zero-cross logic is used to represent shifts from negative to positive statistical bias and vice versa.
Signals reflect statistical regime change, not trade instructions.
Volatility Smile Context
Measures price deviation from its statistical distribution.
Identifies skewed conditions where upside or downside volatility becomes dominant.
Highlights extreme deviations that may imply elevated derivative risk.
Exotic Risk Conditions
Detects sudden price expansion combined with volatility spikes.
Highlights environments where execution and risk become unstable.
Visual background cues are used for awareness only.
Execution Context (VWAP)
Measures price distance from VWAP.
Used to assess execution efficiency rather than direction.
Helps identify stretched conditions relative to average traded price.
Correlation Structure
Evaluates short-term return correlations.
Detects when price behavior becomes less predictable.
Flags structural instability rather than trend direction.
Visualization
The indicator plots:
Quant Alpha (scaled) with directional coloring
Volatility smile deviation
Price vs VWAP distance
Correlation structure
Signal markers indicate Quant Alpha zero-cross events and risk conditions.
Dashboard
A compact dashboard summarizes:
Trend filter state
Quant Alpha polarity and value
Individual factor readings
Current action state (Buy / Sell / Wait / Risk)
The dashboard provides a real-time snapshot of internal model conditions.
Usage Notes
Designed for analytical interpretation and research.
Best used alongside price action and risk management tools.
Factor behavior depends on instrument liquidity and volatility.
Not optimized for illiquid or irregular markets.
Disclaimer
This script is provided for educational and analytical purposes only.
It does not provide financial, investment, or trading advice.
All outputs should be independently validated before making any trading decisions. Indicator

GARCH Volume Volatility [MarkitTick]Title: GARCH Volume Volatility
Description
Overview
The GARCH Volume Volatility (GV) indicator is a sophisticated quantitative tool designed to analyze the rate of change in market participation. While the vast majority of technical indicators focus on Price Volatility (how much price moves), this script focuses on Volume Volatility (how unstable the participation is).
Market volume is rarely distributed evenly; it tends to cluster. Periods of high activity are often followed by more high activity, and periods of calm tend to persist. This behavior is known as "heteroskedasticity." This script utilizes an Exponentially Weighted Moving Average (EWMA) model—a core component of Generalized Autoregressive Conditional Heteroskedasticity (GARCH) frameworks—to model these changing variance regimes.
By isolating volume volatility from raw volume data, this tool helps traders distinguish between sustainable liquidity flows and erratic, unsustainable volume shocks that often precede market reversals or breakouts.
Methodology and Calculations
1. Logarithmic vs. Percentage Returns
The foundation of this indicator is the calculation of "Volume Returns"—the period-over-period change in volume.
- The script defaults to Logarithmic Returns. In financial statistics, log returns are preferred because they normalize data that can vary wildly in magnitude (such as cryptocurrency volume spikes), providing a more symmetric view of changes.
- Users can opt for standard percentage changes if they prefer a linear approach.
2. Variance Proxy (Squared Returns)
To measure volatility, the direction of the volume change (up or down) matters less than the magnitude. The script squares the returns to create a "Variance Proxy." This ensures that a massive drop in volume is treated with the same statistical weight as a massive spike in volume—both represent a significant change in the volatility of participation.
3. GARCH-Style Smoothing (EWMA)
Standard Moving Averages (SMA) treat all data points in the lookback period equally. However, volatility is dynamic. This script uses an EWMA model with a tunable "Lambda" (Decay Factor).
- The Recursive Formula: The current calculation relies on a weighted average of the current variance and the previous period's smoothed variance.
- Memory Effect: This allows the indicator to "remember" recent volatility shocks while gradually letting their influence fade. This mimics the GARCH process of conditional variance.
4. Dynamic Statistical Thresholds
The final output is the Volatility (square root of variance). To make this data actionable, the script calculates a dynamic upper and lower limit based on the standard deviation (Z-Score) of the volatility itself over a user-defined lookback period.
How to Use
The indicator plots a histogram that categorizes the market into four distinct volatility regimes:
1. High Volatility (Red Histogram)
Trigger: Volatility > High Band (Upper Standard Deviation).
Interpretation: This signals an extreme anomaly in volume stability. This is not just "high volume," but "erratic volume behavior." This often occurs at:
- Capitulation bottoms (panic selling).
- Euphoric tops (blow-off tops).
- Major news events or earnings releases.
2. Elevated Volatility (Maroon Histogram)
Trigger: Volatility > Mean Average.
Interpretation: The market is in an active state. Participation is changing rapidly, but within statistically normal bounds. This is common during healthy, trending moves where new participants are entering the market steadily.
3. Normal/Low Volatility (Green Histogram)
Trigger: Volatility is within the lower bands.
Interpretation: The market volume is stable. There are no sudden shocks in participation. This is typical of consolidation phases or "creeping" trends where the price drifts without significant volume conviction.
4. Extremely Low Volatility (Bright Green/Transparent)
Trigger: Volatility < Low Band.
Interpretation: The "calm before the storm." When volume volatility collapses to near-zero, it implies that the market has reached a state of equilibrium or disinterest. Historically, volatility is cyclical; periods of extreme compression often lead to violent expansion.
Settings and Configuration
Core Settings
- Use EWMA: When checked (Default), uses the recursive GARCH-style calculation. If unchecked, it reverts to a simple SMA of variance, which is less sensitive to recent shocks but more stable.
- Log Returns: Uses natural log for calculations. Highly recommended for assets with exponential growth or large volume ranges.
- Length: The baseline period for the calculation.
- Threshold Lookback: The number of bars used to calculate the Mean and Standard Deviation bands.
- EWMA Lambda: The decay factor (0.0 to 1.0). A value of 0.94 is standard for risk metrics.
-- Higher Lambda (e.g., 0.98): The indicator reacts slower and is smoother (long memory).
-- Lower Lambda (e.g., 0.80): The indicator reacts very fast to new data (short memory).
Visuals
- Show Thresholds: Toggles the visibility of the statistical bands on the chart.
- High Band (StdDev): The multiplier for the upper warning zone. Default is 1.5 deviations. Increasing this to 2.0 or 3.0 will filter for only the most extreme events.
Disclaimer This tool is for educational and technical analysis purposes only. Breakouts can fail (fake-outs), and past geometric patterns do not guarantee future price action. Always manage risk and use this tool in conjunction with other forms of analysis. Indicator

Indicator

Indicator

TICK & ADD Market Internals SuiteOverview: This is the ultimate Market Internals tool designed for professional SPX/ES and NQ intraday traders.
Traders often monitor both TICK (for short-term timing) and ADD (for daily trend context). However, displaying them on the same chart is usually problematic due to their different scales (TICK ±1000 vs. ADD ±2000), causing chart compression.
Market Internals Suite solves this with a smart "Visual Scaling" algorithm, perfectly fusing TICK Candles and the ADD Line into a single, coherent pane.
Key Features
1.Hybrid Visualization:
· TICK (Foreground): Displayed as OHLC Candles to capture instant liquidity sweeps and wicks.
· ADD (Background): Displayed as a clean Line to show the underlying market breadth trend without clutter.
2.Smart Visual Scaling:
· To prevent chart distortion, the ADD line is visually scaled down (Default Ratio: 1.5).
· This aligns the ADD trend volatility with the TICK range, allowing you to instantly spot divergences or resonance between sentiment and trend.
3.Real-Time Data Dashboard:
· Never lose track of the actual numbers. A dashboard in the top-right corner displays the TRUE values for both TICK and ADD (unscaled).
· Customizable Text Size: You can adjust the dashboard font size (Small/Normal/Large/Huge) in the settings to fit your screen.
4.TICK Extreme Alerts:
· Visual Highlight: The chart background highlights (Green/Red) only when TICK hits the extreme ±1000 levels.
· The ADD line remains clean and alert-free to serve as a stable reference.
Strategy: Context + Timing:
1.Trend Resonance
When the ADD line trends upward and TICK candles consistently maintain levels above zero, it indicates a healthy, strong trend. This is a signal to look for trend-following long setups.
2.Divergence Analysis (The "Holy Grail" Signal)
This combination view makes spotting internal divergences incredibly easy:
· Bearish Divergence: When Price makes a New High, but the ADD line or TICK peaks make a Lower High. This suggests buying exhaustion beneath the surface and often precedes a reversal down.
· Bullish Divergence: When Price makes a New Low, but the ADD line or TICK lows make a Higher Low. This suggests that selling pressure is being absorbed, signaling a potential bounce or reversal up. Indicator

Indicator
