Trend Resonance Oscillator [JOAT]Trend Resonance Oscillator
Introduction
The Trend Resonance Oscillator is an open-source non-overlay indicator that measures multi-timeframe trend alignment and produces a composite resonance score. It fetches trend data from up to five configurable timeframes, calculates whether they agree on direction, and outputs an oscillator that reflects the degree of alignment. When most or all timeframes point the same way, the oscillator reaches extreme values and the indicator declares a state of "resonance" — a condition where directional conviction is high across the time spectrum. It also includes quantum-inspired coherence scoring, harmonic pattern detection, and momentum alignment visualization.
Built with Pine Script v6, the indicator uses custom types for trend state, resonance state, timeframe data, quantum state, and harmonic patterns.
Why This Indicator Exists
A trade taken in the direction of the 5-minute trend may fail if the 1-hour and daily trends disagree. Multi-timeframe alignment is one of the most reliable filters for trade quality, but checking multiple timeframes manually is tedious and subjective. This indicator automates that process by:
Simultaneous MTF analysis: Fetches close, EMA, and rate-of-change data from five configurable timeframes in a single indicator
Alignment scoring: Quantifies how many timeframes agree on direction and how strong each trend is, producing a single composite score
Resonance detection: Identifies periods when alignment exceeds a configurable threshold, signaling high-conviction directional conditions
Confluence signals: Generates labeled signals when a minimum number of timeframes align, providing clear entry confirmation
Coherence and entanglement metrics: Measures the consistency and correlation between timeframe trends, adding depth beyond simple directional agreement
Core Components Explained
1. Multi-Timeframe Trend Detection
For each of the five timeframes (default: 5m, 15m, 1H, 4H, Daily), the indicator fetches close price, EMA, and rate-of-change using `request.security()` with proper lookahead settings to avoid repainting:
float _tf1Close = request.security(syminfo.tickerid, tf1, close, barmerge.gaps_off, barmerge.lookahead_off)
float _tf1EMA = request.security(syminfo.tickerid, tf1, _globalEMA, barmerge.gaps_off, barmerge.lookahead_off)
Each timeframe's trend is classified as bullish, bearish, or flat based on the percentage difference between close and EMA relative to a configurable threshold (default 0.5%). The trend strength is calculated as the magnitude of that percentage difference, capped at 100.
2. Alignment Score Calculation
The alignment score counts how many timeframes are bullish versus bearish, then produces a normalized score from -100 (all bearish) to +100 (all bullish):
+100: All active timeframes are bullish — maximum bullish alignment
+60: Majority bullish with some neutral — strong bullish bias
0: Equal bullish and bearish — no directional consensus
-60: Majority bearish — strong bearish bias
-100: All bearish — maximum bearish alignment
The alignment score is weighted by the average trend strength across all active timeframes, so a +80 alignment with strong individual trends produces a higher oscillator value than +80 alignment with weak trends.
3. Resonance Detection
Resonance occurs when the ratio of aligned timeframes to total active timeframes exceeds the resonance threshold (default 0.7) and the aligned count meets the minimum confluence requirement (default 4 timeframes). During resonance, the background is tinted to indicate the directional bias, and a duration counter tracks how long the resonance state has persisted.
Sustained resonance (high duration) suggests a strong, established trend. New resonance (low duration) may signal the beginning of a directional move. The dashboard displays the resonance score, aligned count, and duration for quick assessment.
The Trend Resonance Oscillator panel showing the main oscillator line with gradient coloring, MTF trend bars at the bottom showing individual timeframe directions, resonance background shading during a strong bullish alignment, and confluence/resonance signal labels
4. Quantum Coherence and Entanglement
The indicator calculates two additional metrics inspired by quantum physics concepts (used as analytical metaphors, not literal physics):
Coherence: The ratio of aligned timeframes to total timeframes. A coherence of 1.0 means perfect agreement. When coherence exceeds the threshold (default 0.8), the indicator enters a "coherent" state, which is visualized as a subtle wave pattern on the oscillator.
Entanglement: Measures the pairwise correlation between all timeframe trends. For each pair of timeframes, if they agree on direction, the entanglement score increases; if they disagree, it decreases. High entanglement means timeframes are moving in lockstep.
for i = 0 to 3
for j = i + 1 to 4
if trend_i != 0 and trend_j != 0
correlation = trend_i == trend_j ? 1.0 : -1.0
entanglement += correlation
pairs += 1
When the quantum superposition score (combination of coherence and entanglement) exceeds a threshold, a "quantum collapse" signal fires, indicating that all timeframes have converged to a single directional state.
5. Harmonic Pattern Detection
The harmonic module detects cyclical patterns in the resonance data. When resonance is sustained for more than 10 bars, the pattern is classified as a sine wave (smooth, established trend). When resonance is new or intermittent, it is classified as a square wave (choppy, emerging trend). The harmonic wave is plotted as a subtle overlay on the oscillator.
6. Confluence and Signal System
The indicator generates three tiers of signals, with higher tiers taking priority:
CONF (Confluence): Minimum timeframes aligned with alignment score >= 70
RES (Resonance): Strong resonance with score >= 80
QTM (Quantum): Quantum collapse — all metrics converge to a single state
Each signal fires only on its first bar (not continuously), preventing chart clutter. Signals are color-coded with gradient intensity based on the underlying strength.
Visual Elements
Main Oscillator: Smoothed alignment score plotted as a line with gradient coloring from bearish to bullish
Reference Levels: Lines at 0 (neutral), +/-50 (moderate), +/-80 (strong)
MTF Trend Bars: Five colored column bars at the bottom of the panel, each representing one timeframe's trend direction and strength
Resonance Background: Tinted background during resonance states
Quantum Superposition Line: Step-line showing the quantum composite score
Coherence Wave: Subtle area plot showing coherence oscillation
Harmonic Pattern: Sine/square wave overlay during active resonance
Momentum Alignment: Area histogram showing aggregate momentum across timeframes
Convergence/Divergence: Histogram showing agreement between momentum and oscillator
Signal Labels: CONF, RES, and QTM labels at signal points
Entanglement Lines: Visual connections when timeframe entanglement is high
Dashboard: Comprehensive table showing each timeframe's trend, strength, and the aggregate resonance metrics
Input Parameters
Multi-Timeframe Settings:
Toggle and configure each of 5 timeframes (default: 5m, 15m, 1H, 4H, Daily)
Trend Detection:
Trend EMA Length (default 20), Momentum Length (default 14), Trend Threshold (default 0.5%)
Resonance Settings:
Resonance Lookback (default 20), Resonance Threshold (default 0.7)
Show Resonance Zones toggle
Alignment Scoring:
Min TFs for Confluence (default 4)
Show Alignment Score and Confluence Signals
Advanced Resonance:
Quantum Resonance, Coherence Waves, Entanglement Lines, Harmonic Patterns toggles
Coherence Threshold (default 0.8), Harmonic Period (default 8)
Visual Settings:
Show Oscillator, MTF Bars, Dashboard, Glow Effects, Waveform
Color Scheme: Quantum, Classic, Professional, Neon
How to Use This Indicator
Step 1: Check the MTF trend bars at the bottom of the panel. If all five bars are the same color (all bullish or all bearish), you have strong multi-timeframe alignment.
Step 2: Read the oscillator value. Values above +50 indicate moderate bullish alignment; above +80 indicates strong alignment. The inverse applies for bearish readings.
Step 3: Watch for resonance background shading. When the background turns bullish or bearish, the indicator has detected sustained multi-timeframe agreement — this is the highest-conviction environment for directional trades.
Step 4: Use CONF, RES, and QTM signals as entry confirmations. A CONF signal in the direction of the oscillator provides moderate confirmation. A RES or QTM signal provides strong confirmation.
Step 5: Monitor the momentum alignment area. When momentum and the oscillator agree, the move has both directional alignment and momentum behind it. When they diverge, the move may be losing steam.
Dashboard showing all five timeframes with their individual trend states, the aggregate resonance score, coherence level, entanglement reading, and harmonic pattern status
Indicator Limitations
Multi-timeframe data requires sufficient history on all selected timeframes. On newly listed instruments, higher timeframe data may be limited.
The indicator uses `request.security()` with `barmerge.lookahead_off` to prevent repainting, but the inherent delay of higher timeframe data means signals reflect confirmed (not real-time) higher timeframe states.
Alignment does not guarantee profitable trades. All timeframes can align in one direction and then reverse simultaneously.
The quantum and harmonic features are analytical metaphors that provide useful metrics, not literal physics simulations.
On very low timeframes (1m or less), higher timeframe data updates infrequently, which can make the oscillator appear static for extended periods.
The indicator makes multiple `request.security()` calls, which counts against PulseWire's security call limit.
Originality Statement
This indicator is original in its comprehensive multi-timeframe resonance framework. While MTF trend indicators exist, this indicator is justified because:
It produces a quantified resonance score that measures not just direction but the degree and duration of multi-timeframe agreement
The coherence and entanglement metrics add pairwise correlation analysis between timeframes, going beyond simple directional counting
The three-tier signal system (CONF/RES/QTM) provides graduated confidence levels based on the strength of alignment
Harmonic pattern detection on the resonance data identifies whether alignment is sustained (sine) or emerging (square)
The momentum alignment overlay shows whether aggregate momentum across timeframes supports the directional reading
The weighted oscillator combines alignment direction with individual trend strength for a more nuanced composite score
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. Trading involves substantial risk of loss. Multi-timeframe alignment is a powerful filter but does not guarantee profitable trades. Always use proper risk management. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Volume Dispersion Field [JOAT]Volume Dispersion Field
Introduction
The Volume Dispersion Field is an open-source non-overlay indicator that provides a comprehensive volume analysis suite combining relative volume classification, buy/sell delta tracking, volume dispersion measurement, climax detection, volume profile calculation, smart money activity analysis, and anomaly detection. Rather than showing a simple volume histogram, this indicator dissects volume into multiple analytical layers that reveal who is participating, how aggressively, and whether the activity is normal or anomalous.
Built with Pine Script v6, the indicator uses custom types for volume state, delta state, dispersion bins, profile data, smart money state, and volume pulse tracking.
Why This Indicator Exists
Standard volume indicators show a single bar per candle. This tells you how much volume occurred but not who was buying or selling, whether the volume is unusual, or how volume is distributed across the price range. This indicator addresses those gaps by providing:
Seven-tier volume classification: Categorizes each bar from Extreme Low to Extreme High relative to the moving average, giving immediate context about whether current activity is normal or exceptional
Delta analysis: Estimates buying and selling volume using candle structure, then calculates smoothed delta and cumulative delta to show the net direction of volume pressure
Volume dispersion: Measures how volume is distributed between the upper and lower halves of the recent price range, revealing whether volume is concentrated at highs (distribution) or lows (accumulation)
Climax detection: Identifies volume spikes that exceed a configurable threshold, often marking exhaustion points or the start of major moves
Smart money analysis: Tracks institutional-sized volume activity and classifies the market phase as Accumulation, Markup, Distribution, or Markdown
Anomaly detection: Uses Z-score analysis to flag statistically unusual volume events that may indicate institutional intervention
Core Components Explained
1. Volume Classification System
Every bar is classified into one of seven categories based on its ratio to the volume moving average:
volMA = ta.sma(volume, volMaLength)
volRatio = volume / volMA
Extreme High (>= 3.0x): Institutional-level activity, potential climax
High (>= 2.0x): Significant above-average interest
Above Average (>= 1.0x): Healthy participation
Average (>= 0.5x): Normal market conditions
Below Average (>= 0.25x): Reduced interest
Low (< 0.25x): Thin liquidity, potential for slippage
Extreme Low: Minimal activity
Each category is color-coded with a distinct color from the Quantum Volume palette, making it instantly visible which bars carry institutional weight and which are retail noise. The high and low volume multiplier thresholds are fully configurable.
2. Delta Analysis
The delta engine estimates buying and selling volume by analyzing candle structure. For a bullish candle (close > open), buying volume is estimated as the proportion of the candle range from low to close, multiplied by total volume:
if close > open
buyVol := volume * (close - low) / (high - low + 0.0001)
sellVol := volume - buyVol
else if close < open
sellVol := volume * (high - close) / (high - low + 0.0001)
buyVol := volume - sellVol
The raw delta (buyVol - sellVol) is smoothed with an EMA and also accumulated over a configurable period to produce cumulative delta. Rising cumulative delta with rising price confirms bullish conviction. Falling cumulative delta with rising price warns of hidden distribution.
The indicator also detects delta divergences — when price moves in one direction but delta moves in the opposite direction over a 10-bar window. These divergences are marked with cross symbols on the chart.
The Volume Dispersion Field panel showing color-coded volume bars, delta histogram, cumulative delta line, and smart money accumulation/distribution arrows with the dashboard displaying all metrics
3. Volume Dispersion Measurement
Dispersion quantifies how volume is distributed between the upper and lower halves of the recent price range. Over the dispersion lookback period (default 50 bars), the indicator sums volume for bars that closed in the upper half versus the lower half:
Positive dispersion (> 20): Volume is concentrated in the upper range — bullish bias, potential distribution if extended
Negative dispersion (< -20): Volume is concentrated in the lower range — bearish bias, potential accumulation if extended
Near zero: Volume is balanced across the range — no clear directional bias
Dispersion is plotted as a filled area chart, providing a visual representation of where the volume weight sits within the price range.
4. Volume Profile and POC
The indicator calculates a simplified volume profile by dividing the recent price range into configurable bins (default 10) and summing volume in each bin. From this profile, it derives:
Point of Control (POC): The price level with the highest volume — acts as a magnet for price
Value Area High (VAH): Upper boundary of the 70% volume concentration zone
Value Area Low (VAL): Lower boundary of the 70% volume concentration zone
The profile type is classified as Normal (balanced), Imbalanced (narrow value area, directional), or Ranged (wide value area, consolidation).
5. Smart Money and Anomaly Detection
The smart money engine analyzes volume distribution across the price range over a 50-bar window. If significantly more volume occurs in the lower 30% of the range while price is below its 50-period SMA, the indicator classifies the phase as Accumulation. If more volume occurs in the upper 30% while price is above the SMA, it classifies as Distribution.
Anomaly detection uses Z-score analysis:
volState.zScore := (volume - volMA) / (volStdDev + 0.0001)
volState.isAnomaly := math.abs(volState.zScore) > anomalyThreshold
Volume events with Z-scores exceeding the threshold (default 3.0 standard deviations) are flagged as anomalies and marked with diamond symbols. These statistically rare events often indicate institutional intervention or major news-driven activity.
6. Market Phase Classification
The indicator classifies the current market phase based on the combination of price direction and volume trend:
Markup: Price rising + volume rising — healthy uptrend
Distribution: Price rising + volume falling — potential top forming
Accumulation: Price falling + volume rising — smart money buying the dip
Markdown: Price falling + volume falling — healthy downtrend
Visual Elements
Volume Histogram: Color-coded bars by classification tier
Volume MA Line: 20-period moving average of volume
High/Low Volume Bands: Reference bands at the high and low multiplier levels with fill
Delta Histogram: Smoothed buy/sell delta with gradient coloring
Cumulative Delta Line: Running sum of delta over configurable period
Dispersion Area: Filled area showing volume distribution bias
Climax Markers: Triangle markers for buy and sell climax events
Anomaly Markers: Diamond markers for statistically unusual volume
Smart Money Arrows: Accumulation (up arrow) and Distribution (down arrow) signals
Volume Pulse: Circle markers when volume exceeds the pulse threshold
Heatmap Background: Subtle background coloring based on volume intensity
Dashboard: 14-row metrics table showing volume category, anomaly status, phase, delta direction, dispersion, and more
Close-up of the dashboard showing volume classification as "HIGH", phase as "Markup", delta as "BULLISH" with "BUY SIDE" flow, and an anomaly detection reading
Input Parameters
Volume Analysis:
Volume MA Length (default 20)
High Volume Multiplier (default 2.0) and Low Volume Multiplier (default 0.5)
Delta Analysis:
Delta Smoothing (default 3)
Cumulative Delta Length (default 20)
Dispersion Settings:
Dispersion Lookback (default 50) and Dispersion Bins (default 10)
Climax Detection:
Climax Threshold (default 2.5) and Climax Lookback (default 50)
Advanced Volume:
Smart Money Concepts, Institutional Activity, Volume Anomalies toggles
Anomaly Threshold (default 3.0 std dev)
Volume Pulse toggle and Pulse Threshold (default 1.5)
Visual Settings:
Volume Profile, Dashboard, Glow Effects, Heatmap toggles
Profile Width and Color Scheme (Quantum, Classic, Professional, Neon)
How to Use This Indicator
Step 1: Monitor the volume classification. Extreme High and High bars deserve attention — they indicate institutional participation. Consecutive high-volume bars in one direction confirm conviction.
Step 2: Check the delta direction. Bullish delta with rising price confirms the move. Bearish delta with rising price (divergence) warns of potential reversal.
Step 3: Watch for climax events. A buy climax (extreme volume + bullish candle) at a resistance level may signal exhaustion. A sell climax at support may signal capitulation.
Step 4: Monitor the market phase. Accumulation phases often precede significant upward moves. Distribution phases often precede declines.
Step 5: Pay attention to anomaly markers. These statistically rare volume events often mark turning points or the start of major institutional campaigns.
Step 6: Use dispersion to understand volume positioning. Positive dispersion (volume at highs) during an uptrend is healthy. Positive dispersion during a downtrend suggests distribution.
Indicator Limitations
Delta estimation uses candle structure as a proxy for actual order flow. It is an approximation, not true Level 2 data.
Volume analysis works best on instruments with reliable, consistent volume data. Forex spot volume from brokers is tick volume, not true exchange volume.
Anomaly detection assumes volume follows a roughly normal distribution. During earnings seasons or major events, multiple "anomalies" may fire in succession.
The volume profile is a simplified calculation using close prices, not a tick-by-tick profile. It provides a useful approximation but not exchange-grade precision.
Smart money phase classification is based on volume distribution patterns, not on actual institutional order data.
Climax detection identifies extreme volume events but does not predict the direction of the subsequent move.
Originality Statement
This indicator is original in its comprehensive, multi-layer approach to volume analysis. While individual volume tools exist, this indicator is justified because:
It combines seven distinct volume analysis methodologies (classification, delta, dispersion, profile, climax, smart money, anomaly) into a unified system
Z-score-based anomaly detection provides a statistical framework for identifying unusual volume that simple threshold methods miss
Market phase classification (Accumulation/Markup/Distribution/Markdown) adds a Wyckoff-inspired context layer to raw volume data
Volume dispersion measurement quantifies the spatial distribution of volume across the price range, a metric not available in standard volume indicators
The delta divergence detection system identifies hidden disagreements between price and volume pressure
The comprehensive dashboard presents 14 metrics simultaneously for holistic volume analysis
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. Trading involves substantial risk of loss. Volume analysis is a tool for understanding market participation, not a crystal ball for predicting future price movement. Always use proper risk management. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Session Confluence Tracker [JOAT]Session Confluence Tracker
Introduction
The Session Confluence Tracker is an open-source overlay indicator that monitors the Asian, London, and New York trading sessions simultaneously, tracking each session's high and low, counting consecutive bullish or bearish sessions (streaks), detecting overstretch conditions, and identifying confluence zones where multiple sessions share overlapping price levels. It gives traders a structured view of how liquidity develops across the global trading day and where institutional interest is concentrating.
Built with Pine Script v6, the indicator uses custom types for session data, streak tracking, confluence zones, session momentum, session gaps, and session pivots.
Why This Indicator Exists
Session-based analysis is a cornerstone of institutional trading. Different sessions have distinct characteristics — the Asian session often establishes a range, London tends to break that range, and New York frequently continues or reverses the London move. However, most session indicators simply draw boxes around session times. This indicator goes further by:
Streak analysis: Counts how many consecutive sessions have been bullish or bearish, revealing directional persistence that simple session boxes cannot show
Overstretch detection: Compares the current session's range to its historical average. When a session extends significantly beyond its norm (configurable ratio, default 1.5x), it flags a potential exhaustion point
Confluence detection: Identifies price levels where two or more sessions share overlapping highs or lows within a configurable tolerance, highlighting zones of multi-session institutional agreement
Session momentum: Tracks the directional strength within each session, not just whether it closed up or down
Gap detection: Monitors gaps between session closes and opens, which often act as magnets for price
Core Components Explained
1. Multi-Session Tracking
The indicator tracks three configurable sessions with default times aligned to major global markets:
Asian Session: Default 1800-0300 (EST) — typically the lowest volatility, range-setting session
London Session: Default 0300-1130 (EST) — the highest volume session, often sets the daily direction
New York Session: Default 0800-1600 (EST) — overlaps with London for the most liquid period of the day
Each session is tracked independently with its own high, low, open, close, and volume data. Session boundaries are drawn as colored boxes on the chart, and session highs/lows extend as horizontal lines until the next session begins.
2. Streak Analysis
The streak engine counts consecutive bullish (close > open) or bearish (close < open) sessions for each market. This reveals directional persistence that is invisible on a standard chart:
if sessionClose > sessionOpen
streakData.bullCount += 1
streakData.bearCount := 0
else
streakData.bearCount += 1
streakData.bullCount := 0
When a streak reaches the minimum threshold (default 3 consecutive sessions), it is highlighted on the chart. Long streaks in a single direction often precede reversals, while the start of a new streak can confirm a trend change.
3. Overstretch Detection
Overstretch occurs when a session's range significantly exceeds its historical average. The indicator calculates the average session range over a lookback period and compares the current session's range against it:
Overstretch ratio >= 1.5x: The session has extended well beyond its norm — potential exhaustion
Overstretch ratio >= 2.0x: Extreme extension — high probability of mean reversion
Overstretch signals are plotted as markers above or below the session, giving traders a visual warning that the session may be running out of steam.
Chart showing three session boxes (Asian in purple, London in blue, New York in green) with streak counts displayed, overstretch markers on an extended London session, and confluence zones where session levels overlap
4. Confluence Zone Detection
When the high or low of one session falls within a configurable ATR-based tolerance of another session's high or low, the indicator identifies a confluence zone. These zones represent price levels where multiple sessions have found significant support or resistance:
tolerance = atrVal * confluenceTolerance
if math.abs(session1High - session2High) < tolerance
confluenceStrength += 1
Confluence zones are drawn as highlighted horizontal bands on the chart. The strength of the confluence (how many sessions agree) determines the visual intensity. A zone where all three sessions share a similar level is considered the strongest form of multi-session agreement.
5. Session Momentum and Gaps
Session momentum measures the directional conviction within each session using the relationship between the close and the session's range. A session that closes near its high has strong bullish momentum; one that closes near its low has strong bearish momentum.
Session gaps — the difference between one session's close and the next session's open — are tracked and visualized. These gaps often act as magnets, with price tending to fill them during the subsequent session.
Visual Elements
Session Boxes: Colored boxes marking each session's time range and price range
Session High/Low Lines: Horizontal lines extending from each session's extremes
Streak Labels: Counts displayed at session boundaries showing consecutive bullish/bearish sessions
Overstretch Markers: Warning signals when a session extends beyond its historical norm
Confluence Zones: Highlighted bands where multiple sessions share price levels
Session Gaps: Visual markers showing gaps between session close and next session open
Background Coloring: Subtle session-based background tinting
Dashboard: Real-time display of each session's status, streak counts, overstretch ratios, and confluence strength
Input Parameters
Session Settings:
Toggle each session (Asian, London, New York) independently
Custom session times for each market
Custom colors for each session
Streak Detection:
Min Streak Count (default 3): Minimum consecutive sessions to highlight
Overstretch Ratio (default 1.5): Threshold for overstretch detection
Confluence Detection:
Confluence Tolerance (ATR-based, default 0.5): How close session levels must be to count as confluent
Min Confluence Strength (default 2): Minimum number of agreeing sessions
Advanced Features:
Show Session Momentum, Volume Profile, Gaps, Pivots
Visual Settings:
Max Days Back (default 5): Limit historical session display for performance
Show Session Boxes, Dashboard, Glow Effects, Pulse Effects, Gradient Fill, Confluence Animation
Timezone selection
How to Use This Indicator
Step 1: At the start of your trading day, review the Asian session range. This range often defines the battlefield for London and New York. Note the Asian high and low as key levels.
Step 2: As London opens, watch for a break of the Asian range. A decisive break with volume often sets the daily direction. Check the streak count — if London has been bullish for 4+ consecutive sessions, be cautious of a reversal.
Step 3: Monitor overstretch conditions. If London extends 1.5x or more beyond its average range, the move may be exhausted. This is especially relevant if the overstretch occurs at a confluence zone.
Step 4: Look for confluence zones. A price level where the Asian high aligns with a previous London low is a zone of multi-session institutional interest. These levels often produce strong reactions.
Step 5: During New York, check for session gaps from the London close. Price frequently fills these gaps early in the New York session.
Step 6: Use the dashboard for a quick overview of all sessions, streaks, and confluence strength.
Dashboard view showing Asian, London, and New York session statistics including streak counts, overstretch ratios, momentum readings, and confluence strength score
Indicator Limitations
Session times are based on exchange time or a configurable timezone. Ensure your timezone setting matches your intended market hours.
Streak analysis requires sufficient historical data. On newly listed instruments or very high timeframes, streak counts may be limited.
Overstretch detection uses historical averages, which can be skewed by outlier sessions (e.g., major news events).
Confluence zones are based on proximity of session levels, not on the reason those levels formed. Not all confluences will produce reactions.
The indicator is most useful on intraday timeframes (1m to 1H) where session boundaries are meaningful. On daily or weekly charts, session tracking is less relevant.
Session overlap periods (London/New York) can produce complex price action that is harder to attribute to a single session.
Originality Statement
This indicator is original in its multi-session analytical framework. While session boxes and session high/low indicators exist, this indicator is justified because:
Streak analysis across multiple sessions provides a directional persistence metric not available in standard session tools
Overstretch detection compares current session range to historical norms, adding a statistical dimension to session analysis
Multi-session confluence detection identifies price levels where institutional interest from different global markets converges
Session momentum tracking quantifies the directional conviction within each session, going beyond simple bullish/bearish classification
Gap tracking between sessions highlights potential price magnets that standard session indicators ignore
The unified dashboard presents all three sessions' metrics simultaneously for rapid cross-session analysis
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. Trading involves substantial risk of loss. Session analysis is a framework for understanding market structure across time zones, not a guarantee of future price movement. Always use proper risk management. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Harmonic Resonance Field [JOAT]Harmonic Resonance Field
Introduction
The Harmonic Resonance Field is an open-source overlay indicator that combines dynamic range detection, Renko-style trend tracking, harmonic frequency analysis, and magnetic field visualization into a unified system for identifying consolidation zones, trend direction, and potential reversal points. It is designed for traders who want to understand where price is within its current range, how strong the prevailing trend is, and when conditions are ripe for a breakout or mean reversion.
Built with Pine Script v6, the indicator uses custom user-defined types for Renko state management, range detection, reversal signals, harmonic bands, magnetic fields, and resonance points.
Why This Indicator Exists
Range-bound markets account for a significant portion of trading time, yet most indicators are optimized for trending conditions. This indicator fills that gap by providing:
ADX-based range detection: Automatically identifies when the market is ranging versus trending using ADX with a configurable threshold, so traders know which strategy framework to apply
Multi-style band calculation: Offers four band calculation methods (ATR, Percentage, Standard Deviation, Harmonic) so traders can choose the volatility measure that best fits their instrument
Renko trend overlay: A smoothed Renko-style trend line that filters noise and shows the dominant direction without requiring a separate Renko chart
Harmonic frequency analysis: Uses sine-wave modulation to create bands that expand and contract with market rhythm, capturing cyclical behavior that static bands miss
Magnetic field visualization: Plots dynamic attraction/repulsion levels around the mean, helping traders visualize where price is likely to gravitate
Core Components Explained
1. Range Detection Engine
The indicator uses ADX to classify market conditions. When ADX falls below the configurable threshold (default 25), the market is classified as ranging, and the indicator highlights the range boundaries. When ADX rises above the threshold, the market is trending, and the indicator shifts focus to the Renko trend line and harmonic bands.
adxSmoothed = ta.rma(dx, adxLength)
isRanging = adxSmoothed < adxThreshold
During ranging conditions, the indicator calculates the highest high and lowest low over the range lookback period and draws a dynamic range box with upper, lower, and midline levels. This gives traders clear boundaries for mean reversion strategies.
2. Harmonic Band System
The band system supports four calculation styles:
ATR: Bands based on Average True Range multiplied by a configurable factor
Percentage: Bands at a fixed percentage distance from the mean
Standard Deviation: Bollinger-style bands using standard deviation
Harmonic: Bands modulated by a sine wave that creates rhythmic expansion and contraction
The harmonic mode is unique to this indicator. It calculates a phase and amplitude based on bar position and ATR, then modulates the band width with a sine function:
harmonicPhase = math.sin(bar_index * 2 * math.pi / bandLength) * 0.5 + 0.5
harmonicAmplitude = atrVal * bandMultiplier
bandWidth = harmonicAmplitude * (0.5 + harmonicPhase * 0.5)
This creates bands that breathe with the market's natural rhythm rather than remaining static or purely reactive.
Chart showing the Harmonic Resonance Field with harmonic bands expanding and contracting around price, Renko trend line, and range detection box during a consolidation period
3. Renko Trend Engine
Rather than requiring traders to switch to a Renko chart, this indicator calculates a Renko-style trend directly on the standard candlestick chart. The brick size can be set using ATR, a fixed percentage, or a static value. The Renko state is managed as a custom type that tracks the current level, direction, and brick boundaries.
When price moves by one brick size in the trend direction, the Renko level advances. When price reverses by the configurable reversal multiplier (default 2 bricks), the trend flips. The result is a stepped trend line overlaid on the chart that filters minor fluctuations and shows only significant directional changes.
4. Magnetic Field Visualization
The magnetic field creates a set of attraction levels around the mean price. These levels represent zones where price tends to gravitate based on the configurable field strength parameter. The field is calculated using the distance from the mean and the current ATR:
Strong attraction zone: Within 0.5x ATR of the mean — price tends to consolidate here
Moderate zone: 0.5x to 1.0x ATR from the mean — normal trading range
Weak zone: Beyond 1.0x ATR — price is extended and may revert
The magnetic field lines are drawn with gradient transparency, becoming more transparent as they move away from the mean, visually communicating the decreasing "pull" of the mean at greater distances.
5. Reversal and Resonance Detection
The indicator generates two types of signals:
Reversal signals: Triggered when price reaches the outer bands with momentum showing signs of exhaustion (RSI-based or rate-of-change based). These are plotted as directional markers on the chart.
Resonance signals: Triggered when multiple conditions align — price at a band extreme, ranging market detected, and volume above average. Resonance points represent higher-conviction mean reversion opportunities.
Visual Elements
Harmonic Bands: Upper and lower bands with gradient fill between them
Renko Trend Line: Stepped line showing the dominant trend direction
Range Box: Dynamic box highlighting the current consolidation range
Magnetic Field Lines: Gradient-colored attraction levels around the mean
Reversal Markers: Directional signals at potential turning points
Resonance Points: High-confluence mean reversion signals
Candle Coloring: Optional trend-based candle coloring
Dashboard: Displays trend direction, range status, band width, Renko state, and resonance count
Input Parameters
Range Detection:
Range Lookback (default 50)
ADX Length (default 14) and ADX Threshold (default 25)
Band Settings:
Band Style: ATR, Percentage, Standard Dev, or Harmonic
Band Length (default 20) and Band Multiplier (default 2.0)
Renko Settings:
Brick Size Style: ATR, Percentage, or Static
Brick Size (default 1.0) and Reversal Multiplier (default 2)
Magnetic Field:
Field Strength (0.1-2.0, default 1.0)
Visual Settings:
Show Candle Coloring, Gradient Fill, Dashboard, Glow Effects, Pulse Effects
How to Use This Indicator
Step 1: Check the dashboard for the current market regime. If the market is ranging, focus on the range box boundaries and magnetic field levels for mean reversion setups.
Step 2: In trending conditions, follow the Renko trend line. Stay with the trend as long as the Renko direction holds. A Renko reversal (direction flip) is a significant event that suggests the trend may be changing.
Step 3: Watch for price reaching the outer harmonic bands. In ranging markets, these represent potential reversal zones. In trending markets, they may indicate overextension.
Step 4: Look for resonance signals. These combine multiple conditions (band extreme + ranging + volume) and represent the highest-conviction mean reversion setups.
Step 5: Use the magnetic field levels as dynamic support and resistance. Price tends to gravitate toward the strong attraction zone near the mean.
Close-up showing reversal markers at band extremes with resonance signals highlighted during a ranging market, with the magnetic field gradient visible around the mean
Indicator Limitations
ADX-based range detection has an inherent lag. The transition from trending to ranging (and vice versa) is identified after it has already begun.
Harmonic bands use a fixed-frequency sine wave. Real market cycles are not perfectly periodic, so the harmonic modulation is an approximation.
Renko trend calculations on a candlestick chart are a simulation. They will not match a true Renko chart exactly due to differences in bar construction.
Reversal signals at band extremes do not guarantee reversals. In strong trends, price can ride the outer band for extended periods.
The magnetic field visualization is a conceptual tool for understanding mean reversion tendency, not a precise prediction of where price will go.
Performance may be affected on very low timeframes with many visual elements enabled. Consider reducing visual effects on sub-minute charts.
Originality Statement
This indicator is original in its synthesis of range detection, harmonic frequency analysis, and magnetic field visualization. While individual components (ADX range detection, Renko trends, Bollinger-style bands) are established concepts, this indicator is justified because:
The harmonic band mode introduces sine-wave modulation to create bands that rhythmically expand and contract, a method not found in standard band indicators
The magnetic field visualization provides a novel way to represent mean reversion tendency using gradient-based attraction zones
Combining Renko trend tracking with ADX range detection on a standard chart gives traders both trend-following and mean-reversion frameworks simultaneously
Resonance detection creates a multi-factor confluence signal by combining band position, range status, and volume conditions
The four-style band system (ATR, Percentage, StdDev, Harmonic) allows traders to adapt the indicator to different instruments and market 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. Trading involves substantial risk of loss. Range detection and band analysis are tools for understanding market structure, not guarantees of future price movement. Always use proper risk management. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Quantum Momentum Analyzer [JOAT]Quantum Momentum Analyzer
Introduction
The Quantum Momentum Analyzer is an open-source oscillator that reimagines traditional RSI through a multi-layered, regime-aware framework. Instead of relying on a single RSI line, this indicator calculates multiple RSI variants simultaneously — raw, smoothed, volume-weighted, and multi-layer — then blends them into a composite "Quantum RSI" that adapts to changing market conditions. It also includes regime detection, neural divergence identification, and momentum burst alerts, all presented through a visually rich interface with gradient coloring and an information dashboard.
Built with Pine Script v6, the indicator uses custom types to manage divergence points, regime states, momentum bursts, and quantum zones as structured objects.
Why This Indicator Exists
Standard RSI is a powerful concept, but a single 14-period RSI line has well-known limitations: it gives false overbought/oversold signals in trending markets, it lacks volume context, and it treats all market regimes the same way. This indicator addresses those gaps by:
Multi-dimensional RSI: Combines four RSI calculations (raw, smoothed, volume-weighted, multi-layer) into a single adaptive reading that is more robust than any individual RSI
Regime detection: Automatically classifies the market as Trending, Ranging, Volatile, or Calm, and adjusts the visual presentation accordingly
Volume weighting: Incorporates volume into the RSI calculation so that high-volume moves carry more weight than low-volume noise
Neural divergence: Detects divergences between price and the quantum RSI using pivot-based analysis with configurable lookback and maximum divergence distance
Momentum bursts: Identifies sudden, explosive momentum shifts that often precede significant price moves
Core Components Explained
1. Multi-Layer RSI System
The indicator calculates four distinct RSI values and combines them into a weighted composite:
rawRSI = ta.rsi(close, rsiLength)
smoothedRSI = ta.ema(rawRSI, smoothingLength)
volWeightedRSI = ta.rsi(close * volume, rsiLength)
multiLayerRSI = (ta.rsi(close, rsiLen1) + ta.rsi(close, rsiLen2) + ta.rsi(close, rsiLen3)) / 3
The multi-layer RSI uses three configurable periods (default 7, 14, 21) to capture momentum across short, medium, and long cycles. The final Quantum RSI is a weighted average of all four, giving a reading that is smoother than raw RSI but more responsive than heavily smoothed alternatives.
2. Regime Detection
The regime detector classifies market conditions using ADX for trend strength and ATR percentile for volatility:
Trending: ADX above threshold (default 25) — momentum signals are more reliable
Ranging: ADX below threshold with low volatility — overbought/oversold levels become more meaningful
Volatile: High ATR percentile regardless of ADX — wider bands and more cautious interpretation needed
Calm: Low ADX and low volatility — reduced signal reliability, smaller moves expected
The background color subtly shifts based on the detected regime, giving traders an immediate visual cue about the current market environment without needing to check additional indicators.
3. Neural Divergence Detection
Divergences are detected by comparing pivot highs and lows in price against corresponding pivots in the Quantum RSI. A bullish divergence occurs when price makes a lower low but the Quantum RSI makes a higher low, suggesting weakening selling pressure. A bearish divergence is the inverse.
The detection uses configurable parameters:
Pivot lookback (default 5): How many bars to look back for pivot confirmation
Max divergence bars (default 50): Maximum distance between the two pivots forming the divergence
Divergences are plotted as labeled markers on the oscillator panel, making them easy to spot without cluttering the price chart.
The Quantum Momentum Analyzer oscillator panel showing the multi-layer RSI line with regime-colored background zones and divergence markers
4. Momentum Burst Detection
A momentum burst fires when the rate of change in the Quantum RSI exceeds a configurable threshold within a short window. These bursts often coincide with the start of impulsive moves. Each burst is tracked as an object with a direction, strength value, and bar index, and is visualized as a highlighted marker on the oscillator.
5. Quantum Zones
The indicator defines dynamic zones on the oscillator based on the current regime and RSI behavior. These zones represent areas of high probability for reversals or continuations. In trending regimes, the zones shift to accommodate the tendency for RSI to stay elevated (in uptrends) or depressed (in downtrends), rather than using fixed 70/30 levels.
Visual Elements
Quantum RSI Line: The main composite RSI plotted with gradient coloring that shifts from bearish to bullish tones
Overbought/Oversold Levels: Horizontal reference lines at configurable levels (default 70/30) with a midline at 50
Regime Background: Subtle background coloring indicating the current market regime
Momentum Histogram: A histogram showing the rate of change of the Quantum RSI, color-coded by direction and intensity
Divergence Markers: Labels marking bullish and bearish divergences directly on the oscillator
Momentum Burst Markers: Highlighted signals when explosive momentum is detected
Dashboard: Real-time display of Quantum RSI value, regime state, divergence status, momentum direction, and burst alerts
Input Parameters
RSI Settings:
RSI Length (default 14): Base period for RSI calculations
Smoothing Length (default 5): EMA smoothing applied to the raw RSI
Overbought / Oversold levels (default 70 / 30)
Volume Weighting: Toggle volume-adjusted RSI component
Regime Detection:
ADX Length (default 14)
ADX Threshold (default 25): Above this = trending
ATR Percentile Length (default 100): Lookback for volatility ranking
Divergence Detection:
Pivot Lookback (default 5)
Max Divergence Bars (default 50)
Multi-Layer RSI:
Layer 1 / 2 / 3 Length (default 7, 14, 21)
Visual Settings:
Show Momentum Histogram, Dashboard, Glow Effects, Pulse Effects
How to Use This Indicator
Step 1: Check the regime background. In a trending regime, focus on momentum continuation signals rather than overbought/oversold reversals. In a ranging regime, the 70/30 levels become more actionable.
Step 2: Monitor the Quantum RSI line for crossovers of the 50 midline. A cross above 50 with rising momentum histogram suggests bullish momentum is building.
Step 3: Watch for divergences. A bullish divergence near the oversold zone in a ranging regime is a higher-probability reversal signal than one in a strong trending regime.
Step 4: Use momentum bursts as early warnings. A burst in the direction of the prevailing trend often signals the start of an impulsive move.
Step 5: Confirm with the dashboard. The dashboard provides a quick summary of all components so you can assess the overall momentum picture at a glance.
Dashboard view showing regime state, Quantum RSI value, divergence status, and momentum burst alert in a trending market
Indicator Limitations
Like all RSI-based tools, this indicator is a lagging momentum measure. It confirms momentum shifts after they begin, not before.
Volume-weighted RSI requires reliable volume data. On instruments with sparse or unreliable volume (some forex pairs, illiquid assets), consider disabling volume weighting.
Regime detection uses ADX, which itself has a lag. Regime transitions may be identified a few bars after they actually begin.
Divergences do not guarantee reversals. They indicate weakening momentum, but price can continue in the original direction for an extended period.
The multi-layer RSI adds smoothing, which reduces noise but also reduces responsiveness to sudden moves.
Momentum bursts can produce false signals during choppy, low-conviction markets.
Originality Statement
This indicator is original in its multi-dimensional approach to RSI analysis. While RSI, divergence detection, and regime filtering are established concepts individually, this indicator is justified because:
It fuses four distinct RSI methodologies (raw, smoothed, volume-weighted, multi-layer) into a single composite reading
Regime-aware interpretation automatically adjusts context based on ADX and volatility, something standard RSI indicators do not provide
The neural divergence system uses pivot-based detection with configurable distance limits, providing more precise divergence identification than simple lookback methods
Momentum burst detection adds an event-driven layer that identifies explosive shifts in RSI momentum
The quantum zone system dynamically adjusts overbought/oversold interpretation based on the current regime rather than using static levels
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. Trading involves substantial risk of loss. RSI and momentum analysis are tools for understanding market dynamics, not guarantees of future price movement. Always use proper risk management. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Phantom Flow Decoder [JOAT]Phantom Flow Decoder
Introduction
The Phantom Flow Decoder is an open-source overlay indicator that brings together five core Smart Money Concepts into a single, cohesive tool: market structure detection (BOS/CHoCH), order block identification, liquidity pool tracking with sweep and trap detection, Fair Value Gap (FVG) analysis with consequent encroachment, and premium/discount zone mapping. Rather than toggling between multiple scripts, traders can observe how these institutional concepts interact on the same chart in real time.
The indicator is built with Pine Script v6 and uses custom user-defined types to manage every structural element as a self-contained object, keeping the codebase modular and the chart clean even when all features are enabled simultaneously.
Why This Indicator Exists
Most Smart Money Concept tools on PulseWire focus on a single element, such as order blocks alone or FVGs alone. This forces traders to stack multiple concepts and mentally piece together the relationships between them. The Phantom Flow Decoder solves this by synthesizing these elements into one unified system where:
Structure breaks validate order blocks: An order block only forms when a confirmed pivot is detected, ensuring the OB has structural significance.
Liquidity pools are volume-weighted: Pools are not just swing points; they carry a volume weight that reflects how much participation occurred at that level.
FVGs are tracked through their lifecycle: From formation to mitigation, each gap is monitored and visually updated when price fills it.
Premium/discount zones provide context: Knowing whether price sits in the top 20% or bottom 20% of the recent range helps traders decide whether to look for longs or shorts.
Core Components Explained
1. Market Structure Detection (BOS and CHoCH)
The indicator uses pivot-based swing detection to identify Higher Highs (HH), Lower Lows (LL), Higher Lows (HL), and Lower Highs (LH). When price breaks a previous swing level, the script classifies it as either a Break of Structure (BOS), which continues the existing trend, or a Change of Character (CHoCH), which signals a potential trend reversal.
Structure strength is calculated by combining volume ratio and price movement relative to ATR. A BOS with high volume and a large price move relative to ATR is considered stronger than one with thin volume.
calcStructureStrength(float priceMove, float vol, float atrVal, float volSmaVal) =>
float volRatio = vol / volSmaVal
float priceRatio = priceMove / atrVal
math.min(100, (volRatio * 30 + priceRatio * 70))
Each structure break is drawn as a horizontal line extending from the break level, with a compact label ("BOS" or "CHoCH") positioned nearby. Line styles are configurable between solid, dashed, and dotted.
Overview showing BOS and CHoCH labels on the chart with structure lines extending from break points
2. Order Block Detection
Order blocks represent the last opposing candle before a significant move. The indicator identifies bullish order blocks as the last bearish candle before a swing low, and bearish order blocks as the last bullish candle before a swing high. To filter noise, order blocks must meet a minimum size threshold measured in ATR multiples (default 0.5x ATR).
Each order block is drawn as a semi-transparent box with a dashed equilibrium line at its midpoint. When price returns to an order block and penetrates through it, the block is marked as mitigated and its visual is removed from the chart, keeping the display uncluttered.
3. Liquidity Pool Detection with Sweeps and Traps
Liquidity pools form at swing points where stop orders are likely clustered. The indicator tracks these pools and monitors them for two key events:
Sweeps: When price briefly pierces a liquidity level and then reverses, the pool is marked with a gold "SWEEP" label. The sweep threshold is configurable in ATR multiples.
Traps: When a sweep occurs with abnormally high volume, it is classified as a Smart Money Trap and marked with a magenta "TRAP" label, suggesting institutional manipulation.
When volume-weighted liquidity is enabled, each pool carries a weight based on the volume at the swing point relative to the 20-period volume SMA. This helps traders prioritize pools where significant participation occurred.
4. Fair Value Gap (FVG) Analysis
A bullish FVG forms when the current bar's low is above the high from two bars ago, creating a gap in price delivery. A bearish FVG is the inverse. The indicator filters FVGs by a minimum size (default 0.3x ATR) to avoid plotting insignificant gaps.
Each FVG is drawn as a colored box. When Consequent Encroachment is enabled, a dashed line is drawn at the 50% level of the gap, which institutional traders often use as a precise entry point. FVGs are tracked for mitigation: when price fills the gap, the box style changes to indicate it has been mitigated. FVGs older than the configurable max age (default 50 bars) are automatically removed.
5. Premium/Discount Zones
Using a configurable lookback period (default 50 bars), the indicator calculates the highest high and lowest low, then divides the range into zones. The top 20% is the premium zone (where sellers have an edge), the bottom 20% is the discount zone (where buyers have an edge), and the 50% level is the equilibrium. These zones are drawn as semi-transparent boxes with an equilibrium line.
Visual Elements
Swing Point Labels: HH, HL, LH, LL labels at each confirmed pivot
Structure Lines: Horizontal lines at BOS/CHoCH levels with configurable styles
Order Block Boxes: Semi-transparent boxes with equilibrium midlines
Liquidity Pool Boxes: Thin boxes at swing levels with SWEEP/TRAP labels
FVG Zones: Colored boxes with optional CE (50%) lines
Premium/Discount Zones: Background shading for range context
Candle Coloring: Optional trend-based candle coloring
Dashboard: Real-time metrics including trend direction, structure counts, and sweep/trap counts
Input Parameters
Structure Detection:
Pivot Sensitivity (2-20, default 5): Lower values detect more pivots, higher values only detect stronger swings
Show BOS / Show CHoCH: Toggle each structure type independently
Structure Line Style: Solid, Dashed, or Dotted
Order Block Detection:
Order Block Strength (1-10, default 3): Minimum candles for valid OB
Track OB Mitigation: Automatically remove mitigated OBs
Min OB Size (ATR): Minimum order block size filter
Liquidity Detection:
Liquidity Sensitivity (1-10, default 3)
Sweep Threshold (ATR): How far price must pierce a level to count as a sweep
Volume-Weighted Liquidity: Weight pools by volume participation
Fair Value Gaps:
FVG Max Age (bars): Auto-remove old FVGs (default 50)
Track FVG Mitigation: Monitor and update filled gaps
Min FVG Size (ATR): Filter small gaps
Show Consequent Encroachment: Draw 50% midline
Premium/Discount Zones:
Zone Lookback (20-200, default 50)
Show Equilibrium Line
How to Use This Indicator
Step 1: Identify the current market structure by observing BOS/CHoCH labels. A series of bullish BOS confirms an uptrend; a bearish CHoCH warns of a potential reversal.
Step 2: Look for unmitigated order blocks in the direction of the trend. In an uptrend, focus on bullish OBs below current price as potential support zones.
Step 3: Check if any FVGs overlap with order blocks. This confluence of an institutional entry zone (OB) with an imbalance in price delivery (FVG) creates a high-probability area.
Step 4: Confirm the zone is in the discount area (for longs) or premium area (for shorts) using the premium/discount zones.
Step 5: Monitor liquidity pools for sweeps. A sweep of a liquidity pool followed by a reversal into a confluence zone is a classic institutional entry pattern.
Step 6: Use the dashboard to monitor overall market conditions and structure counts.
Example showing a confluence setup: FVG overlapping with an order block in the discount zone, with a nearby liquidity sweep
Indicator Limitations
Pivot detection has an inherent delay equal to the pivot lookback period. Structure labels appear after confirmation, not in real time.
Order blocks and FVGs are based on historical price patterns and do not predict future price movement.
Volume-weighted features work best on instruments with reliable volume data. Low-volume instruments may produce less meaningful liquidity weights.
The indicator draws many visual elements simultaneously. On lower timeframes with high bar counts, consider reducing the Max Structure Elements setting to maintain chart performance.
Premium/discount zones are relative to the lookback period. Changing the lookback significantly alters the zones.
Smart Money Concepts are interpretive frameworks, not guaranteed predictors. Always use proper risk management.
Originality Statement
This indicator is original in its unified integration approach. While individual SMC components (BOS, CHoCH, order blocks, FVGs, liquidity pools) exist in separate scripts, this indicator is justified because:
It combines five distinct SMC methodologies into a single, object-oriented system using Pine Script v6 user-defined types
Volume-weighted liquidity pool detection adds a quantitative dimension to traditional swing-based liquidity mapping
Smart Money Trap detection (high-volume sweeps) provides a layer of institutional activity analysis not found in standard liquidity tools
FVG lifecycle tracking with consequent encroachment gives traders precise institutional entry levels
The premium/discount zone overlay provides immediate context for whether a setup is in a favorable or unfavorable area of the range
All components share state and interact: structure breaks trigger order block creation, liquidity pools are validated against volume data, and FVGs are checked against premium/discount positioning
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. Trading involves substantial risk of loss and is not suitable for all investors. Smart Money Concepts are analytical frameworks that help interpret market behavior, but they do not guarantee profitable trades. Past patterns do not guarantee future results. Always use proper risk management, including stop losses and position sizing appropriate for your account. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Integrated Execution System [JOAT]Integrated Execution Strategy System
Introduction
The Integrated Execution Strategy System is a comprehensive open-source trading strategy that combines regime detection, directional bias analysis, momentum filtering, and structural confluence into a unified adaptive trading framework. This strategy is designed for traders who understand that successful trading requires adapting to market conditions and waiting for high-probability setups with multiple layers of confirmation.
Unlike simple strategies that rely on single indicators, this system integrates six distinct analytical layers: Market Regime Classification to avoid unfavorable conditions, Directional Bias Aggregation across multiple timeframes, Momentum Pressure analysis to gauge institutional participation, Structural Analysis for key levels, Volatility Engine for adaptive sizing, and Signal Qualification to ensure only the highest probability setups are taken. The strategy is built on the principle that edges in trading come from the confluence of multiple factors, not from any single signal.
[image [https://www.pulsewire.com/x/NTfmwzgw/
Why This Strategy Exists
This strategy addresses the critical challenge most traders face: adapting to changing market conditions. Most strategies work well in specific market regimes but fail when conditions change. This system solves that problem by:
Regime-Adaptive Logic: Automatically detects trending, ranging, and volatile market conditions and adjusts trading behavior accordingly
Multi-Layer Filtering: Requires confluence across trend, momentum, structure, and volume before entering trades
Institutional-Grade Risk Management: Dynamic position sizing, adaptive stops, and multi-target scaling based on market volatility
Multi-Timeframe Alignment: Confirms signals across higher timeframes to trade with the dominant market flow
Pressure and Flow Analysis: Measures buying/selling pressure to detect institutional participation
Structural Confluence: Identifies key swing levels and liquidity zones for optimal entry positioning
Each component addresses a specific aspect of trading: Regime detection tells us WHEN to trade, bias analysis tells us WHICH direction, momentum confirms the STRENGTH, structure provides the LEVEL, volatility determines the SIZE, and qualification ensures the QUALITY of the setup.
Core Components Explained
1. Market Regime Detection
The strategy classifies markets into four distinct regimes using ADX and ATR analysis:
// Regime classification
if vol_ratio >= i_vol_exp and adx < i_adx_trend
regime := 3 // Volatile
else if adx >= i_adx_trend
regime := 1 // Trending
else if vol_ratio <= i_vol_con
regime := 2 // Ranging
Regime types:
Trending (ADX > 25): Strong directional markets with momentum
Ranging (Low volatility, ADX < 25): Sideways markets suitable for range-bound strategies
Volatile (High volatility, ADX < 25): Chaotic markets where trading is reduced or avoided
Neutral: Transition periods between defined regimes
The strategy automatically reduces position sizing and tightens stops in volatile regimes while increasing size and allowing wider stops in trending regimes.
2. Directional Bias Aggregation
Bias is calculated using multiple indicators weighted by their reliability:
// Composite bias calculation
float bias_score = 0.0
if ma_bullish
bias_score += 30
if price_above_structure
bias_score += 20
if close > ma_trend
bias_score += 20
if plus_di > minus_di
bias_score += 30
Bias components:
Moving Average Relationships: Fast/slow MA alignment for trend direction
Price Position: Where price sits relative to key moving averages
ADX Directional Indicators: +DI vs -DI for momentum confirmation
Multi-Timeframe Alignment: Higher timeframe bias for trend confirmation
A bias score above the threshold (default 30) indicates directional conviction worth trading.
3. Momentum Pressure Analysis
Momentum is evaluated through multiple oscillators to ensure entry timing:
// Momentum scoring
int momentum_bull_score = 0
if rsi_bullish
momentum_bull_score += 1
if rsi_momentum_up
momentum_bull_score += 1
if macd_bullish
momentum_bull_score += 1
Momentum filters:
RSI Analysis: Momentum direction and overbought/oversold conditions
MACD Histogram: Trend acceleration and deceleration
Stochastic Oscillator: Entry timing and momentum strength
Volume Confirmation: Above-average volume for signal validity
Only when momentum aligns with directional bias do we consider entries.
4. Structural Market Analysis
Structure identifies key levels where institutions place orders:
// Structure analysis
bool above_swing_low = close > nz(last_swing_low, low)
bool below_swing_high = close < nz(last_swing_high, high)
bool sweep_high = not na(last_swing_high) and high > last_swing_high and close < last_swing_high
bool sweep_low = not na(last_swing_low) and low < last_swing_low and close > last_swing_low
Structural elements:
Swing Points: Key highs and lows that define market structure
Liquidity Sweeps: Price moves beyond swing levels that quickly reverse
Break of Structure: Confirmation of trend changes
Support/Resistance Zones: Areas of high probability reaction
Entries are favored when price aligns with structural levels and sweeps indicate institutional activity.
5. Volatility-Adaptive Risk Management
Risk management dynamically adjusts based on market conditions:
// Adaptive stop multiplier based on regime
float adaptive_stop_mult = i_atr_stop_mult
if i_adapt_stops
if volatile_regime
adaptive_stop_mult := i_atr_stop_mult * i_vol_stop_mult
else if ranging_regime
adaptive_stop_mult := i_atr_stop_mult * 0.85
else if trending_regime
adaptive_stop_mult := i_atr_stop_mult * 1.1
Risk features:
Adaptive Position Sizing: Larger sizes in high-conviction trends, smaller in volatile conditions
Dynamic Stop Losses: Wider in trending markets, tighter in ranging/volatile conditions
Multi-Target Scaling: Partial profits at predefined levels to reduce risk
Trailing Stops: Lock in profits when moves reach predefined thresholds
Volatility-Adjusted Targets: Larger profit targets in high-volatility environments
6. Signal Qualification System
The strategy uses a 14-point qualification system to ensure only high-quality setups:
// Total scores (max 14)
int bull_total = (
(bullish_bias ? 3 : 0) + momentum_bull_score + struct_bull_score + (trending_regime ? 2 : 0) +
(pressure_bull ? 1 : 0) + (sweep_low ? 1 : 0) + (squeeze_release ? 1 : 0) + (mtf_bias_long ? 1 : 0)
)
Qualification criteria:
Bias Strength (3 points): Strong directional conviction
Momentum (3 points): Multiple momentum indicators aligned
Structure (2 points): Price respecting key levels
Regime (2 points): Favorable market conditions
Pressure (1 point): Buying/selling pressure confirmation
Sweeps (1 point): Liquidity sweep patterns
Squeeze Release (1 point): Volatility breakout patterns
MTF Alignment (1 point): Higher timeframe confirmation
Only setups scoring 5+ (adjustable) are considered for trading.
Visual Elements
Directional Cloud: Dynamic cloud showing trend direction and strength
Signal Markers: Clear entry signals with quality grades (A-D)
Risk Levels: Visual stop loss and target levels
Structure Points: Marked swing highs and lows
Background Colors: Regime-based background shading
Dashboard: Real-time metrics including regime, bias, momentum, and signal quality
The dashboard displays:
1. Current market regime and strength
2. Directional bias score and alignment
3. Momentum state and pressure readings
4. Structural analysis and proximity to levels
5. Signal qualification score and grade
6. Active position sizing and risk metrics
7. Multi-timeframe alignment status
Input Parameters
Regime Detection:
ADX Period: Trend strength calculation period (default: 14)
Trend Threshold: Minimum ADX for trend regime (default: 25)
ATR Period: Volatility calculation period (default: 14)
Volatility Expansion/Contraction: Multipliers for regime detection (default: 1.4/0.6)
Bias Calculation:
Fast/Slow/Anchor MAs: Trend calculation periods (default: 21/55/200)
Bias Threshold: Minimum score for directional bias (default: 30)
Multi-Timeframe Settings: Higher timeframes for confirmation (default: 60m/240m/1D)
Risk Management:
Risk Per Trade %: Percentage of equity to risk (default: 1.0%)
ATR Stop Multiplier: Stop distance in ATR units (default: 2.0)
R:R Targets: Profit target multiples (default: 1.5x/2.5x)
Adaptive Sizing: Enable regime-based position sizing (default: true)
Signal Filters:
Minimum Qualification Score: Required confluence score (default: 5)
Signal Cooldown: Bars between signals (default: 1)
Volume Filter: Require above-average volume (default: true)
Bar Confirmation: Wait for bar close (default: true)
How to Use This Strategy
Step 1: Understand Market Regime
Check the dashboard for current market regime. Avoid trading in volatile regimes (red background) unless you have specific volatility-based strategies. Trending regimes (green) are optimal for directional trading, while ranging regimes (purple) suit mean-reversion approaches.
Step 2: Assess Directional Bias
Look for strong bias scores (60+) with multi-timeframe alignment. The bias should be clear across multiple timeframes before considering entries. Weak or conflicting bias suggests waiting for clarity.
Step 3: Confirm Momentum
Ensure momentum indicators support the directional bias. Look for RSI momentum in the direction of the trade, MACD histogram expanding, and stochastic crossovers aligned with the bias.
Step 4: Identify Structural Levels
Entries near structural levels (swing highs/lows) have higher probability. Look for liquidity sweeps that indicate institutional participation before entering in the opposite direction.
Step 5: Check Signal Qualification
Only take trades with qualification scores of 5 or higher. Premium signals (grade A, 75+ quality) offer the highest probability and can be sized more aggressively.
Step 6: Manage Risk Dynamically
Let the strategy's adaptive risk management adjust position sizes and stops based on market conditions. Don't override the system's risk calculations without strong reason.
Best Practices
Trade liquid instruments (major forex pairs, indices, large-cap stocks, major crypto) for reliable signals
Start with the default parameters and only adjust after understanding their impact
Pay attention to regime changes - they often signal strategy adjustments
Use the qualification score as your primary filter - higher scores mean higher probability
Be patient for A-grade setups rather than forcing mediocre trades
Monitor the multi-timeframe alignment - trades against higher timeframes have lower success rates
Let winners run to the second target when momentum is strong
Reduce size during volatile regimes or take a break entirely
Keep a trade journal to note which regime/bias combinations work best for each instrument
Consider economic news events that might trigger regime changes
Strategy Limitations
Like all strategies, performance varies across different market instruments and timeframes
Regime detection may lag during rapid market transitions
Multi-timeframe analysis requires sufficient historical data on all timeframes
The strategy is designed for swing trading and may not be optimal for scalping
Highly correlated instruments may produce similar signals across different pairs
Extreme market events (black swans) can overwhelm any risk management system
Backtested performance does not guarantee future results
The strategy requires discipline to follow all signals, including losing ones
Commissions and slippage can significantly impact performance on smaller timeframes
Success requires understanding the system's logic rather than blind execution
Technical Implementation
Built with Pine Script v6 featuring:
Modular architecture with separate calculation modules for each component
Advanced regime detection using ADX and ATR combinations
Multi-timeframe security requests with proper lookahead management
Dynamic risk management with adaptive position sizing
Comprehensive signal qualification scoring system
Real-time dashboard with 12 key metrics
Visual elements including directional cloud and risk levels
Export functions for integration with other indicators
Alert conditions for all major signal types
The code is fully open-source and can be modified to suit individual trading styles and preferences. All calculations use confirmed bars to prevent repainting.
Originality Statement
This strategy is original in its comprehensive integration of multiple analytical layers into a unified adaptive system. While individual components (ADX, moving averages, RSI, MACD, etc.) are established tools, this strategy is justified because:
It synthesizes six distinct analytical approaches into a cohesive decision framework
The regime-adaptive logic automatically adjusts strategy behavior based on market conditions
The qualification scoring system provides objective criteria for signal selection
Multi-timeframe bias aggregation ensures alignment with the dominant market trend
Structural analysis integration provides context for market microstructure
Volatility-adaptive risk management dynamically adjusts to market conditions
The comprehensive dashboard presents all critical metrics for informed decision-making
Each component contributes unique information: regime tells us when to trade, bias tells us direction, momentum provides timing, structure gives levels, volatility determines sizing, and qualification ensures quality
The strategy's value lies not in any single component but in how these elements work together to create a robust, adaptive trading system that can navigate different market environments while maintaining disciplined risk management.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Past performance does not guarantee future results. The backtested results shown are based on historical data and do not account for real-world factors such as slippage, liquidity issues, or psychological pressures that can affect trading performance.
The strategy's signals are mathematical calculations based on historical patterns and technical indicators. They do not predict future price movements with certainty. Market conditions can change rapidly, rendering previously successful patterns ineffective.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this system.
-Made with passion by officialjackofalltrades
Strategy

Adaptive SuperTrend Oscillator [QuantAlgo]🟢 Overview
The Adaptive SuperTrend Oscillator transforms the classic SuperTrend indicator into a normalized momentum score that adapts to changing market conditions. Instead of displaying a simple above/below signal on the price chart, it measures how far price has moved from the SuperTrend line and scales that distance against an Efficiency Ratio-driven ATR that automatically adjusts between trending and ranging environments. The result is a centered oscillator with dynamically calculated overbought and oversold thresholds, helping traders read the strength behind a trend rather than just its direction, across different markets and timeframes.
🟢 How It Works
The foundation of the indicator is the distance between the closing price and the SuperTrend line:
= ta.supertrend(active_multiplier, active_atr_length)
price_distance = close - supertrend_line
A positive distance means price is above the SuperTrend line, indicating a bullish condition. A negative distance indicates price is below it, reflecting a bearish condition. The raw distance alone is not directly comparable across instruments or timeframes, so the indicator normalizes it using an adaptive ATR.
The normalization layer is driven by an Efficiency Ratio, which measures how directionally efficient recent price movement has been. It compares the net price change over the lookback window against the total path length traveled:
price_change = math.abs(close - close )
path_length = math.sum(math.abs(close - close ), active_er_length)
efficiency_ratio = path_length != 0 ? price_change / path_length : 0.0
A high Efficiency Ratio means price is moving in a consistent direction with little back-and-forth. A low ratio indicates choppy, non-directional movement. This reading is then used to blend between a fast and slow ATR period:
adaptive_atr = efficiency_ratio * ta.atr(active_norm_fast) + (1.0 - efficiency_ratio) * ta.atr(active_norm_slow)
score = adaptive_atr != 0 ? price_distance / adaptive_atr * 100 : 0.0
During trending conditions the fast ATR period is weighted more heavily, allowing the score to move more freely. During choppy conditions the slow ATR period dominates, dampening the score and reducing low-conviction readings. The final score is expressed as a percentage of the adaptive ATR, making it directly comparable across different instruments and volatility environments.
Overbought and oversold levels are derived dynamically from the rolling standard deviation of the score itself rather than fixed values:
score_deviation = ta.stdev(score, 100)
ob_extreme = score_deviation * 3
ob_level = score_deviation * 2
os_level = -score_deviation * 2
os_extreme = -score_deviation * 3
This means the threshold levels expand during volatile periods and contract during quiet ones, keeping the overbought and oversold zones statistically consistent relative to recent score behavior.
🟢 Signal Interpretation
▶ Bullish Trend (Score Above Zero, Outside Neutral Zone, Green): When the score is positive and exceeds the neutral threshold, the oscillator confirms that price is above the SuperTrend line and momentum is directionally efficient enough to register. The score's gradient intensity reflects how far momentum has extended relative to the adaptive ATR baseline. The trend remains bullish until the score crosses back below zero or into the neutral zone.
▶ Bearish Trend (Score Below Zero, Outside Neutral Zone, Red): When the score is negative and falls below the neutral threshold, the oscillator confirms that price is below the SuperTrend line. A deeper negative score indicates stronger downside momentum relative to the normalization baseline. The trend remains bearish until the score crosses back above zero or into the neutral zone.
▶ Neutral Zone (Score Within Threshold, Grey): When the absolute score value is within the neutral threshold, the oscillator treats the reading as non-directional regardless of which side of zero it sits on. This filters out low-conviction conditions where the SuperTrend distance is small relative to the adaptive ATR, preventing the indicator from registering trend signals during consolidation or choppy price action.
▶ Overbought and Oversold Levels (2σ and 3σ Bands): When the score reaches the 2σ or 3σ bands, it indicates that momentum has extended significantly relative to its own recent history. These are not reversal signals by themselves, but they mark zones where the trend is stretched and worth monitoring for potential exhaustion.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover different trading approaches. "Default" uses moderate SuperTrend sensitivity for swing trading on 4-hour and daily charts. "Fast Response" tightens the SuperTrend bands and shortens normalization windows for intraday use on 5-minute to 1-hour charts. "Smooth Trend" widens the SuperTrend bands and extends normalization windows for position trading on daily and weekly timeframes.
▶ Built-in Alerts: Seven alert conditions cover the full range of oscillator states. Trend transition alerts fire when the score crosses into bullish, bearish, or neutral territory. Separate alerts trigger when the score reaches the 2σ overbought or oversold levels and again when it reaches the more extreme 3σ levels, enabling graduated monitoring without requiring constant chart observation.
▶ Visual Customization: Six color presets (Classic, Aqua, Cosmic, Cyber, Neon, plus Custom) coordinate colors across the score line, ribbon fills, overbought/oversold bands, and optional bar coloring. The ribbon uses three fill layers between the score line and zero, each at increasing transparency, creating a gradient that visually represents the weight of momentum behind the current reading. Optional bar coloring applies trend state colors directly to price bars for quick multi-timeframe reference.
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

Signal Qualification Engine [JOAT]Signal Qualification Engine
Introduction
The Signal Qualification Engine is a sophisticated multi-layer signal filtering system designed to identify high-probability trading opportunities through comprehensive confluence analysis. This indicator solves the universal trading problem of signal quality - not all signals are created equal, and distinguishing between mediocre setups and high-probability opportunities is what separates successful traders from the crowd. By evaluating signals across trend, momentum, volume, and structure layers, this engine provides institutional-grade signal qualification that helps traders focus only on the best opportunities.
This tool is built for traders who understand that edge in trading comes from the confluence of multiple factors rather than any single indicator. Whether you're a discretionary trader looking for confirmation, a systematic trader needing signal filtering, or an algorithm developer requiring quality scoring, this engine provides the comprehensive analysis needed to elevate your trading from random signals to systematic, high-quality setups.
Why This Indicator Exists
Most traders struggle with signal overload - too many signals, varying quality, and no systematic way to evaluate them. This indicator addresses that critical problem by:
Multi-Layer Analysis: Evaluates signals across four independent analytical layers
Quality Scoring: Provides objective, numerical quality scores for every signal
Confluence Detection: Identifies when multiple factors align for high-probability setups
Risk/Reward Validation: Ensures signals offer adequate profit potential relative to risk
Premium Signals: Flags exceptional setups with maximum confluence
Visual Zones: Shows entry zones, stop levels, and targets for clear risk management
The engine transforms subjective signal evaluation into an objective, systematic process that can be consistently applied across all market conditions and instruments.
Core Components Explained
1. Trend Analysis Layer
The trend layer evaluates the directional bias using multiple trend indicators:
// Trend scoring
int trend_bull_score = 0
int trend_bear_score = 0
// Moving average analysis
if price_above_fast_ma
trend_bull_score += 1
if price_above_slow_ma
trend_bull_score += 1
if ma_bullish_cross
trend_bull_score += 1
// ADX analysis
if adx > i_adx_thresh
trend_bull_score += plus_di > minus_di ? 2 : 0
trend_bear_score += minus_di > plus_di ? 2 : 0
Trend components:
Price vs MAs: Position relative to fast and slow moving averages
MA Crossovers: Recent trend changes and confirmation
ADX Strength: Trend strength above threshold (default 25)
Directional Movement: +DI vs -DI for trend direction
Trend Score: Cumulative trend strength (0-5 points)
The trend layer ensures we only trade in the direction of the established trend or during trend changes with confirmation.
2. Momentum Analysis Layer
Momentum is evaluated through multiple oscillators to ensure optimal timing:
// Momentum scoring
int momentum_bull_score = 0
int momentum_bear_score = 0
// RSI analysis
if rsi > 50 and rsi < 70 and rsi > rsi
momentum_bull_score += 1
if rsi < 50 and rsi > 30 and rsi < rsi
momentum_bear_score += 1
// Stochastic analysis
if stoch_k > stoch_d and stoch_k < 80
momentum_bull_score += 1
if stoch_k < stoch_d and stoch_k > 20
momentum_bear_score += 1
// MACD analysis
if macd_hist > 0 and macd_hist > macd_hist
momentum_bull_score += 1
if macd_hist < 0 and macd_hist < macd_hist
momentum_bear_score += 1
Momentum components:
RSI Direction: Momentum direction with overbought/oversold filters
Stochastic Crossovers: Entry timing with extreme level avoidance
MACD Histogram: Trend acceleration and deceleration
Momentum Score: Cumulative momentum strength (0-3 points)
Divergence Detection: Price/momentum divergences for early signals
The momentum layer ensures we enter when momentum supports our directional bias.
3. Volume Analysis Layer
Volume confirms the strength and conviction behind price movements:
// Volume analysis
float vol_sma = ta.sma(volume, 20)
float vol_ratio = vol_sma > 0 ? volume / vol_sma : 1.0
bool above_avg_vol = volume > vol_sma * 1.2
bool high_vol_session = session_vol_ratio > 1.5
// Volume scoring
int volume_score = 0
if above_avg_vol
volume_score += 1
if high_vol_session
volume_score += 1
if vol_ratio > 1.5
volume_score += 1
Volume components:
Volume Ratio: Current volume relative to 20-period average
Above Average Volume: Confirms signal strength (20% above average)
Session Volume Analysis: Compares current volume to historical session averages
Volume Score: Cumulative volume confirmation (0-3 points)
Volume Spike Detection: Exceptional volume that may signal institutional activity
The volume layer ensures signals have sufficient participation to be reliable.
4. Structure Analysis Layer
Structure identifies key levels where professional traders place orders:
// Structure analysis
float swing_high = ta.pivothigh(high, i_swing_left, i_swing_right)
float swing_low = ta.pivotlow(low, i_swing_left, i_swing_right)
bool near_resistance = math.abs(close - nearest_resistance) / close * 100 < i_level_proximity
bool near_support = math.abs(close - nearest_support) / close * 100 < i_level_proximity
bool sweep_high = high > nearest_resistance and close < nearest_resistance
bool sweep_low = low < nearest_support and close > nearest_support
Structure components:
Swing Points: Key highs and lows defining market structure
Level Proximity: Distance to nearest support/resistance
Liquidity Sweeps: Price moves beyond levels that quickly reverse
Break of Structure: Confirms trend changes
Structure Score: Cumulative structural confirmation (0-3 points)
The structure layer ensures entries occur at technically significant levels.
5. Signal Qualification System
All layers combine to produce a comprehensive qualification score:
// Total scores (max 14)
int bull_total = (
trend_bull_score + momentum_bull_score + volume_score + structure_score +
(near_support ? 1 : 0) + (sweep_low ? 1 : 0) + (rr_ratio >= i_min_rr ? 1 : 0)
)
int bear_total = (
trend_bear_score + momentum_bear_score + volume_score + structure_score +
(near_resistance ? 1 : 0) + (sweep_high ? 1 : 0) + (rr_ratio >= i_min_rr ? 1 : 0)
)
Qualification criteria:
Trend Score (0-5 points): Directional bias strength
Momentum Score (0-3 points): Timing confirmation
Volume Score (0-3 points): Participation confirmation
Structure Score (0-3 points): Level confirmation
Level Proximity (1 point): Entry at key level
Liquidity Sweep (1 point): Institutional activity
Risk/Reward (1 point): Adequate profit potential
Maximum Score: 14 points for perfect confluence
6. Quality Grading System
Signals are graded based on their qualification score:
// Quality grades
string bull_grade = bull_total >= 12 ? "A+" :
bull_total >= 10 ? "A" :
bull_total >= 8 ? "B" :
bull_total >= 6 ? "C" : "D"
string bear_grade = bear_total >= 12 ? "A+" :
bear_total >= 10 ? "A" :
bear_total >= 8 ? "B" :
bear_total >= 6 ? "C" : "D"
Grade meanings:
A+ (12-14 points): Exceptional setup with maximum confluence
A (10-11 points): High-quality setup with strong confluence
B (8-9 points): Good setup with moderate confluence
C (6-7 points): Acceptable setup with basic confluence
D (0-5 points): Weak setup, avoid trading
Only B-grade and above signals are typically considered for trading.
7. Risk/Reward Validation
Each signal is validated for adequate profit potential:
// Risk/Reward calculation
float atr_val = ta.atr(14)
float stop_distance = atr_val * i_stop_mult
float target_distance = atr_val * i_target_mult
float rr_ratio = target_distance / stop_distance
// RR validation
bool valid_rr = rr_ratio >= i_min_rr
RR features:
ATR-Based Stops: Dynamic stop placement based on volatility
Multiple Targets: Primary and secondary profit targets
Minimum RR Ratio: Configurable minimum (default 1.5:1)
RR Validation: Signals without adequate RR are disqualified
Visual Targets: Clear stop and target levels on chart
Visual Elements
Signal Markers: Clear entry signals with quality grades
Entry Zones: Shaded areas showing optimal entry regions
Risk Levels: Visual stop loss and target levels
Quality Meter: Real-time confluence score display
Background Colors: Signal strength background shading
Dashboard: Comprehensive metrics panel
Premium Signals: Special markers for A+ grade setups
The dashboard displays:
1. Current signal qualification scores
2. Quality grades and confluence percentages
3. Individual layer scores (trend, momentum, volume, structure)
4. Risk/Reward ratio and validation status
5. Nearest support/resistance levels
6. Volume analysis and session context
7. Signal cooldown status
8. Premium signal indicators
Input Parameters
Trend Settings:
Fast MA Period: Short-term trend (default: 21)
Slow MA Period: Medium-term trend (default: 55)
ADX Period: Trend strength (default: 14)
ADX Threshold: Minimum trend strength (default: 25)
Momentum Settings:
RSI Period: Momentum oscillator (default: 14)
Stochastic K/D: Entry timing (default: 14/3)
MACD Fast/Slow/Signal: Trend acceleration (default: 12/26/9)
Structure Settings:
Swing Left/Right: Pivot point detection (default: 10/5)
Level Proximity %: Distance to key levels (default: 0.5%)
Max Levels: Maximum swing levels to track (default: 20)
Qualification Settings:
Minimum Score: Required qualification score (default: 6)
Signal Cooldown: Bars between signals (default: 5)
Minimum R:R: Required risk/reward ratio (default: 1.5)
Require Confirmation: Wait for bar close (default: true)
How to Use This Indicator
Step 1: Monitor Signal Quality
Watch for B-grade or higher signals. A-grade signals offer the highest probability but occur less frequently. Focus on quality over quantity - one A-grade signal is worth ten C-grade signals.
Step 2: Verify Layer Alignment
Check the dashboard to see which layers are contributing to the signal. The best signals have confirmation from all four layers (trend, momentum, volume, structure).
Step 3: Assess Risk/Reward
Ensure the signal offers adequate profit potential. The indicator automatically validates RR ratios, but you should manually verify that targets make sense in the current market context.
Step 4: Time Entry with Structure
Use the entry zones and structure levels to time your entry precisely. The best entries occur when price is near key support/resistance levels or after liquidity sweeps.
Step 5: Manage Risk Dynamically
Use the visual stop and target levels as guidelines, but adjust based on your personal risk tolerance and account size. Never risk more than you're comfortable losing.
Step 6: Track Premium Signals
Pay special attention to A+ grade premium signals. These rare setups with maximum confluence often lead to the largest moves and deserve larger position sizes.
Best Practices
Be patient for A-grade signals rather than forcing mediocre trades
Use the qualification score as your primary filter - ignore signals below your minimum threshold
Combine with your own analysis for additional confirmation
Adjust the minimum score based on market conditions - higher in choppy markets, lower in strong trends
Keep a trade journal to track which grade performs best in each market condition
Use the cooldown period to avoid overtrading - quality signals require patience
Pay attention to volume confirmation - signals without volume support often fail
Structure is key - signals at major levels have higher success rates
Liquidity sweeps provide high-probatility reversal opportunities
Always respect the risk/reward validation - poor RR setups destroy accounts
Strategy Integration
This indicator is designed to enhance any trading system:
Use as a signal filter for existing strategies
Import quality scores to weight trade decisions
Combine with trend-following systems for entry timing
Use structure levels for stop placement in other systems
Integrate volume analysis for signal confirmation
Apply risk/reward validation to all trades
Use premium signals as standalone trade opportunities
Export layer scores for custom signal development
The indicator includes 12 export functions for integration:
Bull/Bear Score Export: Total qualification scores
Quality Grade Export: Letter grade as numeric value
Trend Score Export: Trend layer score
Momentum Score Export: Momentum layer score
Volume Score Export: Volume layer score
Structure Score Export: Structure layer score
RR Ratio Export: Current risk/reward ratio
Signal Export: Binary signal output
Premium Signal Export: A+ grade signal flag
Technical Implementation
Built with Pine Script v6 featuring:
Multi-layer signal analysis across four independent systems
Dynamic qualification scoring with configurable weights
Advanced market structure detection with pivot points
Volume analysis with session context
Risk/reward validation with ATR-based calculations
Comprehensive visualization with entry zones and risk levels
Real-time dashboard with 12 key metrics
Alert conditions for all signal types and grades
Export functions for strategy integration
Premium signal detection for exceptional setups
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 signal qualification and multi-layer confluence analysis. While individual components (RSI, MACD, ADX, etc.) are established tools, this indicator is justified because:
It synthesizes four distinct analytical layers into a unified qualification system
The scoring system provides objective, numerical signal evaluation
Quality grading transforms subjective analysis into systematic decision-making
Risk/reward validation ensures only profitable setups are considered
Structure analysis integration provides context for market microstructure
Volume layer adds confirmation often missing from signal systems
Premium signal detection identifies exceptional opportunities
Comprehensive visualization makes complex analysis accessible
Export functions enable integration with any trading system
Each layer contributes unique insights: trend provides direction, momentum provides timing, volume provides confirmation, and structure provides context
The indicator's value lies in transforming signal evaluation from art to science - providing traders with a systematic, objective way to identify and focus only on the highest probability 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. Signal qualification is a tool for improving trade selection, not a guarantee of success.
Even high-quality signals can fail due to unexpected market events, news, or changes in market conditions. Past performance of high-grade signals does not guarantee future results. The indicator's signals are mathematical calculations based on historical patterns and should be used in conjunction 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.
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

Regime Classifier [JOAT]Regime Classifier
Introduction
The Regime Classifier is a sophisticated market state detection system designed to identify and classify market conditions into distinct operational regimes. Understanding the current market regime is perhaps the most critical factor in successful trading - a strategy that works beautifully in a trending market will fail miserably in a ranging market, and vice versa. This indicator solves that fundamental problem by providing clear, actionable classification of market states, allowing traders to adapt their approach to current conditions.
This tool is built for traders who understand that markets are not random but move through distinct phases, each requiring different strategies and risk management approaches. Whether you're a systematic trader needing regime filters, a discretionary trader seeking market context, or a portfolio manager adjusting exposure, this classifier provides the institutional-grade market intelligence needed to navigate any market environment successfully.
Why This Indicator Exists
Most traders apply the same strategy regardless of market conditions, then wonder why their performance is inconsistent. This indicator addresses that critical flaw by:
Regime Classification: Identifies four distinct market states with clear characteristics
Regime Strength: Measures how strongly the market exhibits regime characteristics
Regime Persistence: Tracks how long the current regime has been in place
Regime Quality: Evaluates the reliability of the current regime classification
Session Awareness: Considers session context for regime analysis
Regime Transitions: Detects and signals regime changes for strategy adaptation
The classifier transforms the complex, often subjective process of market analysis into an objective, systematic framework that can be consistently applied across all instruments and timeframes.
Core Components Explained
1. ADX-Based Trend Detection
The Average Directional Index (ADX) is the primary tool for trend detection:
// ADX calculation
float atr_val = ta.rma(ta.tr(true), i_adx_period)
float up_move = high - high
float down_move = low - low
float plus_dm = up_move > down_move and up_move > 0 ? up_move : 0
float minus_dm = down_move > up_move and down_move > 0 ? down_move : 0
float plus_di = 100 * ta.rma(plus_dm, i_adx_period) / atr_val
float minus_di = 100 * ta.rma(minus_dm, i_adx_period) / atr_val
float adx = 100 * ta.rma(math.abs(plus_di - minus_di) / (plus_di + minus_di), i_adx_period)
ADX components:
ADX Value: Trend strength (0-100), regardless of direction
+DI: Bullish directional movement
-DI: Bearish directional movement
Trend Threshold: Minimum ADX for trend classification (default 25)
Directional Bias: +DI vs -DI for trend direction
ADX above 25 indicates a trending market, while below 25 suggests ranging or volatile conditions.
2. ATR-Based Volatility Analysis
The Average True Range (ATR) measures volatility and helps distinguish between different non-trending states:
// ATR analysis
float atr_current = ta.atr(i_atr_period)
float atr_average = ta.sma(atr_current, i_atr_period * 3)
float atr_ratio = atr_average > 0 ? atr_current / atr_average : 1.0
// Volatility thresholds
float expansion_threshold = i_atr_expansion_mult
float contraction_threshold = i_atr_contraction_mult
ATR components:
Current ATR: Recent volatility measurement
Average ATR: Long-term volatility baseline
ATR Ratio: Current volatility relative to average
Expansion Threshold: Ratio indicating high volatility (default 1.4)
Contraction Threshold: Ratio indicating low volatility (default 0.6)
ATR analysis helps distinguish between ranging (low volatility) and volatile (high volatility) markets when ADX is below the trend threshold.
3. Regime Classification Logic
The indicator classifies markets into four distinct regimes:
// Regime classification
int market_regime = 0
if adx >= i_adx_trend
market_regime := 1 // Trending
else if atr_ratio >= expansion_threshold and adx < i_adx_trend
market_regime := 3 // Volatile
else if atr_ratio <= contraction_threshold and adx < i_adx_trend
market_regime := 2 // Ranging
else
market_regime := 0 // Neutral
Regime types:
Trending (ADX ≥ 25): Strong directional movement with clear trend
Ranging (ADX < 25, ATR ratio ≤ 0.6): Low volatility, sideways movement
Volatile (ADX < 25, ATR ratio ≥ 1.4): High volatility, erratic movement
Neutral (ADX < 25, 0.6 < ATR ratio < 1.4): Transition between defined states
Each regime has distinct characteristics that require different trading approaches.
4. Regime Strength Measurement
Not all regimes are created equal - some are stronger and more reliable than others:
// Regime strength calculation
float regime_strength = 0.0
switch market_regime
1 => regime_strength := math.min(adx / 50.0 * 100, 100) // Trending strength
2 => regime_strength := math.min((1 - atr_ratio) / (1 - contraction_threshold) * 100, 100) // Ranging strength
3 => regime_strength := math.min((atr_ratio - 1) / (expansion_threshold - 1) * 100, 100) // Volatile strength
0 => regime_strength := 50.0 // Neutral default
Strength interpretation:
Trending Strength: Based on ADX value (higher ADX = stronger trend)
Ranging Strength: Based on how low volatility is (lower ATR = stronger range)
Volatile Strength: Based on how high volatility is (higher ATR = stronger volatility)
Neutral Strength: Fixed at 50% as baseline
Strength Range: 0-100% indicating regime confidence
Higher strength values indicate more reliable regime classification.
5. Regime Persistence Analysis
The duration of a regime provides additional context about its reliability:
// Regime persistence tracking
var int regime_bars = 0
var int regime_start_bar = 0
if market_regime == market_regime
regime_bars := regime_bars + 1
else
regime_bars := 1
regime_start_bar := bar_index
// Persistence score
float persistence_score = math.min(float(regime_bars) / i_persistence_lookback * 100, 100)
Persistence features:
Regime Bars: Number of consecutive bars in current regime
Regime Start: When the current regime began
Persistence Score: Normalized duration (0-100%)
Lookback Period: Reference period for normalization (default 50)
Mature Regimes: Higher persistence indicates established conditions
Long-lasting regimes are more reliable than newly formed ones.
6. Regime Quality Assessment
Quality evaluates how well the current market fits the regime characteristics:
// Quality assessment
float quality_score = 0.0
float adx_quality = adx / 50.0 * 50 // 50% weight
float atr_quality = market_regime == 2 ? (1 - atr_ratio) / (1 - contraction_threshold) * 50 :
market_regime == 3 ? (atr_ratio - 1) / (expansion_threshold - 1) * 50 : 25
quality_score := adx_quality + atr_quality
Quality components:
ADX Quality: How well trend strength matches regime expectations
ATR Quality: How well volatility matches regime expectations
Quality Score: Combined assessment (0-100%)
High Quality: Clear regime characteristics
Low Quality: Ambiguous or transitioning conditions
High quality scores indicate clear, unambiguous market conditions.
7. Session Context Integration
Market behavior varies significantly across trading sessions:
// Session analysis
bool asian_session = time(timeframe.period, "0000-0800")
bool london_session = time(timeframe.period, "0700-1600")
bool ny_session = time(timeframe.period, "1200-2100")
// Session-specific adjustments
float session_multiplier = 1.0
if london_session
session_multiplier := 1.2 // Higher volatility expected
else if asian_session
session_multiplier := 0.8 // Lower volatility expected
Session features:
Session Detection: Identifies major trading sessions
Session Multipliers: Adjusts expectations based on session characteristics
Session Persistence: Tracks regime duration within current session
Session Quality: Evaluates regime quality within session context
Session Transitions: Identifies regime changes at session opens/closes
Session context helps interpret regime changes and anticipate behavior.
Visual Elements
Regime Histogram: Color-coded bars showing current regime
Strength Meter: Visual representation of regime strength
Persistence Line: Shows regime duration over time
Quality Gauge: Quality score visualization
Background Colors: Regime-based background shading
Session Markers: Visual session boundaries
Dashboard: Real-time regime metrics
Transition Alerts: Visual regime change notifications
The dashboard displays:
1. Current market regime and confidence
2. Regime strength and persistence
3. Quality score and trend direction
4. Session context and behavior
5. Regime history and transitions
6. Recommended strategies for current regime
7. Risk management adjustments
8. Regime forecast based on patterns
Input Parameters
ADX Settings:
ADX Period: Trend strength calculation (default: 14)
Trend Threshold: Minimum ADX for trend regime (default: 25)
ADX Smoothing: Additional smoothing for ADX (default: 3)
ATR Settings:
ATR Period: Volatility calculation (default: 14)
Expansion Multiplier: High volatility threshold (default: 1.4)
Contraction Multiplier: Low volatility threshold (default: 0.6)
Analysis Settings:
Persistence Lookback: Reference for persistence score (default: 50)
Quality Smoothing: Smoothing for quality calculation (default: 5)
Session Awareness: Enable session analysis (default: true)
Visual Settings:
Color Scheme: Customizable regime colors
Background Shading: Enable regime backgrounds
Dashboard Display: Show metrics panel
Alert Settings: Configure regime change alerts
How to Use This Indicator
Step 1: Identify Current Regime
Check the dashboard for the current market regime. Each regime requires a different approach:
Trending: Use trend-following strategies, let winners run
Ranging: Use mean-reversion strategies, take profits at levels
Volatile: Reduce position size, use wider stops, or avoid trading
Neutral: Wait for clarity, reduce trading activity
Step 2: Assess Regime Strength
Higher strength indicates more reliable conditions. In strong regimes (80%+), you can be more aggressive with position sizing. In weak regimes (<50%), reduce exposure and wait for confirmation.
Step 3: Monitor Persistence
Newly formed regimes (<10 bars) may be false signals. Mature regimes (>20 bars) are more established and reliable. Consider regime persistence in your strategy selection.
Step 4: Evaluate Quality
High quality scores (>75%) indicate clear market conditions. Low quality scores (<50%) suggest ambiguity - reduce trading or wait for clarity.
Step 5: Consider Session Context
Regimes that persist across multiple sessions are more significant. Regime changes at session opens often set the tone for the session.
Step 6: Watch for Transitions
Regime transitions signal strategy changes. A shift from trending to ranging requires switching from trend-following to range-bound strategies.
Best Practices
Always adapt your strategy to the current regime - don't use a trending strategy in ranging markets
High strength + high quality = maximum confidence in regime classification
Low persistence regimes (<10 bars) may be false - wait for confirmation
Session transitions often trigger regime changes - be alert at session opens
Volatile regimes are dangerous for most traders - consider reducing activity
Regime persistence is key - the longer a regime persists, the more reliable it is
Quality scores below 50% suggest waiting for clarity
Combine regime analysis with your existing strategy for better results
Keep a regime journal to track how each instrument behaves in different regimes
Use regime transitions as signals to adjust your entire trading approach
Strategy Applications by Regime
Trending Regime:
Trend-following strategies (moving averages, ADX, momentum)
Let winners run to maximum targets
Use trailing stops to capture extended moves
Add to positions on pullbacks in trend direction
Higher position sizing due to clear direction
Ranging Regime:
Mean-reversion strategies (RSI, Stochastic, Bollinger Bands)
Take profits at support/resistance levels
Use fixed targets - don't let winners turn into losers
Fade extreme moves toward the range middle
Smaller position sizing due to limited moves
Volatile Regime:
Reduce position size significantly (50% or less)
Use wider stops to avoid premature exits
Consider sitting out until conditions improve
Focus on volatility breakout patterns if trading
Quick profit taking - volatile conditions reverse quickly
Neutral Regime:
Wait for clarity before taking new positions
Manage existing positions more actively
Reduce trading frequency
Look for regime transition signals
Focus on longer timeframe analysis for direction
Technical Implementation
Built with Pine Script v6 featuring:
Advanced ADX calculation with directional movement analysis
Multi-timeframe ATR analysis for volatility assessment
Regime classification with confirmation logic
Strength, persistence, and quality scoring systems
Session awareness with timezone handling
Comprehensive visualization with multiple display modes
Real-time dashboard with 10 key metrics
Alert conditions for regime changes and thresholds
Export functions for strategy integration
Historical regime tracking and pattern recognition
The code uses confirmed bars for all calculations to prevent repainting and ensure reliable regime classification.
Originality Statement
This indicator is original in its comprehensive approach to regime classification and market state analysis. While ADX and ATR are established tools, this indicator is justified because:
It synthesizes trend and volatility analysis into a unified regime classification system
The strength, persistence, and quality scoring provides multi-dimensional regime assessment
Session awareness adds critical context often missing from regime analysis
Regime transition detection helps traders adapt strategy changes proactively
The four-regime classification (Trending, Ranging, Volatile, Neutral) covers all market states
Quality assessment helps distinguish between clear and ambiguous market conditions
Persistence analysis identifies mature, reliable regimes versus new, potentially false ones
Comprehensive visualization makes complex regime analysis accessible and actionable
Export functions enable regime-based strategy filtering and adaptation
Each component provides unique insights: ADX shows trend, ATR shows volatility, strength shows conviction, persistence shows duration, and quality shows clarity
The indicator's value lies in transforming the abstract concept of "market conditions" into concrete, actionable classifications that traders can use to adapt their strategies systematically and consistently.
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 classification is a tool for understanding market conditions, not a prediction system.
Market regimes can change suddenly due to news events, economic data, or changes in market structure. Past regime behavior does not guarantee future patterns. The indicator's classifications 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 market conditions. Different regimes require different risk approaches - volatile regimes may require smaller positions and wider stops.
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

Momentum Pressure Gauge [JOAT] Momentum Pressure Gauge
Introduction
The Momentum Pressure Gauge is an advanced institutional-grade analysis tool designed to measure the underlying buying and selling pressure that drives market movements. This indicator goes beyond simple momentum oscillators by quantifying the actual pressure differential between buyers and sellers, incorporating volume analysis, detecting divergences, and identifying when momentum is reaching extreme levels. Understanding pressure and momentum is crucial because price often follows pressure - by measuring the force behind price movements, traders can anticipate future direction with greater confidence.
This tool is built for traders who understand that markets are driven by the constant battle between buyers and sellers, and that the outcome of this battle is reflected in pressure and momentum patterns. Whether you're a day trader timing entries with precision, a swing trader identifying trend strength, or a position trader spotting major reversals, this gauge provides the sophisticated pressure analysis needed to trade with the dominant force rather than against it.
Why This Indicator Exists
Most traders use basic momentum indicators without understanding the underlying pressure dynamics or volume participation. This indicator addresses that limitation by:
Pressure Analysis: Measures actual buying/selling pressure in each bar
Volume Weighting: Incorporates volume to confirm pressure significance
Momentum Scoring: Provides composite momentum scores with multiple factors
Divergence Detection: Identifies price/momentum divergences for early reversal signals
Extreme Zone Identification: Flags overbought/oversold conditions with pressure context
Energy Wave Analysis: Combines pressure with volume and price energy
The gauge transforms abstract momentum concepts into concrete pressure measurements that reveal the true force behind market movements.
Core Components Explained
1. Raw Pressure Calculation
The indicator measures buying and selling pressure in each bar:
// Raw buying/selling pressure
f_pressure_raw() =>
float range_val = high - low
float buy_pressure = range_val > 0 ? (close - low) / range_val : 0.5
float sell_pressure = range_val > 0 ? (high - close) / range_val : 0.5
// Apply smoothing
float pressure_ratio = ta.ema(raw_buy, i_pressure_len)
float pressure_smooth = ta.ema(pressure_ratio, i_smooth_len)
Pressure components:
Buy Pressure: Where price closed within the bar's range (0-1)
Sell Pressure: Complementary sell pressure (0-1)
Pressure Ratio: Buy pressure as a ratio
Smoothing: EMA smoothing for cleaner signals
Range Normalization: Pressure relative to bar's range
Pressure above 0.5 indicates buying dominance, below 0.5 indicates selling dominance.
2. Volume-Weighted Pressure
Volume analysis confirms the significance of pressure:
// Volume relative strength
float vol_sma = ta.sma(volume, i_pressure_len)
float vol_ratio = vol_sma > 0 ? volume / vol_sma : 1.0
float vol_weight = math.min(vol_ratio, 3.0) / 3.0 // Cap at 3x average
// Volume-weighted pressure
float vw_pressure = pressure_smooth * (0.7 + vol_weight * 0.3)
// Cumulative pressure
float cum_pressure = ta.sma(raw_buy, i_pressure_len) - 0.5 // Centered at 0
Volume features:
Volume Ratio: Current volume relative to average
Volume Weight: Normalized volume influence (0-1)
VW Pressure: Pressure adjusted for volume participation
Cumulative Pressure: Running pressure average
Volume Cap: Prevents extreme volume from distorting signals
High volume confirms pressure significance, while low volume questions its reliability.
3. Momentum Analysis
Multiple momentum factors are combined for comprehensive analysis:
// Pressure momentum (rate of change)
float pressure_momentum = pressure_smooth - pressure_smooth
// Pressure acceleration
float pressure_accel = pressure_momentum - pressure_momentum
// Composite pressure score (-100 to +100)
float composite_score = (pressure_smooth - 0.5) * 200
// Momentum-adjusted score
float momentum_adjustment = pressure_momentum * 100
float adjusted_score = composite_score + momentum_adjustment * 0.3
Momentum components:
Pressure Momentum: Rate of change in pressure
Pressure Acceleration: Change in momentum (second derivative)
Composite Score: Normalized pressure score (-100 to +100)
Momentum Adjustment: Score adjusted for momentum
Acceleration Detection: Identifies momentum shifts
Momentum analysis reveals not just current pressure but its direction and acceleration.
4. WaveTrend Integration
The WaveTrend oscillator adds an additional momentum layer:
f_wavetrend(int channel_len, int avg_len) =>
float ap = hlc3
float esa = ta.ema(ap, channel_len)
float d = ta.ema(math.abs(ap - esa), channel_len)
float ci = d > 0 ? (ap - esa) / (0.015 * d) : 0.0
float wt1_local = ta.ema(ci, avg_len)
float wt2_local = ta.sma(wt1_local, 4)
// WaveTrend signals
bool wt_bullish = wt1 > wt2 and wt1 > wt1
bool wt_bearish = wt1 < wt2 and wt1 < wt1
bool wt_oversold = wt1 < -60
bool wt_overbought = wt1 > 60
WaveTrend features:
WT1/WT2 Lines: Fast and slow WaveTrend lines
Cross Signals: Line crossovers for momentum changes
Extreme Levels: Overbought (>60) and oversold (<-60)
Trend Confirmation: Line slope for additional confirmation
Integration: Combined with pressure for confluence
WaveTrend provides an independent momentum confirmation.
5. Energy Wave Calculation
The indicator combines multiple energy sources:
// Energy combines pressure momentum with volume energy
float vol_energy = vol_sma > 0 ? (volume - vol_sma) / vol_sma * 100 : 0
float atr_14 = ta.atr(14)
float price_energy = atr_14 > 0 ? (close - open) / atr_14 * 100 : 0
float combined_energy = (pressure_momentum * 100 + vol_energy * 0.3 +
price_energy * 0.2) / 1.5
float energy_smooth = ta.ema(combined_energy, 5)
Energy components:
Volume Energy: Volume deviation from average
Price Energy: Price movement relative to ATR
Pressure Energy: Momentum contribution
Combined Energy: Weighted average of all energies
Energy Smoothing: EMA for cleaner energy signals
Energy waves show the underlying power driving market movements.
6. Divergence Detection
The indicator identifies price/momentum divergences:
// Price direction
float price_change = close - close
int price_dir = price_change > 0 ? 1 : price_change < 0 ? -1 : 0
// Pressure direction
int pressure_dir = pressure_momentum > i_momentum_thresh ? 1 :
pressure_momentum < -i_momentum_thresh ? -1 : 0
// Divergence detection
bool bullish_divergence = price_dir == -1 and pressure_dir == 1
bool bearish_divergence = price_dir == 1 and pressure_dir == -1
Divergence types:
Bullish Divergence: Price falling but pressure rising
Bearish Divergence: Price rising but pressure falling
Hidden Divergence: Continuation patterns
Regular Divergence: Reversal patterns
Threshold Filter: Minimum momentum for valid divergence
Divergences often precede significant price reversals.
7. State Classification System
The indicator classifies market states based on pressure:
// Pressure state
// 2 = extreme buying, 1 = buying, 0 = neutral, -1 = selling, -2 = extreme selling
var int pressure_state = 0
if pressure_smooth >= i_extreme_high
pressure_state := 2
else if pressure_smooth > 0.5 + i_momentum_thresh
pressure_state := 1
else if pressure_smooth <= i_extreme_low
pressure_state := -2
else if pressure_smooth < 0.5 - i_momentum_thresh
pressure_state := -1
// Momentum state
// 1 = accelerating, 0 = steady, -1 = decelerating
var int momentum_state = 0
if pressure_accel > i_momentum_thresh / 2
momentum_state := 1
else if pressure_accel < -i_momentum_thresh / 2
momentum_state := -1
State meanings:
Extreme Buying: Maximum buying pressure (>70%)
Buying: Moderate buying pressure (50-70%)
Neutral: Balanced pressure (40-60%)
Selling: Moderate selling pressure (30-50%)
Extreme Selling: Maximum selling pressure (<30%)
Accelerating: Momentum increasing
Decelerating: Momentum decreasing
State classification provides clear, actionable market conditions.
Visual Elements
Pressure Histogram: Main pressure display with gradient coloring
Multi-Layer Glow: Intensity-based glow effects
Energy Wave: Separate energy visualization
Momentum Line: Momentum rate of change
WaveTrend Lines: Additional momentum confirmation
Divergence Markers: Visual divergence signals
Extreme Zones: Highlighted overbought/oversold areas
Dashboard: Comprehensive metrics panel
Signal Labels: Key event labels with spacing
The dashboard displays:
1. Current pressure state and intensity
2. Momentum state and acceleration
3. Composite score and direction
4. Volume weight and analysis
5. Divergence status and alerts
6. Energy wave readings
7. Confluence quality score
8. WaveTrend status and signals
9. Overall signal strength
Input Parameters
Pressure Settings:
Pressure Period: Pressure calculation period (default: 14)
Smoothing Period: EMA smoothing (default: 5)
Momentum Lookback: Momentum calculation (default: 10)
Thresholds:
Extreme Buying: Maximum buying level (default: 0.7)
Extreme Selling: Maximum selling level (default: 0.3)
Momentum Threshold: Minimum momentum (default: 0.05)
WaveTrend Settings:
Channel Length: WT calculation period (default: 9)
Average Length: WT smoothing period (default: 12)
Enable WT: Toggle WaveTrend on/off
Visual Settings:
Color Scheme: Customizable pressure colors
Glow Effects: Enable visual enhancements
Show Zones: Display extreme zones
Show Labels: Control signal label frequency
How to Use This Indicator
Step 1: Assess Pressure State
Check the dashboard for current pressure state. Extreme states (>70% or <30%) often precede reversals, while moderate states suggest continuation.
Step 2: Analyze Momentum
Look at momentum direction and acceleration. Accelerating momentum in the pressure direction confirms strength, while deceleration warns of potential reversals.
Step 3: Check Volume Confirmation
Ensure pressure is supported by volume. High volume pressure is more reliable than low volume pressure.
Step 4: Watch for Divergences
Divergences are powerful reversal signals. A bullish divergence (price down, pressure up) suggests buying opportunity, while bearish divergence suggests selling.
Step 5: Monitor Energy Waves
Energy waves show the underlying power. Rising energy confirms current pressure, while falling energy suggests weakening.
Step 6: Use Extreme Zones
Extreme buying (>70%) often marks tops, while extreme selling (<30%) often marks bottoms. These are contrarian signals.
Best Practices
Extreme pressure states (>70% or <30%) often precede reversals
Divergences are most reliable at extreme levels
Volume confirmation is essential - pressure without volume is suspect
Momentum acceleration confirms pressure strength
Energy waves provide early warning of momentum shifts
Multiple timeframe analysis improves signal reliability
Combine with trend analysis for optimal results
Use WaveTrend crossovers for additional confirmation
Keep a pressure journal to track patterns
Be patient for the highest quality setups
Trading Applications
Momentum Trading:
Enter when pressure > 60% and accelerating
Add to positions as momentum increases
Exit when pressure decelerates or reverses
Use volume to confirm signal strength
Reversal Trading:
Look for extreme pressure (>70% or <30%)
Wait for divergence confirmation
Enter on first sign of pressure reversal
Target mean reversion to 50% level
Divergence Trading:
Identify clear price/pressure divergences
Confirm with volume and energy analysis
Enter on momentum shift confirmation
Use tight stops due to reversal nature
Strategy Integration
This indicator enhances any trading system:
Use pressure as a trend confirmation filter
Import momentum scores for signal weighting
Apply divergence detection for early warnings
Use extreme zones for contrarian signals
Integrate volume-weighted pressure for confirmation
Export pressure states for custom logic
Technical Implementation
Built with Pine Script v6 featuring:
Advanced pressure calculation with range normalization
Volume-weighted analysis with capping
Multi-factor momentum scoring system
WaveTrend oscillator integration
Energy wave calculation combining multiple sources
Sophisticated divergence detection with thresholds
State classification with multiple dimensions
Multi-layer visualization with glow effects
Real-time dashboard with 10 key metrics
Alert conditions for all major pressure events
The code uses confirmed bars for all calculations to prevent repainting.
Originality Statement
This indicator is original in its comprehensive approach to pressure and momentum analysis. While individual components (RSI, MACD, WaveTrend) are established tools, this indicator is justified because:
It synthesizes pressure analysis with volume weighting for more accurate signals
The energy wave concept combines multiple momentum sources into unified analysis
State classification provides clear, actionable market conditions
Divergence detection includes threshold filtering for higher quality signals
Multi-layer visualization with glow effects enhances readability
The dashboard presents complex pressure dynamics in an accessible format
Volume-weighted pressure adds confirmation often missing from momentum indicators
Acceleration analysis provides early warning of momentum shifts
Export functions enable integration with any trading system
Each component provides unique insights: pressure shows force, volume shows participation, momentum shows direction, energy shows power, and divergence shows potential reversals
The indicator's value lies in measuring the underlying forces that drive price movements rather than just tracking price itself, providing traders with deeper insight into market dynamics and potential future direction.
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. Pressure and momentum analysis is a tool for understanding market forces, not a prediction system.
Pressure and momentum can change suddenly due to news events, economic data, or changes in market sentiment. Extreme pressure states can persist longer than expected, and divergences can fail without warning. 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 your account and risk tolerance. Never trade against strong pressure without confirmation - the trend can remain in force longer than your account can survive.
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

Liquidity Structure Mapper [JOAT]Liquidity Structure Mapper
Introduction
The Liquidity Structure Mapper is an advanced market structure analysis tool designed to identify and visualize the key levels where institutional traders place their orders. This indicator goes beyond simple support and resistance by detecting swing points, equal highs/lows, liquidity zones, and the patterns that reveal professional market participation. Understanding market structure and liquidity is fundamental to successful trading - institutions don't enter at random levels, they hunt liquidity at specific price points, and this tool reveals those locations.
This indicator is built for traders who understand that markets are driven by liquidity - the accumulation and distribution of orders at key levels. Whether you're a day trader timing entries at structure, a swing trader identifying major turning points, or a position trader mapping long-term levels, this mapper provides the institutional-grade structural analysis needed to trade with the smart money rather than against it.
Why This Indicator Exists
Most traders draw support and resistance lines arbitrarily or use basic pivot points without understanding the underlying liquidity dynamics. This indicator addresses that limitation by:
Swing Point Detection: Identifies true market structure turning points
Equal Level Analysis: Finds equal highs and lows that form liquidity pools
Liquidity Zone Mapping: Visualizes areas of concentrated order flow
Zone Strength Scoring: Quantifies the reliability of each level
Sweep Detection: Identifies liquidity grabs before reversals
Proximity Analysis: Shows distance to nearest key levels
The mapper transforms abstract market structure concepts into concrete, actionable levels with measurable strength and reliability.
Core Components Explained
1. Swing Point Detection
The indicator identifies true swing points using pivot analysis:
// Swing point detection
float pivot_high = ta.pivothigh(high, i_swing_left, i_swing_right)
float pivot_low = ta.pivotlow(low, i_swing_left, i_swing_right)
// Process new swing high
if not na(pivot_high) and barstate.isconfirmed
int pivot_bar = bar_index - i_swing_right
SwingPoint new_sh = SwingPoint.new()
new_sh.price := pivot_high
new_sh.bar_idx := pivot_bar
new_sh.direction := 1
new_sh.is_valid := true
Swing features:
Left Bars: Bars to the left of pivot (default: 10)
Right Bars: Bars to the right for confirmation (default: 5)
Validation: Only confirmed swing points are marked
Visual Markers: Clear labels showing price and level type
Historical Tracking: Maintains history of all swing points
True swing points represent where the market actually changed direction - these are the foundation of market structure.
2. Equal Highs/Lows Detection
The indicator finds equal levels that form liquidity zones:
f_find_equal_levels(array swings, float threshold, int zone_type, color zone_col, float atr_val) =>
int sz = array.size(swings)
if sz >= 2 and barstate.isconfirmed
SwingPoint latest = array.get(swings, sz - 1)
for i = 0 to sz - 2
SwingPoint compare = array.get(swings, i)
if compare.is_valid and latest.is_valid
float pct = f_pct_diff(latest.price, compare.price)
if pct <= threshold
// Found equal level - create liquidity zone
float zone_top = math.max(latest.price, compare.price)
float zone_bottom = math.min(latest.price, compare.price)
// Add ATR buffer to zone
zone_top := zone_top + atr_val * 0.1
zone_bottom := zone_bottom - atr_val * 0.1
Equal level features:
Threshold: Percentage tolerance for equality (default: 0.1%)
Zone Creation: Forms zones around equal levels
ATR Buffer: Adds small buffer based on volatility
Zone Types: EQH (equal highs) and EQL (equal lows)
Liquidity Pools: Areas where stops cluster
Equal highs/lows are where stop losses and pending orders accumulate - they're liquidity magnets.
3. Liquidity Zone Management
The indicator tracks and manages liquidity zones dynamically:
// Zone interaction tracking
if array.size(liq_zones) > 0 and barstate.isconfirmed
for i = array.size(liq_zones) - 1 to 0
LiquidityZone zone = array.get(liq_zones, i)
if zone.is_active
// Check if price swept the zone
bool swept_high = zone.zone_type == 1 and high > zone.top
bool swept_low = zone.zone_type == -1 and low < zone.bottom
// Update zone age
zone.age_bars := zone.age_bars + 1
// Check for zone touches
bool touching_high = zone.zone_type == 1 and high >= zone.bottom and high <= zone.top
bool touching_low = zone.zone_type == -1 and low <= zone.top and low >= zone.bottom
if (touching_high or touching_low) and not (swept_high or swept_low)
zone.touch_count := zone.touch_count + 1
Zone features:
Active Zones: Zones that haven't been swept yet
Touch Count: Number of times price has tested the zone
Zone Age: How long the zone has existed
Sweep Detection: Identifies when liquidity is taken
Strength Updates: Zones get stronger with more touches
Zones that are tested multiple times become stronger and more significant.
4. Zone Strength Calculation
Each zone is assigned a strength score:
f_calc_zone_strength(int touches, int age, float zone_width, float atr_val) =>
float touch_score = math.min(float(touches) / 5.0 * 40, 40)
float age_score = math.max(30 - float(age) / 50.0 * 30, 0)
float width_score = math.min(atr_val / zone_width * 30, 30)
touch_score + age_score + width_score
Strength components:
Touch Score: More touches = stronger level (max 40 points)
Age Score: Fresher zones are more relevant (max 30 points)
Width Score: Tighter zones are more precise (max 30 points)
Total Strength: 0-100 indicating zone reliability
Visual Updates: Zone color intensifies with strength
Strength scoring helps prioritize which levels deserve more attention.
5. Structure Analysis Metrics
The indicator calculates structural relationships:
// Calculate structure metrics
float nearest_resistance = na
float nearest_support = na
// Find nearest resistance above current price
if array.size(swing_highs) > 0
for i = array.size(swing_highs) - 1 to 0
SwingPoint sh = array.get(swing_highs, i)
if sh.price > close and (na(nearest_resistance) or sh.price < nearest_resistance)
nearest_resistance := sh.price
// Find nearest support below current price
if array.size(swing_lows) > 0
for i = array.size(swing_lows) - 1 to 0
SwingPoint sl = array.get(swing_lows, i)
if sl.price < close and (na(nearest_support) or sl.price > nearest_support)
nearest_support := sl.price
// Structure bias calculation
float structure_bias = 0.0
if not na(dist_to_resistance) and not na(dist_to_support)
structure_bias := (dist_to_support - dist_to_resistance) /
(dist_to_support + dist_to_resistance)
Metrics include:
Nearest Resistance: Closest swing high above price
Nearest Support: Closest swing low below price
Distance Percentages: How far price is from each level
Structure Bias: Overall structural directional bias
Proximity Score: How close price is to key levels
These metrics provide context for current price position within the structure.
6. Proximity Analysis System
The indicator measures how close price is to key levels:
f_proximity_score(float price, float zone_top, float zone_bot) =>
float zone_mid = (zone_top + zone_bot) / 2
float dist = math.abs(price - zone_mid)
float zone_height = zone_top - zone_bot
math.max(100 - (dist / zone_height * 100), 0)
// Dynamic proximity labels
if i_show_prox_labels and barstate.islast
if not na(nearest_resistance) and resistance_proximity > 30
string res_label = "RESISTANCE " + str.tostring(nearest_resistance, "#.##") +
" Proximity: " + str.tostring(resistance_proximity, "#") + "%"
Proximity features:
Proximity Score: 0-100% showing closeness to levels
Dynamic Labels: Shows level price and proximity
Warning System: Alerts when approaching key levels
Background Colors: Visual warnings at high proximity
Distance Tracking: Real-time distance monitoring
Proximity analysis helps prepare for potential reactions at key levels.
Visual Elements
Swing Points: Clear markers for highs and lows with labels
Liquidity Zones: Color-coded zones with glow effects
Zone Strength: Visual intensity based on reliability
Swept Zones: Different styling for taken liquidity
Proximity Labels: Dynamic labels showing nearest levels
Warning Markers: Visual alerts at key level approaches
Dashboard: Comprehensive structure metrics
Background Shading: Subtle warnings at critical levels
The dashboard displays:
1. Active EQH and EQL zone counts
2. Nearest support and resistance levels
3. Proximity percentages to key levels
4. Zone strength distribution
5. Structure bias and metrics
6. Recent sweep activity
7. Level age and touch statistics
8. Trading recommendations based on structure
Input Parameters
Swing Detection:
Left Bars: Pivot lookback period (default: 10)
Right Bars: Confirmation period (default: 5)
Max Swings: Maximum swing levels to track (default: 20)
Show Swings: Display swing point markers
Equal Levels:
Equal Threshold: Percentage tolerance (default: 0.1%)
Show EQH/EQL: Display equal high/low zones
Zone Extension: How far zones extend (default: 50 bars)
Zone Settings:
Show Zones: Display liquidity zones
Zone Lookback: Historical zone tracking (default: 100)
Min Touches: Minimum touches for strength (default: 2)
ATR Buffer: Zone size multiplier (default: 0.15)
Visual Settings:
Color Scheme: Customizable colors for all elements
Glow Effects: Enable visual enhancements
Label Sizes: Adjustable text sizes
Dashboard Display: Show/hide metrics panel
How to Use This Indicator
Step 1: Identify Key Structure
Start by identifying major swing highs and lows. These form the foundation of market structure and define the overall market direction.
Step 2: Locate Liquidity Zones
Look for equal highs and lows that form liquidity zones. These are where stop losses accumulate and where institutions often target for liquidity grabs.
Step 3: Assess Zone Strength
Pay attention to zone strength scores. Zones with multiple touches (3+) and high strength (>70%) are more reliable for reactions.
Step 4: Monitor for Sweeps
Watch for price sweeping liquidity zones (breaking slightly beyond levels) and then reversing. These are often reversal signals.
Step 5: Use Proximity Analysis
When price approaches key levels (proximity > 70%), prepare for potential reactions. This is where entries or exits should be considered.
Step 6: Track Structure Bias
The structure bias shows whether price is closer to support or resistance. This can guide your directional bias.
Best Practices
The most reliable levels have multiple touches and high strength scores
Liquidity grabs (sweeps) often precede strong reversals
Fresh zones (newly formed) are often more significant than old ones
Combine structure with price action for confirmation
Higher timeframe structure overrides lower timeframe levels
Zone strength increases with each successful test
Be cautious at zones with very wide spreads - they're less precise
Watch for clusters of zones - these form major support/resistance areas
Keep a structure journal to track which levels hold best
Use structure for stop placement - just beyond key levels
4HR TF On BTC:
Trading Applications
Support/Resistance Trading:
Enter long near strong support zones
Enter short near strong resistance zones
Place stops just beyond the zone boundaries
Target the opposite zone or midpoint
Breakout Trading:
Wait for clear breaks of structure
Confirm with volume and momentum
Enter on retests of broken levels
Use zones as new support/resistance
Reversal Trading:
Look for liquidity sweeps beyond zones
Enter on first signs of reversal
Confirm with candlestick patterns
Target the opposite structure level
Strategy Integration
This indicator enhances any trading system:
Use structure levels for stop placement
Filter trades based on proximity to key levels
Time entries at strong support/resistance
Identify high-probability reversal zones
Export structure metrics for custom logic
Combine with trend analysis for optimal results
Technical Implementation
Built with Pine Script v6 featuring:
Advanced swing point detection with pivot analysis
Equal level identification with customizable thresholds
Dynamic liquidity zone management and tracking
Zone strength scoring with multiple factors
Real-time proximity analysis and warnings
Comprehensive structure metrics calculation
Visual effects including glow and gradient fills
Interactive dashboard with 8 key metrics
Alert conditions for all major structural events
Export functions for strategy integration
The code uses confirmed bars for all calculations to prevent repainting and ensure reliable structure identification.
Originality Statement
This indicator is original in its comprehensive approach to liquidity structure analysis and zone management. While swing point detection is a known concept, this indicator is justified because:
It synthesizes swing analysis with equal level detection to identify liquidity zones
The zone strength scoring system provides objective measures of level reliability
Dynamic zone management tracks the lifecycle of each liquidity area
Proximity analysis adds practical trading context to structure identification
Sweep detection identifies the patterns of liquidity grabs
The dashboard presents complex structural analysis in an accessible format
Visual elements including glow effects and gradients enhance readability
Export functions enable integration with any trading system
Each component provides unique insights: swing points show structure, equal levels show liquidity, strength shows reliability, and proximity shows opportunity
The indicator solves the real problem of identifying where institutions place orders rather than just drawing arbitrary lines
The indicator's value lies in transforming abstract market structure concepts into concrete, actionable levels with measurable properties that traders can use to make informed decisions about entries, exits, and risk management.
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. Market structure analysis is a tool for understanding price levels, not a prediction system.
Support and resistance levels can break without warning due to news events, economic data, or changes in market sentiment. Past reactions at levels do not guarantee future behavior. The indicator's levels are mathematical calculations based on historical price action and should be used in conjunction with other forms of analysis.
Always use proper risk management, including stop losses placed beyond key levels. Never assume a level will hold - always have a plan for when it breaks. Liquidity zones can be swept multiple times before a final reversal.
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

Directional Bias Aggregator [JOAT]Directional Bias Aggregator
Introduction
The Directional Bias Aggregator is a sophisticated multi-timeframe bias scoring system designed to measure and aggregate directional conviction across multiple timeframes. This indicator solves the critical problem of conflicting signals across different timeframes by providing a weighted, systematic approach to bias analysis. Understanding the true directional bias requires looking beyond the current timeframe - professional traders always consider the bigger picture, and this tool brings that institutional approach to your trading.
This indicator is built for traders who understand that trends exist on multiple timeframes simultaneously and that the highest probability trades occur when these timeframes align. Whether you're a day trader needing higher timeframe context, a swing trader confirming trend direction, or a position trader assessing long-term bias, this aggregator provides the comprehensive directional intelligence needed to trade with confidence and clarity.
Why This Indicator Exists
Most traders struggle with timeframe analysis - they might see a bullish signal on the 15-minute chart but bearish conditions on the 4-hour, leading to confusion and poor decisions. This indicator addresses that problem by:
Multi-Timeframe Analysis: Evaluates bias across up to four timeframes simultaneously
Weighted Aggregation: Assigns importance to each timeframe based on trading style
Bias Scoring: Provides numerical bias scores (-100 to +100) for objective analysis
Alignment Detection: Identifies when multiple timeframes agree on direction
Trend Integration: Adds trend filter to prevent trading against major moves
Conviction Measurement: Quantifies the strength of directional bias
The aggregator transforms the complex, often subjective process of multi-timeframe analysis into an objective, systematic framework that can be consistently applied.
Core Components Explained
1. Single Timeframe Bias Calculation
Each timeframe's bias is calculated using multiple indicators:
// Single timeframe bias calculation
f_calc_bias(float src_close, float src_high, float src_low) =>
// MA trend component
float ma_fast = ta.ema(src_close, i_ma_fast)
float ma_slow = ta.ema(src_close, i_ma_slow)
float ma_diff = ma_slow != 0 ? (ma_fast - ma_slow) / ma_slow * 100 : 0
float ma_score = math.max(math.min(ma_diff * 10, 100), -100)
// Price position component
float price_pos = 0.0
if src_close > ma_fast and ma_fast > ma_slow
price_pos := 100
else if src_close < ma_fast and ma_fast < ma_slow
price_pos := -100
// ... additional price position logic
// RSI component
float rsi_val = ta.rsi(src_close, i_rsi_len)
float rsi_score = (rsi_val - 50) * 2
// MACD component
float macd_line = ta.ema(src_close, i_macd_fast) - ta.ema(src_close, i_macd_slow)
float macd_signal = ta.ema(macd_line, i_macd_sig)
float macd_hist = macd_line - macd_signal
float atr_val = ta.atr(14)
float macd_score = atr_val > 0 ? (macd_hist > 0 ?
math.min(macd_hist / atr_val * 50, 100) :
math.max(macd_hist / atr_val * 50, -100)) : 0
// Composite score
float composite = ma_score * 0.35 + price_pos * 0.30 + rsi_score * 0.15 + macd_score * 0.20
composite
Bias components:
MA Trend (35% weight): Fast/slow EMA relationship and slope
Price Position (30% weight): Price relative to moving averages
RSI Momentum (15% weight): RSI centered at 50 for directional bias
MACD Histogram (20% weight): Trend acceleration/deceleration
Score Range: -100 (strong bearish) to +100 (strong bullish)
Neutral Zone: Scores between -30 and +30 considered neutral
Each component contributes unique directional information for comprehensive analysis.
2. Multi-Timeframe Data Requests
The indicator requests bias calculations from multiple timeframes:
// Request bias from each timeframe
f_request_bias(string tf) =>
request.security(syminfo.tickerid, tf, f_calc_bias(close, high, low) ,
lookahead=barmerge.lookahead_on)
float bias_tf1 = f_request_bias(i_tf1) // Fastest timeframe
float bias_tf2 = f_request_bias(i_tf2) // Medium timeframe
float bias_tf3 = f_request_bias(i_tf3) // Slow timeframe
float bias_tf4 = f_request_bias(i_tf4) // Slowest timeframe
MTF features:
Configurable Timeframes: User-defined timeframe selection
Confirmed Bars: Uses previous bar to prevent repainting
Lookahead Management: Proper security request handling
Current TF Bias: Also calculates bias on current timeframe
Data Validation: Handles missing or invalid data gracefully
The MTF system ensures you always have the bigger picture context.
3. Weighted Aggregation System
Timeframes are weighted based on their importance:
// Normalize weights
float total_weight = i_w1 + i_w2 + i_w3 + i_w4
float w1_norm = total_weight > 0 ? i_w1 / total_weight : 0.25
float w2_norm = total_weight > 0 ? i_w2 / total_weight : 0.25
float w3_norm = total_weight > 0 ? i_w3 / total_weight : 0.25
float w4_norm = total_weight > 0 ? i_w4 / total_weight : 0.25
// Aggregate bias score
float aggregate_bias = nz(bias_tf1) * w1_norm + nz(bias_tf2) * w2_norm +
nz(bias_tf3) * w3_norm + nz(bias_tf4) * w4_norm
// Smoothed aggregate
float smooth_bias = ta.ema(aggregate_bias, 3)
Weighting features:
Customizable Weights: Assign importance to each timeframe
Automatic Normalization: Ensures weights sum to 100%
Default Weights: Higher weight to slower timeframes (15%, 25%, 30%, 30%)
Smoothing: EMA smoothing for cleaner signals
Flexibility: Adjust weights based on trading style
The aggregation system creates a single, unified bias score from all timeframes.
4. Bias Alignment Analysis
The indicator measures how many timeframes agree on direction:
// Count aligned timeframes
int bullish_count = 0
int bearish_count = 0
if nz(bias_tf1) > i_weak_thresh
bullish_count += 1
else if nz(bias_tf1) < -i_weak_thresh
bearish_count += 1
// Repeat for TF2, TF3, TF4...
// Alignment score (0-4)
int alignment_score = math.max(bullish_count, bearish_count)
// Alignment direction
int alignment_direction = bullish_count > bearish_count ? 1 :
bearish_count > bullish_count ? -1 : 0
// Perfect alignment check
bool perfect_bullish = bullish_count == 4
bool perfect_bearish = bearish_count == 4
Alignment features:
Alignment Score: Number of timeframes agreeing (0-4)
Alignment Direction: Overall consensus direction
Perfect Alignment: All timeframes agree (strongest signal)
Weak Threshold: Minimum bias for alignment (default 30)
Mixed Signals: When timeframes disagree (lower confidence)
Higher alignment scores indicate higher probability setups.
5. Trend Filter Integration
An optional trend filter prevents trading against major moves:
// Trend filter
float trend_ma = ta.ema(close, i_trend_ma)
bool above_trend = close > trend_ma
bool below_trend = close < trend_ma
float trend_distance = trend_ma != 0 ? (close - trend_ma) / trend_ma * 100 : 0
// Trend-adjusted bias
float trend_adjusted_bias = smooth_bias
if i_use_trend
if above_trend and smooth_bias > 0
trend_adjusted_bias := smooth_bias * (1 + i_trend_weight)
else if below_trend and smooth_bias < 0
trend_adjusted_bias := smooth_bias * (1 + i_trend_weight)
else if above_trend and smooth_bias < 0
trend_adjusted_bias := smooth_bias * (1 - i_trend_weight * 0.5)
else if below_trend and smooth_bias > 0
trend_adjusted_bias := smooth_bias * (1 - i_trend_weight * 0.5)
Trend filter features:
Trend MA: Long-term moving average (default 200)
Trend Weight: Bonus for trading with trend (default 20%)
Penalty System: Reduces bias when trading against trend
Trend Distance: Measures how far price is from trend
Optional: Can be disabled for counter-trend strategies
The trend filter adds an extra layer of confirmation for directional bias.
6. Conviction and Consistency Metrics
The indicator measures the strength and stability of bias:
// Confluence quality
float confluence_quality = (float(alignment_score) / 4.0) *
(math.abs(smooth_bias) / 100.0) * 100
// Bias conviction score
float conviction_score = 0.0
conviction_score += float(alignment_score) * 15 // Max 60
conviction_score += math.abs(smooth_bias) * 0.3 // Max 30
if i_use_trend
if (above_trend and smooth_bias > 0) or (below_trend and smooth_bias < 0)
conviction_score += 10 // Trend alignment bonus
conviction_score := math.min(conviction_score, 100)
// Bias consistency
var int bias_consistency_counter = 0
if smooth_bias > i_weak_thresh and smooth_bias > i_weak_thresh
bias_consistency_counter := math.min(bias_consistency_counter + 1, 20)
else if smooth_bias < -i_weak_thresh and smooth_bias < -i_weak_thresh
bias_consistency_counter := math.min(bias_consistency_counter + 1, 20)
else
bias_consistency_counter := math.max(bias_consistency_counter - 1, 0)
float bias_consistency = float(bias_consistency_counter) / 20.0 * 100
Quality metrics:
Confluence Quality: Combines alignment and strength (0-100%)
Conviction Score: Overall signal strength (0-100)
Bias Consistency: How stable the bias has been (0-100%)
Momentum: Rate of change in bias
Acceleration: Change in bias momentum
These metrics help assess signal reliability and persistence.
Visual Elements
Bias Histogram: Main bias display with gradient coloring
Conviction Ribbon: Visual representation of conviction strength
MTF Breakdown Lines: Individual timeframe bias lines
Alignment Markers: Diamonds for perfect alignment
Momentum Plot: Bias momentum visualization
Background Colors: Regime-based background shading
Dashboard: Comprehensive metrics panel
Glow Effects: Intensity-based visual enhancements
The dashboard displays:
1. Individual timeframe biases and weights
2. Aggregate bias and trend-adjusted bias
3. Alignment score and direction
4. Confluence quality percentage
5. Conviction score and consistency
6. Bias momentum and acceleration
7. Trend filter status and distance
8. Signal strength and recommendations
Input Parameters
Timeframe Settings:
Timeframe 1-4: Individual timeframes for analysis
Default: 15m, 60m, 240m, Daily
Flexible: Can be any valid timeframe combination
Weighting Settings:
TF1-TF4 Weights: Individual importance weights
Default: 15%, 25%, 30%, 30% (favoring slower timeframes)
Total: Automatically normalized to 100%
Calculation Settings:
Fast/Slow MA: Bias calculation periods (default: 8/21)
RSI Period: Momentum oscillator (default: 14)
MACD Settings: Fast/Slow/Signal (default: 12/26/9)
Threshold Settings:
Strong Bias Threshold: Strong signal level (default: 60)
Weak Bias Threshold: Minimum bias for alignment (default: 30)
Trend Weight: Bonus for trend alignment (default: 20%)
How to Use This Indicator
Step 1: Analyze Individual Timeframes
Check the dashboard to see bias on each timeframe. Look for consistency - if most timeframes show the same direction, confidence is higher.
Step 2: Check Aggregate Bias
The aggregate bias provides a unified directional score. Values above 60 indicate strong bullish bias, below -60 indicate strong bearish bias.
Step 3: Verify Alignment
Higher alignment scores (3-4 timeframes) offer the highest probability setups. Perfect alignment (4/4) often precedes strong moves.
Step 4: Assess Conviction
High conviction scores (>75%) indicate strong, consistent bias. Low conviction (<50%) suggests uncertainty - wait for clarity.
Step 5: Consider Trend Filter
If enabled, ensure bias aligns with the major trend. Trading against the trend reduces conviction and increases risk.
Step 6: Monitor Momentum
Accelerating bias in the direction of alignment suggests the move is gaining strength. Decelerating bias warns of potential reversals.
Best Practices
Perfect alignment (4/4) provides the highest probability setups
Higher timeframe bias should generally override lower timeframe signals
Increasing conviction scores suggest strengthening trends
Divergence between timeframes often precedes reversals
Use the trend filter unless you're specifically trading counter-trend setups
Bias consistency is key - look for stable, persistent bias
Sudden changes in aggregate bias often signal regime shifts
Combine with price action for optimal entry timing
Adjust timeframe weights based on your trading style
Keep a bias journal to track how different instruments behave
Trading Applications
Trend Following:
Enter when bias > 60 on at least 3 timeframes
Add to positions as conviction increases
Stay in trades as long as bias remains aligned
Exit when bias weakens or reverses on slower timeframes
Mean Reversion:
Look for extreme bias (>80 or <-80) on faster timeframes
Enter when faster timeframe bias opposes slower timeframe
Target mean reversion to neutral bias levels
Quick exits - don't fight the longer-term bias
Breakout Trading:
Wait for bias alignment across all timeframes
Enter on breakouts with supporting bias momentum
Use wider stops due to potential volatility
Scale out as bias reaches extreme levels
Strategy Integration
This indicator enhances any trading system:
Use as a directional filter for existing strategies
Import aggregate bias for trend confirmation
Use alignment score as signal strength filter
Apply conviction scoring for position sizing
Integrate trend filter for additional safety
Export individual timeframe biases for custom logic
Technical Implementation
Built with Pine Script v6 featuring:
Multi-timeframe bias calculation with proper security requests
Weighted aggregation system with automatic normalization
Advanced alignment detection with perfect alignment alerts
Trend filter integration with adjustable weighting
Conviction and consistency scoring systems
Momentum and acceleration analysis
Comprehensive visualization with multi-layer effects
Real-time dashboard with 12 key metrics
Alert conditions for all major bias events
Export functions for strategy integration
The code uses confirmed bars and proper lookahead management to prevent repainting.
Originality Statement
This indicator is original in its comprehensive approach to multi-timeframe bias aggregation and scoring. While individual components (moving averages, RSI, MACD) are established tools, this indicator is justified because:
It synthesizes bias analysis across multiple timeframes into a unified scoring system
The weighted aggregation allows customization based on trading style and preferences
Alignment detection provides objective measures of timeframe consensus
The conviction scoring system quantifies signal strength and reliability
Trend filter integration adds an extra layer of confirmation
Consistency analysis identifies stable, persistent bias versus noisy fluctuations
The dashboard presents complex multi-timeframe analysis in an accessible format
Export functions enable integration with any trading system
Each timeframe contributes unique context: faster timeframes show immediate bias, slower timeframes show established trends
The indicator solves the real problem of conflicting signals across timeframes through systematic aggregation
The indicator's value lies in transforming the complex, often confusing world of multi-timeframe analysis into a clear, objective system that traders can use to make informed decisions with confidence.
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. Multi-timeframe analysis is a tool for understanding market context, not a prediction system.
Bias can change suddenly due to news events, economic data, or changes in market structure. Past bias 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 your account and risk tolerance. Strong bias alignment does not guarantee success - markets can remain irrational longer than you can remain solvent.
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

APEX V2 [JOAT]APEX V2
Introduction
APEX V2 Enhanced is an advanced open-source algorithmic trading strategy that synthesizes 9 proprietary analytical concepts through a sophisticated confluence system to generate high-probability trade signals. This strategy integrates Flow Absorption Module (FAM), Directional Bias Engine (DBE), Structure Mapping System (SMS), Volatility Classification (VCL), Momentum Divergence Module (MDM), Statistical Reversion Zones (SRZ), Order Flow Analysis (OFA), Anchor Deviation Bands, and Trend Momentum Signals into a unified trading framework with comprehensive risk management.
Unlike single-indicator strategies that produce frequent false signals, APEX V2 requires multi-dimensional confluence before executing trades. This confluence-based approach dramatically reduces false positives while capturing high-conviction institutional moves. The strategy includes adaptive position sizing based on risk percentage, dynamic stop loss and take profit levels, trailing stops, and real-time performance tracking through a comprehensive dashboard.
Why This Strategy Exists
This strategy addresses the fundamental challenge of trading: distinguishing high-probability setups from market noise. Individual analytical methods often produce conflicting signals, leading to whipsaws and losses. APEX V2 solves this by requiring multiple independent confirmation signals before entering trades, ensuring that:
Institutional Activity is Confirmed: FAM and OFA detect when large players are positioning
Directional Bias is Established: DBE quantifies market sentiment through probabilistic analysis
Structural Context is Validated: SMS identifies key support/resistance levels
Volatility Regime is Appropriate: VCL ensures trades occur in favorable volatility conditions
Momentum Divergence is Present: MDM confirms smart money positioning through multi-oscillator divergence
Mean Reversion Opportunity Exists: SRZ identifies statistical extremes for reversal trades
Order Flow is Toxic: OFA detects aggressive institutional buying/selling
Anchor Deviation is Extreme: Multi-timeframe VWAP deviation signals absorption zones
Trend Momentum Confirmation: Trend-following signals with minimal lag
Each analytical module provides a unique perspective on market structure. By requiring confluence across multiple dimensions, APEX V2 captures only the highest-quality setups where institutional activity, technical structure, momentum, volatility, and order flow all align.
Strategy Components Explained
1. Flow Absorption Module (FAM)
FAM analyzes VWAP deviation across 2-minute, 5-minute, and 15-minute timeframes to identify institutional liquidity absorption zones. When price deviates significantly from VWAP (default: 8.0 sigma on 2m/5m, 4.0 sigma on 15m) combined with volume surges (2.25x average) and sufficient relative volume (0.6+), FAM signals institutional absorption.
The strategy requires 2+ timeframe confirmation for FAM signals. Buy signals occur when price is below VWAP with volume surge across multiple timeframes (institutions absorbing at lows). Sell signals occur when price is above VWAP with volume surge (institutions distributing at highs).
FAM contributes 1 point to the confluence score when absorption is detected, indicating institutional players are actively positioning at price extremes.
2. Directional Bias Engine (DBE)
DBE calculates directional bias by analyzing the ratio of bullish vs bearish bars over a lookback period (default: 100 bars) combined with momentum analysis. The engine weights directional bias (60%) and momentum bias (40%) to produce a combined bias score ranging from -1.0 (extreme bearish) to +1.0 (extreme bullish).
When combined bias exceeds the threshold (default: 0.65), DBE signals bullish bias. When below -0.65, it signals bearish bias. This probabilistic approach quantifies market sentiment and filters trades against the prevailing bias.
DBE contributes 1 point to confluence when bias aligns with trade direction, ensuring trades flow with statistical probability rather than against it.
3. Structure Mapping System (SMS)
SMS detects structural pivot highs and pivot lows using configurable left/right bar parameters (default: 10 bars each). The system maintains arrays of the 10 most recent resistance and support levels, then checks if current price is within 1% of any tracked level.
When price approaches support (within 1% of recent pivot lows), SMS signals potential bounce. When price approaches resistance (within 1% of recent pivot highs), SMS signals potential rejection. These structural levels represent areas where price previously reversed, making them high-probability zones for future reversals.
SMS contributes 1 point to confluence when price is near support (for longs) or resistance (for shorts), providing structural context for entries.
4. Volatility Classification (VCL)
VCL classifies current volatility regime using ATR percentile ranking over a lookback period (default: 100 bars). The system calculates normalized ATR (ATR / price * 100) and determines its percentile rank. High volatility is defined as 70th percentile or above, low volatility as 30th percentile or below.
While VCL doesn't directly contribute to confluence scoring, it provides critical context displayed in the dashboard. High volatility regimes may require wider stops, while low volatility regimes may produce more reliable mean reversion signals.
The strategy adapts to volatility by using ATR-based position sizing and stop loss placement, ensuring risk management scales with market conditions.
5. Momentum Divergence Module (MDM)
MDM detects multi-oscillator divergences by comparing price pivots with RSI pivots. Bullish divergence occurs when price makes lower lows but RSI makes higher lows (indicating weakening selling pressure). Bearish divergence occurs when price makes higher highs but RSI makes lower highs (indicating weakening buying pressure).
The system tracks divergence counts and requires a minimum number of divergences (default: 2) before signaling. This prevents single-divergence false signals and ensures sustained divergence patterns.
MDM contributes 1 point to confluence when divergence aligns with trade direction, confirming that smart money is positioning against the prevailing price trend.
6. Statistical Reversion Zones (SRZ)
SRZ combines Bollinger Bands with RSI to identify statistical extremes for mean reversion trades. The system calculates Bollinger Bands (default: 20-period, 2.0 standard deviations) and RSI (default: 14-period) to detect oversold and overbought conditions.
Oversold signals occur when price is below the lower Bollinger Band AND RSI is below 30. Overbought signals occur when price is above the upper Bollinger Band AND RSI is above 70. These dual conditions ensure both price and momentum are at extremes.
SRZ contributes 1 point to confluence when statistical extremes align with trade direction, identifying high-probability mean reversion opportunities.
7. Order Flow Analysis (OFA)
OFA detects institutional order flow through toxicity analysis and absorption coefficient calculation. The toxicity index measures aggressive vs passive order flow by analyzing candle position and volume. When toxicity exceeds threshold (default: 0.7), it indicates institutions are aggressively taking liquidity.
The absorption coefficient quantifies institutional absorption by measuring volume intensity relative to price movement. High absorption (default: 0.75+) with minimal price movement indicates institutions are positioning without moving price significantly.
OFA calculates a confidence score (0-100%) based on absorption strength and toxicity. When confidence exceeds minimum threshold (default: 75%), OFA signals high-probability institutional activity.
OFA contributes 1 point to confluence when institutional footprints are detected with high confidence, confirming large players are actively positioning.
8. Anchor Deviation Bands
Anchor Deviation analyzes multi-timeframe VWAP deviation (2m, 5m, 15m) combined with oscillator sigma gap confirmation. The system calculates VWAP deviation using configurable methods (Price Volatility, Z-Score, or Spread StDev) and measures the gap between VWAP deviation and oscillator z-scores.
Buy signals occur when 2+ timeframes show negative VWAP deviation (price below VWAP) with 2+ timeframes confirming oscillator gap. Sell signals occur when 2+ timeframes show positive VWAP deviation with gap confirmation.
Anchor Deviation contributes 1 point to confluence when multi-timeframe tension is detected, indicating price is at extreme deviation from institutional reference levels.
9. Trend Momentum Signals
Trend Momentum Signals use a zero-lag EMA combined with volatility bands and trend strength analysis. The system calculates a zero-lag EMA by compensating for lag (EMA of price + (price - price )), then applies volatility bands using ATR multiplier (default: 1.5x).
The trend strength score is calculated by comparing current zero-lag EMA with historical values over a loop range (default: 1-70 bars). Long signals occur when trend score exceeds uptrend threshold (default: 5) AND price is above the upper volatility band. Short signals occur when trend score is below downtrend threshold (default: -5) AND price is below the lower volatility band.
Trend Momentum contributes 1 point to confluence when trend signals align with trade direction, providing trend-following confirmation with minimal lag.
10. Deviation Reversion System Component
The Deviation Reversion System component calculates deviation levels from a moving average (configurable: WMA, SMA, RMA, EMA, HMA). Three deviation levels are defined (default: 1.3%, 7.5%, 13.3%) representing progressively extreme deviations from the mean.
Buy signals occur when price drops below the first deviation level (mean - 1.3%). Sell signals occur when price rises above the first deviation level (mean + 1.3%). This component identifies when price has deviated sufficiently from its mean to warrant mean reversion trades.
Deviation Reversion contributes 1 point to confluence when price is at deviation extremes, complementing the SRZ module with a simpler percentage-based approach.
Confluence System & Signal Aggregation
APEX V2's core innovation is its confluence system. The strategy counts bullish and bearish signals from all 9 analytical modules:
FAM: Absorption buy/sell (2+ timeframe confirmation)
DBE: Bullish/bearish bias (>0.65 or <-0.65)
SMS: Near support/resistance (within 1%)
MDM: Bullish/bearish divergence (2+ divergences)
SRZ: Oversold/overbought (BB + RSI extremes)
OFA: Institutional buy/sell (75%+ confidence)
Anchor Deviation: Tension buy/sell (2+ timeframe + gap confirmation)
Deviation Reversion: Buy/sell signal (price at deviation levels)
Trend Momentum: Long/short signal (trend score + volatility bands)
When confluence mode is enabled (default: ON), the strategy requires a minimum number of modules to agree (default: 3 out of 9) before executing trades. This dramatically reduces false signals by ensuring multiple independent perspectives confirm the setup.
If both long and short signals meet confluence requirements simultaneously, the strategy selects the direction with more confirming modules. If tied, no trade is executed to avoid ambiguous setups.
Risk Management System
APEX V2 includes comprehensive risk management:
Position Sizing: Calculated based on risk per trade percentage (default: 2% of equity). The system calculates stop distance using ATR and sizes positions so that if stopped out, the loss equals exactly 2% of account equity.
Stop Loss: Set at a percentage below entry (default: 2% for longs, 2% above for shorts). Stops are placed immediately upon entry to limit maximum loss per trade.
Take Profit: Set at a percentage above entry (default: 4% for longs, 4% below for shorts). This provides a 2:1 reward-to-risk ratio.
Trailing Stop: Activates when take profit level is reached, then trails price by a percentage (default: 1.5%). This locks in profits while allowing winners to run.
Reversal Exits: If an opposite signal meets confluence requirements while in a position, the strategy immediately closes the current position. This prevents holding losing positions when market structure shifts.
Strategy Properties & Backtesting Parameters
The strategy uses realistic backtesting parameters to avoid misleading results:
Initial Capital: $10,000 (realistic for average retail trader)
Position Size: 100% of equity (controlled by risk-based position sizing)
Pyramiding: 3 (allows up to 3 positions in same direction)
Commission: Should be set to realistic levels (0.1% for crypto, 0.05% for forex, $1-5 per trade for stocks)
Slippage: Should be set to realistic levels (5-10 ticks for liquid markets)
Risk Per Trade: 2% (sustainable risk level)
Stop Loss: 2% (prevents catastrophic losses)
Take Profit: 4% (2:1 reward-to-risk ratio)
These parameters ensure backtesting results reflect realistic trading conditions. The strategy is designed to generate 100+ trades over a sufficient dataset to produce statistically significant results.
Visual Elements
FAM Gradient Ribbon: 5-layer cyan/magenta ribbon showing liquidity absorption intensity around VWAP
OFA Gradient Ribbon: 5-layer gold/indigo ribbon showing institutional order flow intensity
Anchor Deviation Ribbon: 5-layer teal/purple ribbon showing multi-timeframe VWAP tension
Entry Signals: Green triangle up for LONG entries, red triangle down for SHORT entries
Position Markers: Small circles below/above bars indicating active positions
Stop Loss Lines: Red lines showing stop loss levels for active positions
Take Profit Lines: Green lines showing take profit targets for active positions
Average Entry Price: White line showing average entry price for active positions
Comprehensive Dashboard: Real-time metrics including position status, P&L, signal confluence, individual module status, and performance metrics
Dashboard Metrics
The dashboard displays 20+ real-time metrics:
Position Status:
Status: LONG, SHORT, or FLAT
Position Size: Current position quantity
P&L: Open profit/loss in currency and percentage
Signal Confluence:
Bull Signals: Count of bullish indicators (X/9) with checkmark if confluence met
Bear Signals: Count of bearish indicators (X/9) with checkmark if confluence met
Individual Indicator Status:
FAM: BUY/SELL with deviation value
DBE: BULL/BEAR with bias score
SMS: SUP/RES (support/resistance proximity)
VCL: HIGH/LOW/NORM with percentile
MDM: BULL/BEAR with RSI value
SRZ: OS/OB (oversold/overbought) with RSI value
OFA: INST+/INST-/TOX+/TOX- with confidence percentage
ADB: BUY/SELL with deviation value
TMS: LONG/SHORT with trend score
Performance Metrics:
Win Rate: Percentage and win/loss ratio
Net Profit: Currency and percentage return
Equity: Current equity and percentage change from initial capital
Input Parameters
Strategy Settings:
Enable LONG/SHORT Trades: Toggle trade directions
Require Multi-Module Confluence: Enable/disable confluence requirement
Minimum Confluence Count: Number of modules that must agree (1-7, default: 3)
FAM Settings:
Enable FAM, VWAP Mode, Deviation Method, Volume Lookback, Volume Surge Multiplier, RVOL Threshold, 2m/5m/15m Thresholds, Show Gradient Ribbon
DBE Settings:
Enable DBE, Bias Lookback, Bias Threshold, Momentum Weight
SMS Settings:
Enable SMS, Pivot Left/Right Bars, Structure Lookback
VCL Settings:
Enable VCL, ATR Length, Regime Lookback, High/Low Vol Thresholds
MDM Settings:
Enable MDM, RSI Length, Pivot Lookback, Min Divergences
SRZ Settings:
Enable SRZ, Bollinger Length/Multiplier, RSI Length, RSI Overbought/Oversold
OFA Settings:
Enable OFA, Toxicity Lookback/Threshold, Min Absorption Coefficient, Minimum Confidence %, Show Gradient Ribbon
Anchor Deviation Settings:
Enable Anchor Deviation, VWAP Dev Mode, 2m/5m/15m VWAP Thresholds, 2m/5m/15m Osc σ-Gap Thresholds, Show Gradient Ribbon
Deviation Reversion Settings:
Enable Deviation Reversion System, MA Type, MA Period, Deviation 1/2/3 percentages
Trend Momentum Settings:
Enable Trend Momentum Signals, Zero Lag Length, Volatility Multiplier, Loop Start/End, Threshold Uptrend/Downtrend
Risk Management Settings:
Enable Stop Loss, Stop Loss %, Enable Take Profit, Take Profit %, Enable Trailing Stop, Trailing Stop %, Risk Per Trade %
Visualization Settings:
Show Entry/Exit Signals, Show Dashboard, Show All Gradient Ribbons, Ribbon Brightness Adjust
How to Use This Strategy
Step 1: Configure Backtesting Parameters
Set realistic commission and slippage in Strategy Properties. For crypto: 0.1% commission, 10 ticks slippage. For forex: 0.05% commission, 5 ticks slippage. For stocks: $1-5 per trade commission, 5 ticks slippage.
Step 2: Set Risk Parameters
Configure Risk Per Trade (default: 2%), Stop Loss (default: 2%), and Take Profit (default: 4%). These provide sustainable risk management with 2:1 reward-to-risk ratio.
Step 3: Choose Confluence Level
Set Minimum Confluence Count based on your risk tolerance. Higher confluence (4-5 indicators) produces fewer but higher-quality signals. Lower confluence (2-3 indicators) produces more signals but with more false positives.
Step 4: Enable/Disable Indicators
Toggle individual modules based on market conditions and your trading style. For trending markets, emphasize DBE, Trend Momentum, and Anchor Deviation. For ranging markets, emphasize SRZ, MDM, and Deviation Reversion.
Step 5: Monitor Dashboard
Watch the dashboard for signal confluence. When Bull Signals shows 3+/9 with checkmark, the strategy is ready to enter long. When Bear Signals shows 3+/9 with checkmark, ready to enter short.
Step 6: Review Individual Indicators
Check which specific modules are signaling. High-quality setups show alignment across multiple module types (institutional + technical + momentum + volatility).
Step 7: Backtest on Sufficient Data
Run backtests on datasets that generate 100+ trades for statistical significance. Review win rate, net profit, maximum drawdown, and profit factor.
Step 8: Optimize Parameters
Adjust module parameters for your specific instrument and timeframe. Avoid over-optimization - parameters should work across multiple instruments and time periods.
Step 9: Forward Test
After backtesting, forward test on paper trading or small live positions to validate strategy performance in real market conditions.
Step 10: Monitor Performance
Track Win Rate, Net Profit, and Equity metrics in the dashboard. If performance degrades, re-evaluate parameters or market conditions.
Best Practices
Use on liquid instruments with sufficient volume for reliable signals
Higher confluence (4-5 modules) is recommended for beginners to reduce false signals
Lower confluence (2-3 modules) can be used by experienced traders who can filter signals manually
Backtest on multiple timeframes (5m, 15m, 1h, 4h) to find optimal timeframe for your instrument
Use realistic commission and slippage - overly optimistic parameters produce misleading results
Risk no more than 2% per trade to ensure account survival during drawdown periods
Monitor VCL (Volatility Classification) - high volatility may require wider stops or reduced position size
Combine with higher timeframe trend analysis - trading with the trend improves win rate
Review individual module signals to understand why confluence was met
Disable modules that consistently produce false signals for your specific instrument
Enable trailing stops to lock in profits on winning trades
Use pyramiding (default: 3) to add to winning positions when additional confluence signals appear
Avoid trading during major news events - volatility spikes can invalidate technical signals
Backtest over multiple market conditions (trending, ranging, high volatility, low volatility)
Forward test for at least 100 trades before committing significant capital
Strategy Limitations
Requires sufficient historical data for all modules - may not work well on newly listed instruments
Multi-timeframe analysis (FAM, Anchor Deviation) requires data availability on 2m, 5m, 15m timeframes
Confluence requirement reduces trade frequency - may produce few signals on some instruments/timeframes
Backtesting results are historical and do not guarantee future performance
Strategy performance degrades during extreme volatility events (flash crashes, circuit breakers)
Commission and slippage significantly impact profitability - must use realistic values
Pyramiding can amplify losses if market reverses after adding to position
Stop loss placement using fixed percentage may be suboptimal during volatility regime changes
Module parameters optimized for one instrument may not work on others
Requires regular monitoring and parameter adjustment as market conditions evolve
Dashboard metrics are real-time snapshots and can change rapidly during volatile periods
Strategy assumes sufficient liquidity to execute at desired prices - may not work on illiquid instruments
Trailing stops can be triggered by normal volatility, closing winning trades prematurely
Reversal exits may close positions too early if opposite signal is temporary
Technical Implementation
Built with Pine Script v6 using:
9 independent analytical modules with individual enable/disable controls
Multi-timeframe security requests for FAM and Anchor Deviation (2m, 5m, 15m)
Confluence-based signal aggregation with configurable minimum threshold
Risk-based position sizing using ATR and account equity
Dynamic stop loss, take profit, and trailing stop management
Strategy.entry and strategy.exit functions for automated trade execution
Reversal exit logic to close positions when opposite confluence is met
Three 5-layer gradient ribbons (FAM, OFA, Anchor Deviation) with progressive transparency
Comprehensive dashboard with 20+ real-time metrics using table visualization
5 alert conditions for trade signals and position changes
Performance tracking (win rate, net profit, equity) displayed in dashboard
Pyramiding support (up to 3 positions) for scaling into winning trades
The code is fully open-source and can be modified to suit individual trading styles and risk tolerances.
Originality Statement
This strategy is original in its multi-confluence approach to algorithmic trading. The strategy synthesizes multiple analytical concepts into a unified framework:
It synthesizes 9 proprietary analytical concepts into a unified confluence system
The confluence requirement dramatically reduces false signals compared to single-method strategies
Each concept provides a unique perspective: institutional activity (FAM, OFA), directional bias (DBE), structural context (SMS), volatility regime (VCL), momentum divergence (MDM), mean reversion (SRZ), anchor deviation (multi-timeframe), and trend following (Trend Momentum)
Risk management system uses ATR-based position sizing to risk exactly 2% per trade regardless of stop distance
Reversal exit logic closes positions when opposite confluence is met, preventing holding losing positions during structure shifts
Comprehensive dashboard synthesizes 20+ metrics into actionable intelligence
Three gradient ribbons (FAM, OFA, Anchor Deviation) provide visual confirmation of institutional activity and order flow
Strategy is designed with realistic backtesting parameters (commission, slippage, position sizing) to avoid misleading results
Pyramiding support allows scaling into winning positions when additional confluence appears
Individual module enable/disable controls allow customization for different market conditions and trading styles
The strategy's value lies in its systematic approach to trade selection through multi-dimensional confluence. By requiring agreement across institutional activity, technical structure, momentum, volatility, and order flow, APEX V2 captures only the highest-quality setups where all factors align. This reduces emotional decision-making and provides a repeatable, testable framework for algorithmic trading.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Past performance does not guarantee future results. Backtesting results are hypothetical and may not reflect actual trading performance. Always use proper risk management, never risk more than you can afford to lose, and thoroughly test any strategy on paper before committing real capital. Commission, slippage, and market conditions significantly impact profitability. No strategy works in all market conditions. Regular monitoring and parameter adjustment are required.
-Made with passion by officialjackofalltrades
Strategy

Institutional Footprint Scanner [JOAT]Institutional Footprint Scanner
Introduction
The Institutional Footprint Scanner (IFS) is an advanced open-source order flow analysis indicator that detects institutional trading activity through multi-dimensional market microstructure analysis. This indicator combines Order Flow Toxicity Index, Volume Profile with Point of Control (POC), Absorption Coefficient analysis, Smart Money Divergence detection, Liquidity Void identification, Footprint Clustering, Tape Reading metrics, and Iceberg Order detection to reveal when large institutional players are actively positioning in the market.
Unlike basic volume indicators that simply show volume bars, IFS quantifies institutional behavior through sophisticated algorithms that analyze aggressive vs passive order flow, volume distribution across price levels, absorption patterns, market depth proxies, and hidden liquidity. The indicator synthesizes these multiple perspectives into a unified confidence score and visualizes institutional activity through a dynamic 9-layer gradient ribbon, color-coded chart overlays, and a comprehensive real-time dashboard.
Why This Indicator Exists
This indicator addresses the challenge of identifying institutional order flow in real-time without access to Level 2 order book data. When large institutional players enter positions, they create detectable signatures across multiple market dimensions. IFS systematically detects these patterns to reveal:
Order Flow Toxicity: Measures aggressive vs passive flow to identify when institutions are aggressively taking liquidity
Volume Profile Analysis: Identifies Point of Control (POC), Value Area High/Low, and high/low volume nodes
Absorption Coefficient: Quantifies institutional absorption strength when high volume produces minimal price movement
Market Microstructure: Analyzes spread dynamics and market depth to detect market maker behavior
Smart Money Divergence: Detects multi-oscillator divergences (RSI, MFI, CVD) indicating institutional positioning
Liquidity Void Detection: Identifies areas with no institutional interest (low volume + narrow range)
Footprint Clustering: Tracks and clusters institutional footprints to identify accumulation/distribution zones
Tape Reading Metrics: Simulates Level 2 order book analysis through aggressive/passive volume classification
Iceberg Order Detection: Identifies hidden institutional liquidity through repeated absorption at same price levels
9-Layer Gradient Ribbon: Visualizes order flow intensity through dynamic color-coded ribbon around institutional VWAP
Institutional Dashboard: Displays 13+ real-time metrics including confidence, toxicity, absorption, POC distance, and more
Each component provides unique intelligence. Toxicity shows aggressive flow, Volume Profile shows price acceptance, Absorption shows institutional positioning, Microstructure shows market maker behavior, Divergence shows smart money positioning, and Clustering shows conviction. Together, they create a comprehensive institutional detection system.
Core Components Explained
1. Order Flow Toxicity Index
The Toxicity Index measures the ratio of aggressive order flow (market orders taking liquidity) vs passive flow (limit orders providing liquidity). The algorithm analyzes each candle's closing position within its range to classify order flow:
Aggressive Buy Flow: Candles that close in the top 25% of their range (above 75% threshold) with volume are classified as aggressive buying. This indicates buyers are urgently taking liquidity by hitting ask prices, pushing price toward the high.
Aggressive Sell Flow: Candles that close in the bottom 25% of their range (below 25% threshold) with volume are classified as aggressive selling. This indicates sellers are urgently taking liquidity by hitting bid prices, pushing price toward the low.
Passive Flow: Candles closing in the middle 50% of their range are classified as passive flow, indicating balanced limit order activity without urgency.
The system accumulates volume-weighted flow over the lookback period (default: 20 bars) and calculates toxicity ratios. When buy toxicity exceeds threshold (default: 0.7 or 70%), it signals institutions are aggressively accumulating. When sell toxicity exceeds threshold, it signals aggressive distribution.
High toxicity indicates institutional urgency - large players are willing to pay the spread and move price to establish positions quickly, typically preceding significant directional moves.
2. Volume Profile with POC Detection
IFS calculates a volume profile by dividing the price range into bins (default: 20 bins) and accumulating volume at each price level over the lookback period (default: 100 bars). This creates a histogram showing which price levels attracted the most trading activity.
How Volume Profile Works:
The algorithm divides the price range (highest high to lowest low) into equal-sized bins. For each historical bar, it determines which bin the price falls into and adds that bar's volume to the bin's total. After processing all bars, the result is a distribution showing volume concentration across price levels.
Point of Control (POC): `The price level with the highest accumulated volume`. This represents the price where the most trading occurred - a critical support/resistance level. Institutions often defend POC levels because they represent fair value where significant positions were established.
Value Area High (VAH) and Value Area Low (VAL): These define the range containing approximately 70% of total volume. The Value Area represents the price range where the majority of trading activity occurred. Price outside the Value Area is considered at extremes.
Trading Significance:
When price approaches POC (within 2% by default), expect strong support or resistance. POC acts as a magnet - price tends to gravitate toward high-volume nodes. When price is above VAH, it's in overbought territory. When below VAL, it's in oversold territory. Inside the Value Area indicates balanced, fair-value trading.
The indicator tracks POC distance in real-time and displays it in the dashboard, alerting traders when price approaches this high-probability reversal zone.
3. Absorption Coefficient Analysis
The Absorption Coefficient quantifies institutional absorption by measuring volume intensity relative to price movement. This reveals when large players are accumulating or distributing positions without moving price significantly.
How Absorption Works:
The algorithm calculates two key ratios:
Body Ratio: Measures the candle body size relative to total range. A small body ratio (close near open) indicates price didn't move much despite trading activity.
Volume Ratio: Compares current volume to the 20-bar average. A high volume ratio (2x, 3x, or more) indicates elevated trading activity.
Absorption Calculation:
Absorption coefficient = Volume Ratio × (1 - Body Ratio)
This formula produces high values when volume is elevated BUT price movement is minimal. This is the signature of institutional absorption - large players are patiently absorbing available liquidity at a specific price level without pushing price away.
Directional Absorption:
The system determines direction based on candle color. Bullish candles (close > open) produce positive directional absorption, indicating institutional buying. Bearish candles produce negative directional absorption, indicating institutional selling.
Trading Significance:
High absorption (above 0.75 by default) indicates institutions are positioning. When combined with high volume but minimal price movement, it suggests large players are absorbing all available liquidity at current levels. This often precedes significant moves once absorption is complete and institutions begin actively moving price.
4. Market Microstructure Analysis
IFS analyzes market microstructure through spread dynamics and depth proxies to detect market maker behavior and order book depth without requiring Level 2 data.
Spread Analysis:
The algorithm calculates the candle range (high - low) as a percentage of close price, then compares it to the average spread over the lookback period (default: 20 bars). The spread z-score measures how many standard deviations current spread is from average.
Tight Spreads (< 70% of average): Indicate market makers are actively providing liquidity. This is normal, healthy market conditions where bid-ask spreads are narrow and order book depth is good. Tight spreads suggest low risk and stable conditions.
Wide Spreads (> 150% of average): Indicate market makers are withdrawing liquidity. This occurs during risk-off events, before major moves, or when institutions are positioning. Wide spreads signal caution - liquidity is drying up and volatility may spike.
Depth Proxy:
The system estimates order book depth by calculating volume relative to spread. High volume with tight spreads indicates deep order book - many limit orders providing liquidity. Low volume with wide spreads indicates shallow order book - few limit orders, high slippage risk.
Market Maker Activity Detection:
The indicator classifies market maker behavior as "Providing" (tight spreads, deep market), "Withdrawing" (wide spreads, shallow market), or "Neutral". Market maker withdrawal often precedes significant moves as institutions clear out liquidity before pushing price.
Trading Significance:
Deep markets with tight spreads are ideal for entries - low slippage, good liquidity. Shallow markets with wide spreads require caution - entries may experience significant slippage. Market maker withdrawal signals potential volatility ahead.
5. Smart Money Divergence Engine
IFS detects divergences across multiple oscillators (RSI, MFI, Cumulative Volume Delta) to identify when smart money is positioning against the prevailing price trend. Divergences reveal hidden strength or weakness not visible in price action alone.
Three Oscillators Analyzed:
RSI (Relative Strength Index): Measures momentum on a 0-100 scale. RSI above 70 indicates overbought, below 30 indicates oversold. RSI divergence shows momentum weakening despite price movement.
MFI (Money Flow Index): Similar to RSI but volume-weighted, measuring money flow pressure. MFI divergence shows money flow weakening despite price movement, indicating institutions are not participating in the move.
CVD (Cumulative Volume Delta): Tracks cumulative buy vs sell volume. Positive CVD indicates net buying pressure, negative indicates net selling. CVD divergence shows order flow weakening despite price movement.
Bullish Divergence Detection:
Occurs when price makes lower lows BUT oscillators make higher lows. This indicates selling pressure is weakening despite lower prices - smart money is accumulating while retail panics. Requires 2+ oscillators confirming for high-probability signal.
Bearish Divergence Detection:
Occurs when price makes higher highs BUT oscillators make lower highs. This indicates buying pressure is weakening despite higher prices - smart money is distributing while retail chases. Requires 2+ oscillators confirming for high-probability signal.
Trading Significance:
Multi-oscillator divergence (2 or 3 oscillators confirming) is one of the most reliable reversal signals. It reveals that while price appears to be trending, the underlying momentum, money flow, and order flow are deteriorating. This often precedes major reversals as smart money has already positioned for the turn.
6. Liquidity Void Detection
Liquidity voids are areas with minimal institutional interest, identified by the combination of low volume and narrow price range. These zones represent areas where institutions are not interested in trading, creating vacuums that price moves through quickly.
How Void Detection Works:
Low Volume Threshold: Volume must be below (average - 1 standard deviation) to qualify as low volume. This ensures volume is statistically low, not just slightly below average.
Narrow Range Threshold: The candle range (high - low) must be less than 50% of the average range. This indicates price consolidation with minimal movement.
Liquidity Void Confirmation: Both conditions must be met simultaneously - low volume AND narrow range. This combination indicates no institutional interest at current price levels.
Consecutive Void Tracking:
The system tracks consecutive void bars. When 3+ consecutive bars meet void criteria, it signals a significant liquidity void. These multi-bar voids are particularly important as they represent extended periods of institutional disinterest.
Trading Significance:
Liquidity voids should be avoided for entries. When price revisits void zones, it typically moves through them quickly with minimal support or resistance - there's no institutional interest to slow price movement. Voids often become gaps on higher timeframes or result in fast, one-directional price action.
Traders should wait for price to exit void zones before entering positions. Voids can also be used as targets - if entering below a void, expect price to move quickly through the void to the next area of institutional interest above it.
7. Footprint Clustering Analysis
IFS tracks institutional footprints (high-confidence absorption or toxicity events) and identifies clusters where multiple footprints occur within a short time period. Clustering indicates sustained institutional conviction rather than isolated events.
How Clustering Works:
Footprint Tracking: Every time the indicator detects institutional activity (absorption + toxicity + high confidence), it records a "footprint" with the bar index and type (buy or sell). The system maintains a rolling history of the last 50 footprints.
Cluster Detection: The algorithm counts how many footprints occurred within the cluster distance (default: 15 bars) of the current bar. If 3+ footprints are found within this window, a cluster is detected.
Dominant Type Classification: The system analyzes the types of footprints in the cluster. If more buy footprints than sell footprints, it's classified as a "Bullish Cluster" (accumulation zone). If more sell footprints, it's a "Bearish Cluster" (distribution zone).
Trading Significance:
Footprint clusters reveal areas where institutions repeatedly positioned over multiple bars. This indicates conviction - not a single large order, but sustained accumulation or distribution.
Bullish clusters (3+ buy footprints within 15 bars) suggest institutions are building long positions in this price zone. These areas often become strong support levels.
Bearish clusters (3+ sell footprints within 15 bars) suggest institutions are building short positions or distributing longs. These areas often become strong resistance levels.
Clusters with 5+ footprints indicate extreme institutional conviction and are the highest-probability support/resistance zones.
8. Tape Reading Metrics
IFS simulates Level 2 order book tape reading by analyzing candle position within its range combined with volume intensity. This reveals whether orders are aggressive (taking liquidity) or passive (providing liquidity) without requiring actual order book data.
How Tape Reading Works:
Candle Position Calculation: Measures where the close is within the candle's range. Position = (close - low) / (high - low). A value of 1.0 means close at high, 0.0 means close at low, 0.5 means close at midpoint.
Aggressive Buy Detection:
Occurs when candle closes in top 20% of range (position > 0.8) AND close > open AND volume exceeds 20-bar average. This indicates buyers aggressively hit ask prices, pushing price to the high. Institutions are urgently taking liquidity on the buy side.
Aggressive Sell Detection:
Occurs when candle closes in bottom 20% of range (position < 0.2) AND close < open AND volume exceeds 20-bar average. This indicates sellers aggressively hit bid prices, pushing price to the low. Institutions are urgently taking liquidity on the sell side.
Passive Absorption Detection:
Occurs when candle closes in middle 20% of range (position 0.4-0.6) AND volume exceeds 1.5x the 20-bar average. This indicates high volume but price didn't move much - institutions are patiently absorbing liquidity at current levels without pushing price away.
Trading Significance:
Aggressive buying/selling indicates institutional urgency - large players are willing to pay the spread and move price to establish positions quickly. This often precedes continued directional movement.
Passive absorption indicates institutional patience - large players are absorbing all available liquidity at a specific price level. This often occurs at support/resistance where institutions defend levels. Once absorption is complete, price typically reverses or breaks through.
9. Iceberg Order Detection
Iceberg orders are large hidden institutional orders that absorb liquidity repeatedly at the same price level. The name comes from the iceberg analogy - only a small portion is visible in the order book, while the bulk remains hidden. IFS detects icebergs by identifying repeated passive absorption at the same price.
How Iceberg Detection Works:
Passive Absorption Tracking: The system monitors for passive absorption events (high volume, mid-range close). Each time passive absorption occurs, it records the price level.
Price Proximity Check: When a new passive absorption event occurs, the algorithm checks if it's at the same price as the previous event. "Same price" is defined as within 0.2% (20 basis points) to account for minor price fluctuations.
Hit Counter: If absorption occurs at the same price level, the hit counter increments. If absorption occurs at a different price (more than 0.2% away), the counter resets and tracking begins at the new price.
Iceberg Confirmation: When 3+ passive absorption events occur at the same price level, an iceberg order is detected. This indicates a large hidden order is repeatedly absorbing all available liquidity at this specific price.
Trading Significance:
Iceberg orders represent major institutional interest at a specific price level. They act as strong support (buy icebergs) or resistance (sell icebergs).
Buy icebergs indicate institutions are defending a price level - every time price drops to this level, the iceberg absorbs all selling pressure. This creates a floor that's difficult to break.
Sell icebergs indicate institutions are capping price - every time price rises to this level, the iceberg absorbs all buying pressure. This creates a ceiling that's difficult to break.
Iceberg detection provides high-probability entry zones (buy near buy icebergs) and exit zones (sell near sell icebergs). When icebergs are finally consumed (price breaks through), it often results in explosive moves as the major support/resistance is removed.
10. Confidence Score System
IFS calculates a multi-factor confidence score to quantify signal quality:
float confidence = 0.0
confidence += strong_absorption ? 25.0 : 0.0
confidence += (toxic_buy_flow or toxic_sell_flow) ? 20.0 : 0.0
confidence += deep_market ? 15.0 : 0.0
confidence += (bull_div or bear_div) ? 20.0 : 0.0
confidence += in_cluster ? 10.0 : 0.0
confidence += near_poc ? 10.0 : 0.0
bool high_confidence = confidence >= min_confidence // Default 75%
Confidence score combines all detection methods. Scores above 75% indicate high-probability institutional activity. Scores above 90% indicate extreme conviction.
11. 9-Layer Gradient Ribbon Visualization
The gradient ribbon visualizes order flow intensity through 9 transparent layers between institutional VWAP and a wave level:
float vwap_inst = ta.vwap(hlc3)
float flow_intensity = math.min(confidence / 100, 1.0)
float toxicity_intensity = math.abs(toxicity_imbalance)
float combined_intensity = (flow_intensity + toxicity_intensity) / 2.0
float wave_ratio = math.min(0.65, combined_intensity)
float wave_level = vwap_inst + ((close - vwap_inst) * wave_ratio)
// 9 layers with progressive transparency
float ribbon_step = (wave_level - vwap_inst) / 9.0
Ribbon color indicates direction (gold for institutional buy, indigo for institutional sell). Ribbon intensity increases with confidence and toxicity. The VWAP line itself changes color dynamically based on institutional activity.
Visual Elements
Institutional VWAP Line: Dynamic color (gold for inst buy, indigo for inst sell, matrix green for toxic buy, hot pink for toxic sell)
9-Layer Gradient Ribbon: Progressive transparency showing order flow intensity around VWAP
Toxicity Heatmap: Background gradient (hot pink to orange) showing toxicity intensity
Absorption Wave Zones: Dynamic boxes showing absorption strength (gold for buy, indigo for sell)
Cluster Intensity Zones: Background coloring (matrix green for bullish, hot pink for bearish) with intensity based on cluster size
Liquidity Void Highlighting: Dark zones indicating areas with no institutional interest
Toxicity Flow Lines: Dynamic gradient lines showing flow direction and intensity
Absorption Flow Lines: Gradient lines showing absorption strength and direction
Microstructure Spread Bands: Circles showing market depth (blue for deep, orange for shallow)
Institutional Footprint Markers: "INST" labels at high-confidence footprints with detailed tooltips
Toxicity Level Labels: "TOXIC BUY/SELL" labels at extreme toxicity events
Absorption Strength Labels: "ABS" labels showing absorption coefficient
Cluster Formation Labels: "CLUSTER" labels marking significant footprint clusters
POC Proximity Labels: "POC" labels when price approaches Point of Control
Liquidity Void Labels: "VOID" labels marking significant voids
Iceberg Order Markers: "◆ ICE" diamond markers at iceberg detection
Market Maker Activity Labels: "MM OUT" labels when market makers withdraw liquidity
Bar Coloring: Gradient bar colors based on institutional activity intensity
Dashboard: Real-time institutional metrics in top-right corner (13+ metrics)
Input Parameters
Order Flow Analysis:
Toxicity Lookback: Period for toxicity calculation (default: 20, range: 10-50)
Toxicity Threshold: Threshold for toxic flow detection (default: 0.7, range: 0.5-0.9)
Volume Profile:
Volume Profile Bins: Number of price bins for volume distribution (default: 20, range: 10-50)
VP Lookback Period: Bars to analyze for volume profile (default: 100, range: 50-200)
POC Sensitivity: Distance threshold for POC proximity (default: 0.02, range: 0.01-0.05)
Market Microstructure:
Spread Analysis Period: Lookback for spread analysis (default: 20, range: 10-50)
Depth Threshold: Multiplier for deep market detection (default: 1.5, range: 1.0-3.0)
Footprint Detection:
Min Absorption Coefficient: Minimum absorption for detection (default: 0.75, range: 0.5-1.0)
Cluster Distance: Bars to consider for clustering (default: 15, range: 5-30)
Minimum Confidence %: Minimum confidence for signals (default: 75%, range: 60-95%)
Visualization:
Show Order Flow Ribbon: Toggle 9-layer gradient ribbon display
Show POC Levels: Toggle Point of Control level display
Show Footprint Markers: Toggle institutional footprint labels and markers
How to Use This Indicator
Step 1: Monitor Dashboard Confidence
Watch the dashboard confidence score in the top-right corner. Scores above 75% indicate high-probability institutional activity. Scores above 90% indicate extreme conviction.
Step 2: Identify Institutional Footprints
Look for "INST" labels (gold for buy, indigo for sell) marking high-confidence institutional footprints. Hover over labels to see detailed metrics including confidence, absorption coefficient, and toxicity.
Step 3: Check Order Flow Toxicity
Monitor the Toxicity row in the dashboard. "BUY" with high value indicates aggressive institutional buying. "SELL" with high value indicates aggressive institutional selling. Toxicity above 0.7 is significant.
Step 4: Analyze Absorption Coefficient
Check the Absorption row in the dashboard. Values above 0.75 indicate strong institutional absorption. Look for "ABS" labels on the chart showing absorption events. High absorption with minimal price movement indicates institutions are positioning.
Step 5: Use Volume Profile Context
Monitor POC Distance in the dashboard. When price approaches POC (distance <2%), expect strong support/resistance. Check Value Area position - price outside value area is at extremes. Look for "POC" labels when price approaches Point of Control.
Step 6: Watch for Footprint Clusters
Look for "CLUSTER" labels indicating 3+ footprints within cluster distance. Bullish clusters suggest institutional accumulation. Bearish clusters suggest institutional distribution. Cluster zones are highlighted with background coloring.
Step 7: Monitor Market Microstructure
Check the Spread and Depth rows in the dashboard. Deep markets with tight spreads indicate healthy liquidity. Shallow markets with wide spreads indicate market maker withdrawal. "MM OUT" labels warn of liquidity withdrawal.
Step 8: Identify Iceberg Orders
Watch for "◆ ICE" diamond markers indicating iceberg order detection. These mark hidden institutional liquidity providing strong support/resistance. Iceberg orders indicate institutions are patiently absorbing at specific price levels.
Step 9: Use Gradient Ribbon for Flow Intensity
The 9-layer gradient ribbon shows order flow intensity. Brighter, more opaque ribbon indicates stronger institutional activity. Gold/green ribbon indicates bullish flow. Indigo/pink ribbon indicates bearish flow.
Step 10: Avoid Liquidity Voids
Watch for "VOID" labels and dark background zones indicating liquidity voids. These areas have minimal institutional interest and often result in fast price movement or gaps. Avoid entering positions in void zones.
Step 11: Confirm with Smart Money Divergence
Check dashboard for divergence signals. Multi-oscillator divergence (2+ oscillators) indicates smart money positioning against the trend. Bullish divergence at lows suggests institutional accumulation. Bearish divergence at highs suggests institutional distribution.
Step 12: Use Tape Reading Metrics
Monitor the Tape row in the dashboard. "Agg Buy" indicates aggressive institutional buying. "Agg Sell" indicates aggressive institutional selling. "Passive" indicates patient absorption at current price levels.
Best Practices
Use on liquid instruments (major forex pairs, large-cap stocks, major crypto) for reliable signals
Institutional footprints work best at price extremes (near POC, outside value area, at support/resistance)
Combine with higher timeframe trend analysis - institutional activity against trend is lower probability
High confidence signals (>90%) have highest win rate but occur less frequently
Footprint clusters indicate institutional conviction - wait for 3+ footprints before acting
Iceberg orders provide strong support/resistance - use as entry/exit zones
Market maker withdrawal (wide spreads) often precedes significant moves - be cautious
Liquidity voids should be avoided for entries - price moves quickly through these zones
Toxic flow above 0.8 indicates extreme institutional urgency - strong directional signal
Absorption coefficient above 0.85 indicates very strong institutional positioning
POC proximity (<2% distance) provides high-probability reversal zones
Smart money divergence requires 2+ oscillator confirmation for reliability
Use gradient ribbon intensity to gauge institutional conviction - brighter = stronger
Dashboard metrics provide context - monitor multiple metrics simultaneously for best results
Combine absorption with toxicity for highest conviction signals
Indicator Limitations
Requires sufficient volume data - may not work well on illiquid instruments or off-market hours
Volume Profile calculation is computationally intensive - optimized to recalculate every 10 bars
Toxicity Index is a proxy for order flow - not actual Level 2 order book data
Absorption Coefficient assumes volume intensity indicates institutional activity - can produce false signals during news events
Market microstructure analysis (spread/depth) is estimated from OHLCV data - not actual order book depth
Iceberg detection requires repeated absorption at same price - may miss single large orders
Footprint clustering requires sufficient historical data - may not work well on new instruments
Smart money divergence adds lag - early signals may not have divergence confirmation yet
Confidence score is multi-factor - high confidence doesn't guarantee immediate price movement
Gradient ribbon visualization requires sufficient price movement to display properly
Dashboard metrics are real-time snapshots and can change rapidly during volatile periods
POC and Value Area calculations require sufficient lookback data - may be less reliable on very low timeframes
Liquidity void detection may produce false signals during consolidation periods
Tape reading metrics simulate order book behavior - not actual tape data
Technical Implementation
Built with Pine Script v6 using:
Order Flow Toxicity Index with aggressive vs passive flow classification
Optimized Volume Profile calculation with POC, VAH, VAL detection (recalculates every 10 bars for performance)
Absorption Coefficient algorithm combining volume intensity and price movement
Market Microstructure analysis with spread z-score and depth proxy calculations
Smart Money Divergence Engine using RSI, MFI, and Cumulative Volume Delta
Liquidity Void Detection with consecutive void bar tracking
Footprint Clustering system with dominant type classification
Tape Reading Metrics simulating Level 2 order book behavior
Iceberg Order Detection through repeated absorption pattern recognition
Multi-factor Confidence Score system (6 components, 0-100% scale)
9-layer gradient ribbon with progressive transparency and dynamic coloring
Institutional VWAP with dynamic color based on activity type
Comprehensive visualization system with 15+ chart overlay types
Real-time dashboard with 13+ institutional metrics
13 alert conditions for institutional events
Dynamic bar coloring based on institutional activity intensity
The code is fully open-source and can be modified to suit individual trading styles.
Originality Statement
This indicator is original in its comprehensive institutional order flow detection approach. While volume analysis and VWAP are established concepts, this indicator is justified because:
It combines 9 distinct institutional detection methods (Toxicity, Volume Profile, Absorption, Microstructure, Divergence, Void Detection, Clustering, Tape Reading, Iceberg Detection) into a unified system
The Order Flow Toxicity Index quantifies aggressive vs passive flow through candle position and volume weighting - a unique approach not found in standard volume indicators
Absorption Coefficient algorithm specifically quantifies institutional absorption by measuring volume intensity relative to price movement
Market Microstructure analysis estimates spread and depth from OHLCV data without requiring Level 2 order book access
Iceberg Order Detection identifies hidden institutional liquidity through repeated absorption pattern recognition
Footprint Clustering system tracks and classifies institutional footprints to identify accumulation/distribution zones
Multi-factor Confidence Score synthesizes 6 independent detection methods into a single 0-100% quality metric
9-layer gradient ribbon provides intuitive visualization of order flow intensity with dynamic coloring based on activity type
Comprehensive dashboard synthesizes 13+ metrics (Confidence, Toxicity, Absorption, POC Distance, Value Area, Spread, Depth, MM Activity, Imbalance, Cluster, Liquidity, Tape, Iceberg) into actionable intelligence
Integration of Volume Profile POC with absorption and toxicity creates unique confluence zones
Tape Reading Metrics simulate Level 2 order book behavior using only OHLCV data
Smart Money Divergence Engine combines RSI, MFI, and CVD for multi-oscillator confirmation
Each component contributes unique information: Toxicity shows aggressive flow, Volume Profile shows price acceptance, Absorption shows institutional positioning, Microstructure shows market maker behavior, Divergence shows smart money positioning, Void Detection shows areas to avoid, Clustering shows conviction, Tape Reading shows order urgency, and Iceberg Detection shows hidden liquidity. The indicator's value lies in presenting these complementary perspectives simultaneously with a unified confidence scoring system and intuitive visualization.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. 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

Statistical Reversion Engine [JOAT]Statistical Reversion Engine
Introduction
The Statistical Reversion Engine (SRE) is an advanced open-source mean reversion indicator that combines statistical deviation bands, premium/discount zone analysis, DCA level calculation, Z-score measurement, and enhanced reversion probability scoring to identify high-probability mean reversion opportunities. This indicator quantifies price deviation from statistical mean using multiple calculation methods (SMA, EMA, VWAP, HMA) and provides probabilistic assessment of reversion likelihood through multi-factor analysis including deviation magnitude, volatility regime, and historical reversion patterns.
Unlike basic Bollinger Band indicators that simply plot standard deviation bands, SRE employs a sophisticated statistical framework that calculates Z-scores, premium/discount percentages, enhanced reversion probability (incorporating volatility and premium factors), and tracks historical reversion speed to provide traders with quantitative mean reversion intelligence. The indicator also generates DCA (Dollar Cost Averaging) levels with volatility-adjusted spacing for systematic position building.
Why This Indicator Exists
This indicator addresses the challenge of identifying when price has deviated sufficiently from mean to warrant mean reversion trades. Traditional mean reversion indicators lack probabilistic quantification and don't account for volatility regime or historical reversion patterns. SRE systematically reveals:
Multiple Mean Calculations: SMA, EMA, VWAP (session/continuous), HMA for flexible mean definition
Statistical Deviation Bands: 1σ, 2σ, 3σ bands with customizable multipliers
Z-Score Calculation: Quantifies deviation in standard deviation units
Premium/Discount Analysis: Percentage deviation from mean with zone classification
Enhanced Reversion Probability: Multi-factor scoring (Z-score + premium + volatility)
DCA Level Generation: Volatility-adjusted levels for systematic position building
Historical Reversion Tracking: Measures average bars to return to mean after extreme deviation
Each component provides unique intelligence. Mean calculation defines center, deviation bands show extremes, Z-score quantifies magnitude, premium/discount shows percentage, probability scores likelihood, DCA levels provide entry framework, and historical tracking provides context.
Core Components Explained
1. Flexible Mean Calculation System
SRE supports four mean calculation methods:
f_calculate_mean(string type, int length) =>
float result = close
if type == "SMA"
result := ta.sma(close, length)
else if type == "EMA"
result := ta.ema(close, length)
else if type == "VWAP"
result := session_reset ? ta.vwap(hlc3) : ta.vwma(hlc3, length)
else if type == "HMA"
result := ta.hma(close, length)
result
Mean selection impacts reversion behavior:
- SMA: Simple average, slower to respond
- EMA: Exponential weighting, faster response
- VWAP: Volume-weighted, institutional reference
- HMA: Hull Moving Average, smoothest with minimal lag
2. Statistical Deviation Band System
Three deviation bands calculated using standard deviation:
float mean_line = f_calculate_mean(mean_type, mean_length)
float stdev = f_calculate_stdev(close, deviation_period)
float upper_band_1 = mean_line + (stdev * band_multiplier_1) // 1σ
float lower_band_1 = mean_line - (stdev * band_multiplier_1)
float upper_band_2 = mean_line + (stdev * band_multiplier_2) // 2σ
float lower_band_2 = mean_line - (stdev * band_multiplier_2)
float upper_band_3 = mean_line + (stdev * band_multiplier_3) // 3σ
float lower_band_3 = mean_line - (stdev * band_multiplier_3)
Default multipliers: 1.0, 2.0, 3.0 (customizable)
- 1σ: 68% of price action (normal range)
- 2σ: 95% of price action (extended range)
- 3σ: 99.7% of price action (extreme range)
3. Z-Score Calculation & Classification
Z-score quantifies deviation in standard deviation units:
f_calculate_zscore(float price, float mean, float stdev) =>
float zscore = stdev > 0 ? (price - mean) / stdev : 0.0
zscore
float zscore = f_calculate_zscore(close, mean_line, stdev)
Z-score interpretation:
- |Z| < 1.0: Normal deviation (40% reversion probability)
- |Z| 1.0-1.5: Moderate deviation (60% reversion probability)
- |Z| 1.5-2.0: Extended deviation (75% reversion probability)
- |Z| 2.0-2.5: Extreme deviation (85% reversion probability)
- |Z| > 3.0: 3-sigma event (95% reversion probability)
4. Premium/Discount Zone Analysis
Percentage deviation from mean with zone classification:
f_calculate_premium_discount(float price, float mean) =>
float pct = mean > 0 ? ((price - mean) / mean) * 100 : 0.0
pct
float premium_discount_pct = f_calculate_premium_discount(close, mean_line)
string current_zone =
premium_discount_pct >= premium_threshold * 2 ? "Extreme Premium" :
premium_discount_pct >= premium_threshold ? "Premium" :
premium_discount_pct <= discount_threshold * 2 ? "Extreme Discount" :
premium_discount_pct <= discount_threshold ? "Discount" :
"Fair Value"
Zone classification (default thresholds):
- Extreme Premium: >3.0% above mean (strong sell zone)
- Premium: 1.5-3.0% above mean (sell zone)
- Fair Value: -1.5% to +1.5% (neutral zone)
- Discount: -3.0% to -1.5% below mean (buy zone)
- Extreme Discount: <-3.0% below mean (strong buy zone)
5. Enhanced Reversion Probability Scoring
Multi-factor probability calculation:
f_enhanced_reversion_prob(float z, float premium_pct, float vol_rank) =>
float base_prob = f_reversion_probability(z)
// Adjust for premium/discount magnitude
float premium_factor = math.abs(premium_pct) > 3 ? 1.2 :
math.abs(premium_pct) > 2 ? 1.1 :
math.abs(premium_pct) > 1 ? 1.0 : 0.9
// Adjust for volatility (lower vol = higher reversion probability)
float vol_factor = vol_rank < 30 ? 1.2 :
vol_rank < 50 ? 1.1 :
vol_rank < 70 ? 1.0 : 0.85
math.min(base_prob * premium_factor * vol_factor, 99)
Enhanced probability accounts for:
- Base Z-score probability
- Premium/discount magnitude (larger deviation = higher probability)
- Volatility regime (lower volatility = more predictable reversion)
6. Volatility-Adjusted DCA Level Generation
DCA levels automatically adjust spacing based on volatility:
float current_atr = ta.atr(14)
float atr_pct = close > 0 ? (current_atr / close) * 100 : 0
float vol_multiplier = atr_pct > 3 ? 1.5 : atr_pct > 2 ? 1.2 : atr_pct > 1 ? 1.0 : 0.8
for i = 1 to dca_levels
float adjusted_spacing = (dca_spacing * vol_multiplier) / 100
float buy_level = mean_line * (1 - adjusted_spacing * i)
float sell_level = mean_line * (1 + adjusted_spacing * i)
array.push(dca_buy_levels, buy_level)
array.push(dca_sell_levels, sell_level)
Volatility adjustment:
- High vol (ATR% >3): 1.5x spacing (wider levels)
- Elevated vol (ATR% 2-3): 1.2x spacing
- Normal vol (ATR% 1-2): 1.0x spacing (default)
- Low vol (ATR% <1): 0.8x spacing (tighter levels)
7. Historical Reversion Speed Tracking
Measures average bars to return to mean after extreme deviation:
var array reversion_times = array.new_int(0)
var bool tracking_reversion = false
var int reversion_start_bar = 0
if math.abs(zscore) >= 2.5 and not tracking_reversion
tracking_reversion := true
reversion_start_bar := bar_index
if tracking_reversion and math.abs(zscore) < 0.5
int reversion_time = bar_index - reversion_start_bar
array.push(reversion_times, reversion_time)
tracking_reversion := false
float avg_reversion_time = array.size(reversion_times) > 0 ?
array.avg(reversion_times) : na
Average reversion time provides context for expected holding period.
Visual Elements
Mean Line: Electric lime line showing statistical mean
Deviation Bands: 1σ (lime), 2σ (violet), 3σ (deep violet) with gradient fills
Premium/Discount Zones: Background coloring (violet for premium, lime for discount)
DCA Levels: Dotted lines with "B1, B2, B3..." (buy) and "S1, S2, S3..." (sell) labels
Z-Score Label: Current Z-score displayed on price
Gradient Zone Fills: Progressive transparency between bands
Mean Reversion Signals: Triangle markers for strong buy/sell setups
Reversion Probability Heatmap: Background intensity based on enhanced probability
Dashboard: Real-time metrics including zone, P/D%, Z-score, reversion probability, mean value, distance, enhanced probability, deviation percentile, mean trend, nearest DCA, average reversion time, bars since extreme
Input Parameters
Mean Calculation:
Mean Type: SMA, EMA, VWAP, HMA (default: VWAP)
Mean Length: Period for mean calculation (default: 20)
Session Reset (VWAP): Toggle session anchoring (default: true)
Deviation Bands:
Band 1 Multiplier: 1σ multiplier (default: 1.0)
Band 2 Multiplier: 2σ multiplier (default: 2.0)
Band 3 Multiplier: 3σ multiplier (default: 3.0)
Deviation Period: Standard deviation calculation period (default: 20)
Premium/Discount:
Premium Threshold (%): Threshold for premium zone (default: 1.5%)
Discount Threshold (%): Threshold for discount zone (default: -1.5%)
DCA Levels:
Enable DCA Levels: Toggle DCA display (default: true)
Number of DCA Levels: Levels to generate (default: 5)
DCA Spacing (%): Base spacing between levels (default: 1.5%)
Visualization:
Show Deviation Bands: Toggle band display (default: true)
Show Band Fills: Toggle gradient fills (default: true)
Show Premium/Discount Zones: Toggle background coloring (default: true)
Show Z-Score Label: Toggle Z-score display (default: true)
How to Use This Indicator
Step 1: Identify Current Zone
Check dashboard "Zone" row. Extreme Discount = strong buy zone, Extreme Premium = strong sell zone.
Step 2: Assess Z-Score Magnitude
|Z| >2.0 indicates extended deviation. |Z| >3.0 is 3-sigma event (rare, high reversion probability).
Step 3: Check Enhanced Reversion Probability
Dashboard shows enhanced probability accounting for volatility and premium factors. >80% is high probability.
Step 4: Monitor Mean Trend
"Rising" mean suggests uptrend, "Falling" suggests downtrend. Trade with mean trend for higher probability.
Step 5: Use DCA Levels for Entry
Enter positions at DCA levels (B1, B2, B3 for longs; S1, S2, S3 for shorts) to average into position.
Step 6: Wait for Strong Signals
Triangle markers appear when:
- Extreme zone + enhanced probability >80% + band crossover
- These are highest conviction mean reversion setups
Best Practices
Mean reversion works best in ranging markets - avoid strong trends
3-sigma events (|Z| >3.0) have highest reversion probability but occur rarely
Use DCA levels to build positions systematically rather than all-in entries
Enhanced probability >80% indicates high-quality setup
Mean trend provides context - reversion against trend is lower probability
Volatility-adjusted DCA spacing prevents over-concentration in high vol
Average reversion time helps set realistic profit target timeframes
Combine with higher timeframe trend - mean reversion with trend is safer
Deviation percentile >90% indicates extreme deviation
Bars since extreme >50 suggests extended deviation may persist
Indicator Limitations
Mean reversion fails during strong trending markets
3-sigma events can persist longer than expected during major news
DCA levels don't account for fundamental catalysts
Enhanced probability is statistical, not deterministic
Historical reversion time doesn't guarantee future reversion speed
VWAP mean resets daily - may not be appropriate for all timeframes
Standard deviation assumes normal distribution - markets have fat tails
Premium/discount thresholds may need adjustment for different instruments
Technical Implementation
Built with Pine Script v6 using:
Four mean calculation methods (SMA, EMA, VWAP, HMA)
Three-tier deviation band system with customizable multipliers
Z-score calculation with standard deviation
Premium/discount percentage with zone classification
Enhanced reversion probability (Z-score + premium + volatility)
Volatility-adjusted DCA level generation
Historical reversion speed tracking with arrays
Deviation percentile ranking
Mean trend detection (fast vs slow mean)
Gradient zone fills with progressive transparency
Reversion probability heatmap background
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 statistical mean reversion approach. While Bollinger Bands and mean reversion are established concepts, this indicator is justified because:
It combines four mean calculation methods with three-tier deviation bands
Enhanced reversion probability incorporates Z-score, premium magnitude, and volatility regime
Volatility-adjusted DCA level generation adapts to market conditions
Historical reversion speed tracking provides empirical context
Premium/discount zone classification adds percentage-based perspective
Mean trend detection (fast vs slow) provides directional context
Deviation percentile ranking shows historical extremity
Integration of statistical measures (Z-score, stdev, percentile) with practical tools (DCA levels, signals)
Each component contributes unique information: mean defines center, deviation bands show extremes, Z-score quantifies magnitude, premium/discount shows percentage, enhanced probability scores likelihood, DCA levels provide framework, historical tracking provides context, and mean trend shows direction. The indicator's value lies in presenting these complementary perspectives simultaneously with unified statistical framework.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Mean reversion probabilities do not guarantee outcomes. 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

Divergence Confirmation System [JOAT]Divergence Confirmation System
Introduction
The Divergence Confirmation System (DCS) is an advanced open-source multi-oscillator divergence detection indicator that combines RSI, MFI, Stochastic, MACD, CCI, and Stochastic RSI analysis to identify high-probability divergence setups through systematic pivot comparison and multi-oscillator confirmation. This indicator reveals when price action diverges from underlying momentum across six independent oscillators, providing traders with early warning signals of potential trend reversals or continuations through rigorous confirmation requirements.
Unlike basic divergence indicators that rely on a single oscillator, DCS employs a sophisticated 6-oscillator confirmation system that detects both regular divergences (trend reversal signals) and hidden divergences (trend continuation signals) across multiple momentum indicators. The indicator requires minimum oscillator confirmation (default 2/6) to filter false signals and provides divergence strength scoring based on oscillator count, volume confirmation, and price momentum.
Why This Indicator Exists
This indicator addresses the challenge of identifying reliable divergence signals in noisy market conditions. Single-oscillator divergences often produce false signals, but when multiple independent oscillators confirm the same divergence pattern, probability of successful reversal increases significantly. DCS systematically reveals:
6-Oscillator Analysis: RSI, MFI, Stochastic, MACD, CCI, Stochastic RSI for comprehensive momentum assessment
Regular Divergence Detection: Price makes new high/low but oscillators don't confirm (reversal signal)
Hidden Divergence Detection: Price makes higher low/lower high but oscillators show opposite (continuation signal)
Multi-Oscillator Confirmation: Requires 2+ oscillators to agree before generating signal
Divergence Strength Scoring: 0-100% score based on oscillator count, volume, and momentum
Multi-Timeframe Divergence: Confirms divergences on higher timeframe for added conviction
Divergence Clustering: Detects multiple divergences in short period indicating strong reversal potential
Each component provides unique intelligence. Multiple oscillators reduce false signals, regular divergences show reversals, hidden divergences show continuations, strength scoring quantifies quality, MTF confirmation adds conviction, and clustering shows intensity.
Core Components Explained
1. Multi-Oscillator Divergence Detection System
DCS calculates six independent oscillators and detects divergences on each:
// RSI
float rsi = ta.rsi(close, rsi_period)
float rsi_high = ta.pivothigh(rsi, pivot_left, pivot_right)
float rsi_low = ta.pivotlow(rsi, pivot_left, pivot_right)
// MFI (Money Flow Index - volume-weighted RSI)
float mfi = ta.mfi(hlc3, mfi_period)
// Stochastic
float stoch_k = ta.stoch(close, high, low, stoch_period)
// MACD Histogram
= ta.macd(close, macd_fast, macd_slow, macd_signal)
// CCI (Commodity Channel Index)
float cci = ta.cci(close, 20)
// Stochastic RSI
float rsi_for_stoch = ta.rsi(close, rsi_period)
float stoch_rsi_k = ta.stoch(rsi_for_stoch, rsi_for_stoch, rsi_for_stoch, stoch_period)
Each oscillator provides independent momentum perspective. RSI shows price momentum, MFI adds volume weighting, Stochastic shows position in range, MACD shows trend momentum, CCI shows deviation from mean, and Stochastic RSI shows RSI momentum.
2. Regular Divergence Detection (Reversal Signals)
Regular bullish divergence occurs when price makes lower low but oscillator makes higher low:
f_detect_bull_regular_div(float osc_val, float osc_pivot) =>
bool detected = false
if not na(osc_pivot) and not na(price_low) and array.size(price_lows) >= 2
float curr_price = array.get(price_lows, last_idx)
float prev_price = array.get(price_lows, prev_idx)
// Price makes lower low, oscillator makes higher low
if curr_price < prev_price and osc_pivot > osc_pivot
if (bar_index - prev_bar) <= max_pivot_distance
detected := true
detected
Regular bearish divergence occurs when price makes higher high but oscillator makes lower high. These signal potential trend reversals.
3. Hidden Divergence Detection (Continuation Signals)
Hidden bullish divergence occurs when price makes higher low but oscillator makes lower low:
f_detect_bull_hidden_div(float osc_val, float osc_pivot) =>
bool detected = false
if detect_hidden and not na(osc_pivot) and not na(price_low)
float curr_price = array.get(price_lows, last_idx)
float prev_price = array.get(price_lows, prev_idx)
// Price makes higher low, oscillator makes lower low
if curr_price > prev_price and osc_pivot < osc_pivot
if (bar_index - prev_bar) <= max_pivot_distance
detected := true
detected
Hidden bearish divergence occurs when price makes lower high but oscillator makes higher high. These signal trend continuation after pullback.
4. Multi-Oscillator Confirmation Aggregation
DCS counts how many oscillators confirm each divergence type:
int bull_reg_count = (rsi_bull_reg ? 1 : 0) + (mfi_bull_reg ? 1 : 0) +
(stoch_bull_reg ? 1 : 0) + (macd_bull_reg ? 1 : 0) +
(cci_bull_reg ? 1 : 0) + (srsi_bull_reg ? 1 : 0)
bool confirmed_bull_regular = bull_reg_count >= min_oscillators
// Optional volume confirmation
float vol_avg = ta.sma(volume, 20)
bool vol_confirm = volume > vol_avg * 1.2
bool final_bull_regular = confirmed_bull_regular and
(not require_volume_confirm or vol_confirm)
Minimum oscillator requirement (default 2/6) filters false signals. Volume confirmation adds additional filter.
5. Divergence Strength Scoring System
Strength score (0-100%) calculated from multiple factors:
f_divergence_strength(int osc_count, bool vol_confirm_param, float price_momentum) =>
float score = 0.0
// Oscillator count (0-50 points)
score += osc_count * 8.33 // 6 oscillators max = 50 points
// Volume confirmation (0-25 points)
score += vol_confirm_param ? 25 : 0
// Price momentum (0-25 points)
float momentum_score = math.min(math.abs(price_momentum) * 5, 25)
score += momentum_score
math.min(score, 100)
Strength classification:
- 75-100%: Very Strong (highest probability)
- 60-74%: Strong (high probability)
- 40-59%: Moderate (medium probability)
- 0-39%: Weak (low probability)
6. Multi-Timeframe Divergence Confirmation
DCS checks for divergences on higher timeframe (default 15m):
f_get_htf_divergence(string tf) =>
= request.security(syminfo.tickerid, tf,
)
float htf_rsi_high = ta.pivothigh(htf_rsi, pivot_left, pivot_right)
float htf_rsi_low = ta.pivotlow(htf_rsi, pivot_left, pivot_right)
bool htf_bull = f_detect_bull_regular_div(htf_rsi, htf_rsi_low)
bool htf_bear = f_detect_bear_regular_div(htf_rsi, htf_rsi_high)
bool mtf_bull_confirmed = final_bull_regular and htf_bull_div
bool mtf_bear_confirmed = final_bear_regular and htf_bear_div
MTF confirmation significantly increases signal reliability.
7. Divergence Clustering Detection
Clustering identifies multiple divergences in short period:
var array div_bars = array.new_int(0)
if final_bull_regular or final_bear_regular
array.push(div_bars, bar_index)
// Count divergences in last 50 bars
int recent_div_count = 0
for i = 0 to array.size(div_bars) - 1
int div_bar = array.get(div_bars, i)
if bar_index - div_bar <= 50
recent_div_count += 1
bool in_div_cluster = recent_div_count >= 3
string cluster_intensity = recent_div_count >= 5 ? "High" :
recent_div_count >= 3 ? "Moderate" : "Low"
Clusters indicate strong reversal pressure building.
Visual Elements
Primary Oscillator Display: User-selectable (RSI/MFI/Stochastic/MACD) with gradient shadow effect
Reference Lines: 70 (overbought), 50 (midline), 30 (oversold)
Oscillator Histogram: Gradient-colored bars showing oscillator deviation from 50
Background Zones: Cyan for bullish divergence, red for bearish divergence
Divergence Labels: "BULL DIV" or "BEAR DIV" with oscillator count (e.g., "4/6")
Hidden Divergence Markers: Small "H" circles for hidden divergences
Elite Signals: Large labels for 4+ oscillator confirmation with strength >75%
MTF Confirmation: Triangle markers when higher timeframe confirms
Multi-Oscillator Confirmation: Labels showing oscillator count (e.g., "3/6 CONF")
Institutional Flow: "INST BUY/SELL" labels when delta confirms divergence
Input Parameters
Oscillator Settings:
RSI Period: RSI calculation period (default: 14)
MFI Period: MFI calculation period (default: 14)
Stochastic Period: Stochastic calculation period (default: 14)
MACD Fast: MACD fast EMA (default: 12)
MACD Slow: MACD slow EMA (default: 26)
MACD Signal: MACD signal line (default: 9)
Divergence Detection:
Pivot Left Bars: Bars to left of pivot (default: 5)
Pivot Right Bars: Bars to right of pivot (default: 2)
Detect Hidden Divergences: Toggle hidden divergence detection (default: true)
Max Pivot Distance: Maximum bars between pivots (default: 60)
Confirmation Rules:
Minimum Oscillator Confirmation: Required oscillators (default: 2/6)
Require Volume Confirmation: Toggle volume filter (default: false)
Visualization:
Show Divergence Lines: Toggle divergence line drawing (default: true)
Show Labels: Toggle divergence labels (default: true)
Primary Display: Select oscillator to display (RSI/MFI/Stochastic/MACD)
How to Use This Indicator
Step 1: Monitor Primary Oscillator
Watch selected oscillator (default RSI) for overbought/oversold conditions.
Step 2: Wait for Divergence Labels
"BULL DIV" or "BEAR DIV" labels appear when 2+ oscillators confirm divergence.
Step 3: Check Oscillator Count
Higher count = higher probability. 4/6 or better is ideal.
Step 4: Assess Divergence Strength
Tooltip shows strength percentage. >75% is very strong, >60% is strong.
Step 5: Confirm with MTF
Triangle markers indicate higher timeframe confirmation - highest probability setups.
Step 6: Watch for Elite Signals
Large "BULL DIV" or "BEAR DIV" labels with 4+ oscillators and >75% strength are highest conviction.
Best Practices
Focus on divergences with 3+ oscillator confirmation for best results
Regular divergences work best at price extremes (support/resistance)
Hidden divergences confirm trend continuation - trade with trend
MTF confirmation adds significant edge - wait when possible
Divergence clustering indicates strong reversal pressure
Volume confirmation reduces false signals but adds lag
Elite signals (4+ oscillators, >75% strength) have highest win rate
Use cooldown system (15 bars minimum) to avoid overtrading
Combine with price action - divergence shows momentum, price shows structure
Indicator Limitations
Divergence detection requires clear pivot formation - lags by pivot_right bars
Multiple oscillators can produce conflicting signals during choppy markets
Hidden divergences are less reliable than regular divergences
Strength scoring is probabilistic, not deterministic
MTF confirmation adds lag but increases reliability
Clustering detection has fixed lookback - may miss longer-term patterns
Volume confirmation may not work well on illiquid instruments
Extreme market conditions can invalidate divergence signals
Technical Implementation
Built with Pine Script v6 using:
6-oscillator system (RSI, MFI, Stochastic, MACD, CCI, Stochastic RSI)
Pivot-based divergence detection with array tracking
Regular and hidden divergence algorithms
Multi-oscillator confirmation aggregation
Divergence strength scoring (oscillator count + volume + momentum)
Multi-timeframe security requests for HTF confirmation
Divergence clustering detection (50-bar lookback)
Signal cooldown system (15 bars minimum)
Gradient visualization with dynamic coloring
Institutional flow integration (CVD delta analysis)
Elite signal filtering (4+ oscillators, >75% strength)
The code is fully open-source and can be modified to suit individual trading styles.
Originality Statement
This indicator is original in its comprehensive multi-oscillator divergence confirmation approach. While individual oscillator divergences are established concepts, this indicator is justified because:
It combines 6 independent oscillators (RSI, MFI, Stochastic, MACD, CCI, Stochastic RSI) for robust confirmation
The multi-oscillator confirmation system (2-6 required) significantly reduces false signals
Divergence strength scoring quantifies setup quality through multi-factor analysis
Multi-timeframe divergence confirmation adds conviction layer
Divergence clustering detection identifies high-probability reversal zones
Integration of institutional flow (CVD delta) with divergence analysis is unique
Elite signal filtering (4+ oscillators, >75% strength) isolates highest probability setups
Signal cooldown system prevents overtrading while maintaining signal quality
Each component contributes unique information: multiple oscillators reduce false signals, regular divergences show reversals, hidden divergences show continuations, strength scoring quantifies quality, MTF confirmation adds conviction, clustering shows intensity, and institutional flow confirms with volume. The indicator's value lies in presenting these complementary perspectives simultaneously with rigorous confirmation requirements.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Divergence signals do not guarantee reversals. 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

Lumina Trend Channels [Pineify]Lumina Trend Channels
The Lumina Trend Channels is a dynamic, volatility-adaptive channel system that combines an Exponential Moving Average (EMA) baseline with Average True Range (ATR) band projections and slope-based trend detection to create a visually intuitive, all-in-one trend-following overlay. Unlike static channel indicators that use fixed-width bands, Lumina Trend Channels automatically expands and contracts its four-band envelope in real time as market volatility changes, keeping the channel structure relevant across all market conditions. The channel color shifts between bullish and bearish states based on the direction of the baseline slope, and buy/sell signals are generated only when price crosses the baseline in alignment with the confirmed trend — filtering out counter-trend noise and providing cleaner entry timing for trend traders.
Key Features
EMA baseline with ATR-scaled bands — a responsive center line surrounded by four symmetrical bands whose width adapts dynamically to current volatility via ATR measurement.
Slope-based trend detection — trend direction is determined by whether the EMA baseline has risen or fallen for two consecutive bars, providing a simple yet effective trend filter.
Trend-aligned buy/sell signals — BUY signals trigger only when price crosses above the baseline during a confirmed uptrend; SELL signals trigger only during a confirmed downtrend, eliminating counter-trend false entries.
Gradient-style visual channel — layered fills with progressive transparency create a glowing channel effect that fades outward from the baseline, making trend direction and volatility state immediately visible.
Trend change markers — circle markers appear on the baseline at the exact bar where the trend flips, providing clear visual anchors for regime changes.
Built-in alert conditions — configurable alerts for buy signals, sell signals, and trend changes for hands-free monitoring.
How It Works
The indicator follows a three-stage calculation process to construct the channel and generate signals:
Baseline calculation via EMA: The closing price is smoothed using an Exponential Moving Average with a configurable period (default: 21). The EMA was chosen over SMA because it assigns greater weight to recent prices, producing a center line that reacts faster to price changes while maintaining smoothness. This baseline serves as both the channel center and the reference line for signal generation.
Volatility measurement via ATR: The Average True Range is calculated over the same lookback period as the EMA. ATR measures the average bar range (accounting for gaps), providing a robust volatility metric. Four bands are then projected symmetrically around the baseline: inner bands at basis ± ATR × inner multiplier (default: 1.0) and outer bands at basis ± ATR × outer multiplier (default: 2.0). As volatility expands, the bands widen; as it contracts, they narrow — keeping the channel proportional to actual market conditions.
Trend detection via baseline slope: The trend state is determined by checking whether the EMA baseline has been rising (increasing for 2 consecutive bars) or falling (decreasing for 2 consecutive bars). If rising, the trend is set to bullish; if falling, bearish. If neither condition is met, the previous trend state is maintained. This persistence mechanism prevents rapid trend flipping during sideways consolidation.
Trading Ideas and Insights
The Lumina Trend Channels is designed to serve multiple trading approaches across different timeframes and markets:
Trend-following entries: The primary use case — when a BUY triangle appears below a bar, it means price has crossed above the EMA baseline while the channel is green (bullish). This confirms that the immediate price action and the broader trend are aligned. Enter long and consider the upper inner or outer band as a potential profit target. The SELL triangle is the mirror setup for short entries during bearish channels.
Volatility-based position sizing: The ATR-driven band width provides a built-in volatility gauge. When the channel is wide, the market is volatile — consider smaller position sizes or wider stops. When the channel is narrow, volatility is compressed — tighter stops may be appropriate, and a breakout from the narrow channel often precedes a strong directional move.
Dynamic support and resistance: The inner and outer bands act as dynamic support/resistance levels. In an uptrend, pullbacks to the lower inner band often find support; in a downtrend, rallies to the upper inner band often meet resistance. The outer bands represent extreme volatility extensions where price is statistically stretched.
Trend change detection: The circle markers on the baseline highlight the exact moment the trend flips. These are valuable for swing traders who want to exit positions when the trend turns against them, or for traders looking to enter early in a new trend direction.
How Multiple Indicators Work Together
The Lumina Trend Channels integrates three technical components into a unified system, each serving a distinct analytical role:
Exponential Moving Average (trend center): The EMA provides the structural backbone of the channel. It defines the center line around which all bands are constructed and serves as the crossover reference for signal generation. Its low-lag property ensures the channel tracks price closely, keeping the entire system responsive to current market conditions.
Average True Range (volatility scaling): ATR transforms the channel from a fixed-width envelope into a volatility-adaptive one. By scaling band distances with ATR, the channel automatically adjusts to the market's current behavior — wide during volatile periods, narrow during quiet ones. This means the bands always represent statistically meaningful distance from the baseline, regardless of the instrument or timeframe.
Slope-based trend filter (directional bias): The trend detection layer adds a directional gate to the entire system. Without it, every EMA crossover would generate a signal — including counter-trend ones during choppy markets. By requiring the baseline to be actively rising (for buys) or falling (for sells), the trend filter ensures signals only fire when the broader directional context supports the trade.
The synergy is layered: EMA establishes the trend center → ATR scales the channel to current volatility → slope detection determines the trend state → signals fire only when price action and trend direction agree. This multi-layer filtering produces a system where each component reinforces the others, resulting in higher-conviction signals than any single component could provide alone.
Unique Aspects
Volatility-adaptive channel with trend coloring: While many channel indicators use either fixed bands (like Bollinger Bands with standard deviation) or trend coloring separately, Lumina Trend Channels combines ATR-driven dynamic width with slope-based trend coloring in a single overlay. The result is a channel that communicates both volatility state and trend direction simultaneously through its shape and color.
Gradient transparency design: The four-layer fill system uses progressive transparency — inner zones are more opaque, outer zones more transparent — creating a natural visual gradient that draws the eye toward the baseline. This design choice makes it immediately obvious where the channel center is and how far price has extended from it.
Trend-gated signals: Rather than generating signals on every baseline crossover, the indicator requires trend confirmation before triggering entries. This simple but effective filter dramatically reduces false signals during sideways or transitional market phases, where most crossover-based systems struggle.
Minimal parameter design: With only three calculation inputs (length, outer multiplier, inner multiplier), the indicator avoids over-parameterization. The single length parameter controls both the EMA and ATR simultaneously, ensuring the baseline and volatility measure are always in sync.
How to Use
Add the indicator to your chart. It overlays directly on the price chart, displaying a four-band channel with a central baseline, all colored according to the current trend direction.
Observe the channel color: green indicates a bullish trend (baseline is rising), red indicates a bearish trend (baseline is falling). Trade in the direction of the channel color for higher-probability setups.
Watch for BUY triangles (green, below bars) — these appear when price crosses above the baseline during a confirmed uptrend. Consider entering long with a stop below the lower inner or outer band.
Watch for SELL triangles (red, above bars) — these appear when price crosses below the baseline during a confirmed downtrend. Consider entering short with a stop above the upper inner or outer band.
Use the circle markers on the baseline to identify trend changes. These mark the exact bar where the channel flipped color, useful for timing exits or preparing for new trend entries.
Monitor the channel width as a volatility gauge — wide channels mean high volatility, narrow channels mean low volatility and potential breakout setups.
Set up alerts using the built-in alert conditions for buy signals, sell signals, and trend changes to automate your monitoring.
Customization
Channel Length (default: 21): Controls both the EMA baseline period and the ATR lookback. Lower values (e.g., 10–14) make the channel more responsive and generate more signals, suitable for shorter timeframes or scalping. Higher values (e.g., 34–55) produce a smoother, more stable channel for swing trading or higher timeframes.
Outer Band Multiplier (default: 2.0): Scales the distance of the outer bands from the baseline. Increase for wider outer bands that capture more extreme price extensions; decrease for tighter outer bands that stay closer to price action.
Inner Band Multiplier (default: 1.0): Scales the distance of the inner bands from the baseline. Adjust to control the width of the inner channel zone. A value of 0.5 creates a narrow inner zone; a value of 1.5 widens it.
Bullish Color (default: green): The color applied to all channel elements during uptrends. Customize to match your chart theme.
Bearish Color (default: red): The color applied to all channel elements during downtrends. Customize to match your chart theme.
Conclusion
The Lumina Trend Channels delivers a clean, volatility-adaptive channel overlay that combines EMA-based trend tracking, ATR-driven dynamic band scaling, and slope-based trend detection into a single, cohesive indicator. Its gradient-style visual design provides immediate, at-a-glance understanding of trend direction, volatility state, and price position within the channel. By gating buy and sell signals with trend confirmation, the indicator filters out counter-trend noise and delivers higher-conviction entries aligned with the prevailing market direction. Whether you trade stocks, forex, crypto, or futures, the Lumina Trend Channels adapts to your instrument and timeframe, offering a refined approach to trend-following and volatility-aware trading decisions.
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

Aura Mean Reversion Envelopes [Pineify]Aura Mean Reversion Envelopes
The Aura Mean Reversion Envelopes is a volatility-adaptive envelope indicator designed to identify high-probability mean reversion trade setups. It combines a Hull Moving Average (HMA) baseline with ATR-based dynamic envelopes to detect when price has reached statistically extreme levels and is likely to revert back toward its fair value. Unlike static channel indicators, this tool continuously adapts its bands to current market volatility, making it effective across different instruments and timeframes.
Key Features
Hull Moving Average (HMA) as the central mean — provides a smooth, low-lag baseline that closely tracks the "fair value" of price.
ATR-based dynamic envelopes — four bands (inner and outer, upper and lower) that automatically expand and contract with market volatility.
Wick rejection reversal signals — BUY and SELL markers triggered only when price pierces the exhaustion zone but closes back inside with a confirming candlestick pattern.
Visual cloud zones — color-filled regions between bands clearly delineate overbought, oversold, and neutral mean-reversion corridors.
Extreme candle coloring — optional bar coloring highlights candles closing beyond the inner bands for at-a-glance identification of stretched price action.
Built-in alert conditions — configurable alerts for both bullish and bearish reversal signals so you never miss a setup.
How It Works
The indicator is built on the principle of mean reversion — the statistical tendency for price to return to its average after moving to an extreme. The core calculation pipeline is:
A Hull Moving Average (HMA) of the closing price over a user-defined period (default: 34) is computed. HMA was chosen over SMA or EMA because it dramatically reduces lag while maintaining smoothness, giving a more accurate representation of the current mean.
Market volatility is measured using the Average True Range (ATR) over a separate lookback period (default: 21). ATR captures the true range of each bar — including gaps — providing a robust, adaptive volatility metric.
Four envelope bands are constructed symmetrically around the HMA baseline by adding and subtracting ATR multiplied by two configurable multipliers: an inner multiplier (default: 1.618, the golden ratio) and an outer multiplier (default: 3.0). The inner bands define the boundary of normal price oscillation, while the outer bands mark exhaustion zones where price has deviated significantly.
Reversal signals are generated using a wick rejection pattern: a bullish signal fires when the bar's low pierces below the lower outer band, but the candle closes bullishly (close > open) and above the outer band. This pattern indicates that sellers pushed price to an extreme but were overwhelmed by buyers. The bearish signal uses the mirror logic on the upper side.
Trading Ideas and Insights
Mean reversion strategies work best in ranging and oscillating markets. Here are some practical ways to use this indicator:
Fade the extremes: When a BUY or SELL signal appears at the outer exhaustion band, consider entering a position targeting the central HMA mean line as your take-profit level. The mean line acts as a natural magnet for price.
Use the inner bands as a filter: If price is between the inner bands and the mean, the market is in "normal" territory — avoid counter-trend entries. Wait for price to reach the outer bands before looking for reversal setups.
Combine with trend context: On higher timeframes, determine the dominant trend direction. Then on your trading timeframe, only take signals that align with the higher-timeframe trend (e.g., only BUY signals in an uptrend) for higher win rates.
Watch for candle coloring clusters: Multiple consecutive colored candles beyond the inner band suggest sustained momentum — a reversal signal after such a cluster can be particularly powerful.
How Multiple Indicators Work Together
This indicator integrates two distinct technical concepts into a unified framework:
Hull Moving Average (trend/mean tracking) — The HMA serves as the anchor point, representing the current equilibrium price. Its low-lag property ensures the mean line stays close to actual price action rather than trailing behind, which is critical for accurate envelope placement.
Average True Range (volatility measurement) — ATR dynamically sizes the envelope bands. During high-volatility periods, the bands widen to avoid false signals; during low-volatility periods, they tighten to capture smaller but still meaningful deviations.
The synergy between these two components is what makes the indicator adaptive: the HMA tracks where price should be, while the ATR determines how far is too far. Together, they create a self-adjusting framework that does not require manual recalibration across different market conditions.
The reversal signal logic adds a third layer — candlestick pattern confirmation — by requiring a wick rejection at the outer band. This prevents signals from firing during strong breakouts where price legitimately moves beyond the envelope.
Unique Aspects
HMA over EMA/SMA: Most envelope indicators use simple or exponential moving averages, which introduce significant lag. The Hull Moving Average virtually eliminates this lag, resulting in more accurately centered envelopes.
Dual-layer envelope design: The inner and outer band structure creates distinct zones (normal, extended, exhaustion) rather than a single binary overbought/oversold threshold, giving traders more nuanced context.
Golden ratio default: The inner band multiplier defaults to 1.618 (the Fibonacci golden ratio), a mathematically significant threshold that aligns with natural price clustering behavior observed across many markets.
Wick rejection confirmation: Signals require both a pierce beyond the outer band AND a confirming close back inside with a bullish/bearish candle body, filtering out many false signals that plague simpler band-touch systems.
How to Use
Apply the indicator to your chart. It overlays directly on the price chart with the HMA mean line, four envelope bands, and color-filled zones.
Watch for BUY triangles below bars at the lower outer band and SELL triangles above bars at the upper outer band. These are the primary reversal signals.
Use the colored candles as an early warning — when candles start coloring, price is in the extended zone and approaching potential reversal territory.
Set alerts via the built-in alert conditions ("Bullish Mean Reversion" and "Bearish Mean Reversion") to receive notifications when signals fire.
Target the central HMA mean line for take-profit on reversal trades, or use the inner band on the opposite side for more aggressive targets.
Customization
Mean Tracking Period (default: 34): Controls the HMA lookback. Lower values make the mean more responsive to recent price; higher values produce a smoother, slower-moving baseline. Adjust based on your trading timeframe.
Volatility (ATR) Period (default: 21): Controls the ATR lookback for band sizing. Shorter periods make bands more reactive to recent volatility spikes; longer periods smooth out the band width.
Inner Band Multiplier (default: 1.618): Defines the boundary between normal and extended price zones. Increase for wider normal zones (fewer colored candles); decrease for tighter zones.
Outer Band Multiplier (default: 3.0): Defines the exhaustion zone threshold. Higher values produce fewer but more extreme signals; lower values generate more frequent signals.
Color Candles at Extremes: Toggle on/off the candle coloring feature for candles closing beyond the inner bands.
All colors (bullish, bearish, mean line) are fully customizable via the Aesthetics & Colors settings group.
Conclusion
The Aura Mean Reversion Envelopes combines the precision of the Hull Moving Average with ATR-adaptive volatility bands and candlestick-confirmed reversal signals to create a comprehensive mean reversion trading tool. Its dual-layer envelope design provides clear visual zones for identifying when price is normal, extended, or at exhaustion — helping traders time entries at statistically favorable levels where price is most likely to revert toward its mean. Whether you trade forex, crypto, stocks, or futures, this indicator adapts to your market's volatility and provides actionable signals with built-in confirmation logic. Indicator

Aura Trend & Candlestick Matrix [Pineify]Aura Trend & Candlestick Matrix — EMA Trend Cloud with Trend-Aligned Candlestick Pattern Detection and Dynamic Support & Resistance
The Aura Trend & Candlestick Matrix is a multi-layered technical analysis indicator that fuses an EMA-based trend cloud, classic candlestick pattern recognition, and pivot-derived support and resistance levels into a single, cohesive overlay. Its core philosophy is confluence : rather than firing candlestick signals in isolation, every pattern must first pass through a directional trend filter before it reaches the chart. A Hammer is only displayed when the trend cloud confirms bullish momentum; a Shooting Star only appears when the cloud is bearish. This trend-alignment mechanism dramatically reduces noise and false signals, giving traders a cleaner, higher-probability view of potential reversal and continuation setups — all without leaving the price chart.
Key Features
Dual-EMA "Aura Cloud" that visually maps trend direction and strength through a color-coded filled region between a fast and slow exponential moving average
Three families of candlestick pattern detection — Hammer / Shooting Star, Bullish / Bearish Engulfing, and Morning Star / Evening Star — each identified using precise shadow-to-body ratio and multi-bar structural rules
Trend-alignment filter that only surfaces bullish patterns during confirmed uptrends and bearish patterns during confirmed downtrends, eliminating counter-trend noise
Dynamic pivot-based support and resistance levels that automatically update as new structural highs and lows are confirmed
Optional candle coloring that tints every bar green or red based on the prevailing trend for instant visual context
Built-in alert conditions for both bullish and bearish setups, enabling automated notification workflows without additional configuration
How It Works
The indicator is built on three independent analytical engines that feed into a unified signal pipeline.
Engine 1: The Aura Trend Cloud
Two exponential moving averages — a fast EMA (default 20 periods) and a slow EMA (default 50 periods) — are plotted on the chart. When the fast EMA is above the slow EMA, the trend is classified as bullish; when below, bearish. The region between the two EMAs is filled with a semi-transparent color (green for bullish, red for bearish), creating the "Aura Cloud." This cloud serves two purposes: it provides an immediate visual representation of trend direction and strength (a widening cloud suggests strengthening momentum), and it acts as the gatekeeper for all candlestick pattern signals.
Engine 2: Candlestick Pattern Detection
The pattern detection engine analyzes candle anatomy using shadow-to-body ratios and multi-bar structural relationships:
Hammer & Shooting Star — Single-candle patterns identified by comparing the lower shadow proportion, upper shadow proportion, and body proportion relative to the full candle range. A Hammer requires a lower shadow at least twice the body size, a body less than 50% of the range, an upper shadow under 15%, and a bullish close. The Shooting Star applies the mirror criteria with a bearish close. Doji candles (body < 10% of range) are excluded to avoid ambiguity.
Bullish & Bearish Engulfing — Two-candle patterns where the current candle's real body completely wraps the previous candle's body. An additional 120% size threshold ensures the engulfing candle demonstrates meaningful conviction beyond a marginal overlap.
Morning Star & Evening Star — Three-candle reversal patterns. A Morning Star requires a bearish candle two bars ago, a small-bodied middle candle (less than 50% of the prior body), and a bullish current candle that closes above the midpoint of the first candle's body. The Evening Star applies the inverse logic.
Engine 3: Dynamic Support & Resistance
The indicator uses Pine Script's pivot detection functions with a configurable lookback window (default 10 bars on each side). When a bar's high is confirmed as the highest within the lookback window, it becomes the current resistance level. When a bar's low is the lowest, it becomes the current support level. These levels persist on the chart as circle markers until a new pivot replaces them, providing a continuously updated structural reference frame.
Trading Ideas and Insights
Cloud Bounce + Pattern Confirmation — When price pulls back to the Aura Cloud boundary during an uptrend and a Hammer or Bullish Engulfing pattern fires at the cloud's edge, this represents a high-confluence long entry. The cloud acts as dynamic support, and the candlestick pattern provides the timing trigger.
Trend Reversal Detection — Watch for Morning Star or Evening Star patterns forming near pivot-based support or resistance levels just as the trend cloud begins to narrow. A narrowing cloud suggests weakening momentum, and a three-candle reversal pattern at a key structural level can signal an early trend change.
S/R Level Validation — Use the dynamic support and resistance levels to validate candlestick signals. A Bullish Engulfing pattern that forms precisely at the current support level carries more weight than one occurring at a random price point.
Trend Strength Assessment — The width of the Aura Cloud reflects the separation between the fast and slow EMAs. A wide, expanding cloud indicates strong trending conditions where trend-aligned patterns are most reliable. A narrow, contracting cloud suggests consolidation where signals should be treated with more caution.
Multi-Timeframe Confluence — Apply the indicator on a higher timeframe to establish the dominant trend direction, then switch to a lower timeframe to find trend-aligned candlestick entries. The cloud's direction on the higher timeframe provides the bias; the pattern signals on the lower timeframe provide the entry timing.
How Multiple Indicators Work Together
The Aura Trend & Candlestick Matrix integrates three distinct analytical techniques into a single decision-support system through a deliberate hierarchical architecture:
The EMA trend cloud establishes directional context, the candlestick pattern engine identifies potential reversal and continuation setups, and the pivot-based support and resistance levels provide structural price references — together forming a confluence-driven framework where signals must pass through multiple filters before reaching the chart.
The trend cloud sits at the top of the hierarchy as the primary directional filter. It answers the fundamental question: "Which side of the market should I be on right now?" By requiring all candlestick patterns to align with the cloud's direction, the indicator enforces a disciplined approach that avoids the common trap of trading counter-trend reversal patterns in strong trends.
The candlestick pattern engine operates as the timing mechanism within the trend context. Each pattern family captures a different market dynamic — Hammers and Shooting Stars detect single-bar rejection of price levels, Engulfing patterns identify momentum shifts through body-size dominance, and Morning/Evening Stars capture multi-bar sentiment transitions. By offering all three families simultaneously, the indicator provides multiple entry opportunities across different market conditions while maintaining the trend-alignment requirement.
The dynamic support and resistance engine adds a structural dimension that complements both the trend cloud and the pattern signals. While the cloud tells you the trend direction and the patterns tell you when to act, the S/R levels tell you where price is likely to react. Patterns forming at or near these pivot-derived levels carry inherently higher significance because they occur at prices where the market has previously demonstrated supply or demand.
Unique Aspects
Trend-gated pattern signals — Unlike standalone candlestick scanners that display every detected pattern regardless of context, this indicator enforces directional alignment. Bullish patterns are suppressed during downtrends and bearish patterns are suppressed during uptrends, producing a significantly cleaner signal set with higher expected reliability.
Ratio-based pattern detection with doji exclusion — Pattern identification uses proportional shadow-to-body ratios rather than fixed pip or point thresholds, making the detection logic adaptive across instruments and timeframes. The explicit doji exclusion prevents ambiguous candles from triggering false Hammer or Shooting Star signals.
120% engulfing threshold — The Engulfing pattern requires the current body to exceed the previous body by at least 20%, filtering out marginal engulfing candles that lack conviction and improving signal quality.
Three-engine confluence in a single overlay — By combining trend analysis, pattern recognition, and support/resistance detection in one indicator, traders avoid the visual clutter and potential conflicts of layering multiple separate tools on the same chart.
Distinct visual vocabulary — Each pattern family uses a unique shape (triangles for Engulfing, labeled markers for Hammers/Stars), allowing traders to instantly identify the pattern type without reading text labels.
How to Use
Add the Aura Trend & Candlestick Matrix to your chart. It overlays directly on the price chart, displaying the Aura Cloud, pattern signals, and S/R levels simultaneously.
Identify the current trend by observing the Aura Cloud color — a green cloud indicates a bullish trend (fast EMA above slow EMA), and a red cloud indicates a bearish trend. The cloud's width reflects trend strength.
Watch for candlestick pattern signals that appear on the chart. Green triangles (▲) below bars indicate Bullish Engulfing patterns; red triangles (▼) above bars indicate Bearish Engulfing. Labels marked "H", "S", "MS", and "ES" denote Hammer, Shooting Star, Morning Star, and Evening Star patterns respectively.
Cross-reference pattern signals with the dynamic S/R levels (green and red circle markers). Patterns occurring near support (for bullish) or resistance (for bearish) carry additional structural significance.
Use the candle coloring feature (enabled by default) for quick visual scanning — green candles confirm you are in a bullish trend zone, red candles confirm a bearish trend zone.
Set up alerts using the built-in "Bullish Setup" and "Bearish Setup" alert conditions to receive real-time notifications when a trend-aligned candlestick pattern is detected.
Combine with volume analysis or momentum oscillators for additional confirmation layers when entering trades based on the indicator's signals.
Customization
Fast EMA Length (default: 20) — Controls the responsiveness of the fast trend line. Lower values (10-15) make the cloud more reactive to recent price changes, suitable for shorter-term trading. Higher values (25-50) produce a smoother cloud for swing or position trading.
Slow EMA Length (default: 50) — Sets the anchor for the trend cloud. Common alternatives include 100 or 200 for longer-term trend identification. The gap between fast and slow lengths determines how quickly the cloud changes direction.
Color Candles Based on Trend (default: on) — Toggle candle coloring on or off. Disable if you prefer to use your chart's native candle colors or another coloring scheme.
Show Hammers / Shooting Stars (default: on) — Enable or disable single-candle reversal pattern detection. Disable if you prefer to focus only on multi-candle patterns.
Show Engulfing Patterns (default: on) — Enable or disable two-candle engulfing pattern detection.
Show Morning / Evening Stars (default: on) — Enable or disable three-candle star pattern detection.
Pivot Detection Length (default: 10) — Controls the lookback window for support and resistance detection. Lower values (3-7) detect more frequent, minor pivot levels; higher values (15-30) identify only major structural turning points.
Conclusion
The Aura Trend & Candlestick Matrix delivers a disciplined, confluence-based approach to technical analysis by requiring candlestick patterns to align with the prevailing EMA trend direction before they are displayed. By integrating a visual trend cloud, three families of rigorously defined candlestick patterns, and dynamic pivot-based support and resistance levels into a single overlay, this indicator provides traders with a comprehensive yet uncluttered analytical framework. Whether you are a day trader looking for precise trend-aligned reversal entries, a swing trader seeking high-probability pattern setups at key structural levels, or a position trader monitoring broad trend direction with candlestick confirmation, the Aura Trend & Candlestick Matrix offers a clean, systematic, and visually intuitive toolset for identifying where trend momentum and candlestick structure converge — the moments where trading opportunities are most compelling.
Indicator

Luminous Pivot S&R Matrix [Pineify]Luminous Pivot S&R Matrix — Dynamic Support & Resistance Zones with ATR-Adaptive Width and Breakout Detection
The Luminous Pivot S&R Matrix is a dynamic support and resistance indicator that automatically identifies significant pivot highs and pivot lows, constructs ATR-adaptive zones around them, and monitors each zone in real time for breakout invalidation. Unlike static horizontal line tools that require manual placement, this indicator continuously scans price action for structurally significant turning points using a configurable lookback window, then wraps each pivot in a volatility-scaled zone whose width adapts to current market conditions via the Average True Range (ATR). When price closes beyond a zone's pivot level, the zone is automatically deactivated and visually dimmed, while a breakout signal is plotted — giving traders a fully automated, self-managing support and resistance framework that stays relevant as markets evolve.
Key Features
Automatic pivot detection using a configurable lookback length to identify both major and minor structural turning points in price
ATR-adaptive zone construction that dynamically scales the width of each support and resistance zone based on current market volatility
Real-time zone management with automatic extension of active zones to the current bar and visual invalidation when zones are broken
Breakout detection system that flags bullish breakouts (close above resistance) and bearish breakouts (close below support) with triangle markers and candle coloring
Memory management system that limits the number of displayed zones per side, automatically removing the oldest zones to keep charts clean and readable
Built-in alert conditions for both bullish and bearish breakouts, enabling automated notification workflows
How It Works
The indicator operates through a three-stage pipeline: pivot detection, zone construction, and dynamic zone management.
Stage 1: Pivot Detection
The indicator uses Pine Script's built-in ta.pivothigh() and ta.pivotlow() functions with a user-defined lookback length (default: 15 bars). A pivot high is confirmed when a bar's high is the highest value within the lookback window on both sides. Similarly, a pivot low is confirmed when a bar's low is the lowest value within that same window. Because confirmation requires bars to the right of the pivot, detected pivots are inherently lagged by the lookback length — this is by design, as it ensures only structurally validated turning points are plotted, filtering out noise and false signals.
Stage 2: ATR-Adaptive Zone Construction
Once a pivot is confirmed, the indicator constructs a zone around it. Rather than using a fixed-width band, the zone boundaries are calculated using the 14-period ATR value at the pivot bar, scaled by the user's ATR multiplier (default: 0.8). The zone extends from pivot price + (ATR × multiplier) / 2 to pivot price − (ATR × multiplier) / 2 . This means zones are naturally wider during volatile market conditions and narrower during calm periods, providing contextually appropriate support and resistance bands. A horizontal line is drawn at the exact pivot price, and a semi-transparent box fills the zone area.
Stage 3: Dynamic Zone Management & Breakout Detection
On every bar, the indicator iterates through all active zones. Active zones are extended rightward to the current bar, keeping them visually current. The indicator then checks whether price has closed beyond the zone's pivot level — above for resistance zones, below for support zones. When a breakout occurs, the zone is deactivated (marked inactive), its visual appearance is dimmed to gray with a dashed line style, and a breakout flag is raised. This flag triggers the plotted triangle signal and candle coloring for that bar.
Trading Ideas and Insights
Zone Bounce Entries — When price approaches an active support zone from above, look for bullish reversal candlestick patterns (hammer, engulfing) within the zone for potential long entries. The zone's ATR-based width provides a natural area for price to find buyers, and the wider the zone, the more volatility the market has been experiencing — suggesting a larger potential reaction.
Breakout Continuation Trades — When a bullish breakout signal fires (green triangle), it confirms that price has closed above a resistance pivot. Traders can use this as confirmation to enter long positions, especially when the breakout occurs on above-average volume. The invalidated zone often becomes new support on retests.
Zone Density Analysis — Areas where multiple support or resistance zones cluster together represent stronger structural levels. When several pivots form at similar price levels, the overlapping zones create a high-confluence area that is more likely to hold or produce significant breakouts when finally violated.
Failed Breakout Recognition — If price triggers a breakout signal but quickly reverses back into the zone on the next bar, this suggests a false breakout or stop hunt. Traders can watch for these failed breakouts as potential reversal signals in the opposite direction.
Trend Context — In a strong uptrend, you will observe support zones consistently holding while resistance zones are frequently broken (bullish breakout signals). In a downtrend, the opposite pattern emerges. Tracking the ratio of bullish to bearish breakouts provides a structural view of trend strength.
How Multiple Indicators Work Together
The Luminous Pivot S&R Matrix integrates three complementary analytical techniques into a unified support and resistance system:
Pivot point detection provides the structural price levels, ATR-based zone construction adds volatility context to those levels, and the real-time breakout detection system transforms static levels into dynamic, self-managing trading zones — together forming a complete support and resistance analysis framework.
The pivot detection engine serves as the foundation, identifying bars where price has demonstrably reversed direction. The configurable lookback length allows traders to tune the sensitivity — a shorter lookback (5-10) captures minor swing points suitable for intraday trading, while a longer lookback (15-30) identifies major structural levels appropriate for swing and position trading.
The ATR-adaptive zone construction addresses a fundamental limitation of traditional pivot-based indicators: a single price line rarely captures the full area where supply or demand exists. By expanding each pivot into a zone scaled by the ATR, the indicator acknowledges that support and resistance are areas , not exact prices. The ATR multiplier gives traders control over how much volatility context to incorporate — a lower multiplier (0.3-0.5) creates precision zones for tight stop placement, while a higher multiplier (1.0-1.5) creates wider zones that capture the full range of potential price reaction.
The breakout detection and zone lifecycle management system is what transforms this from a static level-drawing tool into a dynamic analytical framework. By automatically tracking whether each zone remains active or has been invalidated, the indicator eliminates the manual overhead of monitoring multiple levels. The visual differentiation between active zones (solid colored) and broken zones (gray dashed) provides instant context about which levels are still structurally relevant. The memory management system ensures that only the most recent zones remain on the chart, preventing visual clutter that accumulates with traditional pivot indicators.
Unique Aspects
Volatility-adaptive zone width — Unlike fixed-width pivot zones or percentage-based bands, the ATR scaling ensures zones automatically widen during volatile periods and narrow during calm periods, providing contextually appropriate support and resistance areas across all market conditions.
Self-managing zone lifecycle — Zones are not simply drawn and forgotten. Each zone is actively monitored, extended, and eventually invalidated when broken. The visual transition from active (colored, solid) to broken (gray, dashed) creates an intuitive map of which levels remain structurally significant.
Structural pivot validation — By requiring confirmation bars on both sides of a pivot, the indicator only plots levels where price has demonstrably reversed. This eliminates the noise of minor fluctuations and focuses attention on levels where genuine supply or demand has been observed.
Clean chart design with memory management — The configurable zone limit per side prevents the chart from becoming cluttered with historical levels. The oldest zones are automatically removed when new ones form, ensuring the chart always shows only the most relevant current levels.
Dual breakout signaling — Breakouts are communicated through three simultaneous channels: plotted triangle markers, candle color changes, and configurable alert conditions. This multi-channel approach ensures traders never miss a breakout event regardless of how they monitor their charts.
How to Use
Add the Luminous Pivot S&R Matrix to your chart. It overlays directly on the price chart, displaying colored zones at detected pivot levels.
Observe the colored zones — green zones represent support areas (pivot lows), and red zones represent resistance areas (pivot highs). Active zones have solid lines and colored fills; broken zones appear gray with dashed lines.
Watch for breakout signals — a green triangle below a bar indicates price has closed above a resistance zone (bullish breakout), while a red triangle above a bar indicates price has closed below a support zone (bearish breakout). Breakout candles are also colored accordingly.
Use active zones as potential entry areas — look for price reactions (bounces, rejections) when price approaches an active zone. Combine with candlestick patterns or other confirmation tools for higher-probability entries.
Monitor zone invalidation patterns — frequent resistance breakouts suggest bullish momentum, while frequent support breakdowns suggest bearish momentum. This provides a structural view of the prevailing trend.
Set up alerts using the built-in alert conditions ("Bullish Breakout" and "Bearish Breakout") to receive notifications when price breaks through an active zone, even when you are not watching the chart.
Combine with volume indicators, trend filters, or momentum oscillators for additional confirmation before executing trades based on zone reactions or breakout signals.
Customization
Pivot Lookback (default: 15) — Controls how many bars on each side are required to confirm a pivot. Increase for major structural levels suitable for higher timeframes (20-30); decrease for more frequent pivot detection on lower timeframes (5-10).
Zone ATR Multiplier (default: 0.8) — Scales the 14-period ATR to determine zone width. Increase for wider zones that capture more price reaction area (1.0-1.5); decrease for tighter, more precise zones (0.3-0.5).
Max Active Zones per side (default: 5) — Limits how many support and resistance zones are displayed simultaneously. Increase if you want to see more historical context (8-15); decrease for a cleaner chart with only the most recent levels (2-3).
Support / Resistance Colors — Customize the zone and signal colors to match your chart theme or personal preference.
Zone Transparency (default: 85) — Controls the opacity of zone box fills and borders. Lower values make zones more prominent; higher values keep them subtle and non-distracting.
Conclusion
The Luminous Pivot S&R Matrix provides a methodologically rigorous approach to automated support and resistance analysis by combining structural pivot detection with volatility-adaptive zone construction and real-time breakout monitoring. By treating support and resistance as dynamic zones rather than static lines, and by automatically managing the lifecycle of each zone from creation through invalidation, this indicator eliminates the manual overhead of traditional S/R analysis while providing richer contextual information. Whether you are a day trader looking for precise intraday bounce zones, a swing trader identifying key structural levels for position entries, or a position trader monitoring major support and resistance breaks for trend confirmation, the Luminous Pivot S&R Matrix delivers a clean, self-managing, and visually intuitive framework for understanding where the market's key structural boundaries lie — and when they are being broken. Indicator
