Aperture Imbalance Register [JOAT]Aperture Imbalance Register
Introduction
Aperture Imbalance Register is an open-source Pine Script v6 indicator built to detect, rank, and manage directional imbalance zones in a more structured way than a basic fair value gap overlay. Instead of marking every raw three-candle gap and leaving the trader to judge which ones matter, the script builds a register of active bullish and bearish imbalance zones, measures their internal lower-timeframe participation, assigns a quality score, tracks mitigation progress, and keeps the resulting stack visible with a compact institutional-style dashboard.
The problem this indicator solves is selectivity. Many imbalance tools show too many zones, retire them too slowly, or provide no context for which inefficiencies are likely to matter. Aperture Imbalance Register focuses on the active imbalance stack and grades each register by combining gap displacement with lower-timeframe volume participation. That lets the trader see not only where imbalance exists, but how concentrated the internal participation was when the zone formed.
The script is designed for traders who use imbalance as part of a broader market-structure process. It is not trying to predict every reversal. It is designed to answer practical chart questions: where are the open directional inefficiencies, how strong are they, how much of each zone has been mitigated, and whether the current stack favors bullish or bearish continuation pressure.
Because the script uses Pine Script v6 lower-timeframe arrays, the register is not just a visual box painter. It uses lower-timeframe intrabar data to build participation histograms inside each zone, identify the local point of control of the imbalance, and display whether a register still has open space or has already been substantially repaired by later price action.
Core Concepts
1. Confirmed Bullish and Bearish Gap Detection
The script detects a bullish register when the current low is above the high from two bars ago and the middle bar confirms continuation. It detects a bearish register with the inverse condition. A sigma-style filter based on the statistical size of the gap helps reject weaker dislocations:
bool confirmedBullGap = enoughGapHistory and barstate.isconfirmed and low > high and high > high and bullGapSigma > gapSigma
bool confirmedBearGap = enoughGapHistory and barstate.isconfirmed and high < low and low < low and bearGapSigma > gapSigma
This means the indicator is not plotting every minor price skip. It requires both structural displacement and a size filter before a new register is added to the active stack.
2. Lower-Timeframe Participation Ranking
Once a gap is confirmed, the script requests lower-timeframe `close` and `volume` data using `request.security_lower_tf()` and maps intrabar participation into configurable bins across the zone. That participation profile is then used to score the register.
This matters because not all imbalances are equal. Some form with broad participation spread across the full zone. Others form with concentrated acceptance in one portion of the gap. The participation histogram helps identify where the market transacted most heavily inside the register and where the imbalance may be most meaningful on a retest.
3. Quality Scoring and Register Prioritization
Each register receives a quality score derived from the concentration of lower-timeframe participation plus the size of the gap sigma event. Higher-quality zones get more visual emphasis, stronger edges, and greater dashboard influence.
In practice, this creates a hierarchy. The trader does not need to treat every imbalance equally. The register list naturally emphasizes the zones with stronger displacement and denser participation.
4. Mitigation Tracking and Lifecycle Management
Open imbalance is not enough. What matters is whether the zone remains unfilled. The script measures mitigation depth as price trades back into the register and updates the display from open to partial mitigation to fully filled. When the `Retire Fully Mitigated Zones` option is enabled, fully repaired or invalidated zones are removed from the active stack.
This keeps the chart cleaner and prevents stale boxes from dominating the view after the market has already rebalanced the inefficiency.
5. Participation Histogram and Local POC
Each register can display a small internal histogram showing participation intensity by price segment. The maximum participation bin defines the register’s local point of control, and that level is drawn as a line through the zone.
This gives the register more structure than a plain box. Instead of just seeing the outer bounds, the trader can see where activity concentrated inside the imbalance.
Features
Bullish and bearish imbalance registers: Detects confirmed gap-style inefficiencies in both directions using confirmed-bar logic
Lower-timeframe participation model: Uses lower-timeframe arrays to rank each register by internal participation rather than gap presence alone
Quality scoring: Combines participation concentration and sigma displacement into a single register score
Mitigation tracking: Continuously estimates how much of each register has been repaired by later price action
Automatic lifecycle retirement: Fully mitigated or invalidated zones can be retired automatically to reduce clutter
Internal histogram bars: Optional profile bars show where lower-timeframe participation concentrated inside the zone
Point-of-control line: Each register maintains a local participation midpoint for tactical reference
Midline support: Optional dotted midpoint line helps visualize the fair center of the register
Dashboard summary: Displays bull count, bear count, mitigated count, average quality, best quality, stack count, and bias
Data-window exports: Publishes stack bias, quality sum, and active register count for downstream reading
Visual Elements
Register boxes: The outer body of each imbalance zone shows whether price is dealing with bullish or bearish open inefficiency
Participation bars: Optional internal profile bars highlight where lower-timeframe participation concentrated inside the register
Midline and POC references: The centerline and participation high point help identify the most important sub-levels inside the zone
Adaptive edge intensity: Stronger registers receive more visual emphasis than weaker ones
Mitigation labels: Each register updates from open to mitigation to filled so the chart communicates lifecycle state directly
Best Practices
Use the register stack as context, then let your own execution model decide entries
Favor high-quality registers that align with broader structure instead of reacting to every new zone
Treat partial mitigation as a sign that some imbalance has already been repaired, not as automatic invalidation
Be especially careful on symbols with poor lower-timeframe data because internal participation quality can degrade
If the active stack flips from one side to the other quickly, read that as changing imbalance context rather than a guaranteed reversal signal
Input Parameters
Intrabar Data:
Auto Lower Timeframe: Automatically derives a lower timeframe for participation analysis
Custom Lower Timeframe: Allows manual lower-timeframe selection when auto mode is disabled
Calculation Depth: Controls how much lower-timeframe history is requested
Imbalance Detection:
Gap Sigma Filter: Sets the minimum displacement strength required for a new register
Participation Bins: Controls how many internal profile slices are built inside each zone
Max Active Registers: Limits how many open registers remain on the chart at once
Retire Fully Mitigated Zones: Removes zones once they are effectively repaired or invalidated
Lifecycle And Display:
Extend Active Zones: Extends open registers to the right for forward reference
Show Participation Histogram: Displays the internal lower-timeframe bar profile
Show Midline: Draws a dotted centerline through each register
Show Dashboard: Enables the top-right summary panel
How to Use This Indicator
Step 1: Read the Stack Bias
Start with the dashboard. Compare the bullish and bearish active register counts and note the stack bias value. A positive bias means bullish imbalance is dominating the active structure. A negative bias means bearish imbalance is dominating.
Step 2: Focus on Quality, Not Quantity
Use the average and strongest quality readings to judge whether the active stack is meaningful. A chart with fewer but stronger registers is often more actionable than a chart with many weak inefficiencies.
Step 3: Watch Mitigation Progress
Each active register updates from open to partial mitigation to filled. Open registers represent unresolved inefficiency. Deeply mitigated registers have already lost part of their tactical edge.
Step 4: Use The Internal Profile
When the participation histogram is enabled, look for bins that concentrated most of the intrabar volume. The local point of control and denser profile segments often become the most useful retest references inside the wider zone.
Step 5: Apply It As Context, Not A Standalone Trigger
Aperture Imbalance Register works best as a context layer. It helps frame whether an imbalance stack is supporting continuation or warning of unresolved opposing pressure. Use it with your own structure, execution, and risk model.
Indicator Limitations
Because the script uses lower-timeframe data requests, realtime behavior can differ slightly from historical behavior as new intrabars accumulate inside the live bar
Mitigation does not guarantee reversal or continuation. It only shows how much of the zone has been traded back through
A strong register can still fail if broader market structure, liquidity, or volatility conditions change
On very low-history charts or symbols with thin lower-timeframe data, participation quality can be less informative than on liquid instruments
Originality Statement
Aperture Imbalance Register is original in the way it treats imbalances as managed registers rather than passive boxes. The script is published because it contributes more than a generic fair value gap mashup:
It ranks each imbalance with a lower-timeframe participation model instead of drawing every gap with equal importance
It combines gap displacement, intrabar participation, mitigation tracking, and internal histogram rendering into a single workflow
It maintains a tactical register stack with lifecycle management rather than leaving stale zones permanently on the chart
It exposes stack-level information through a dashboard and data-window fields so the indicator can be read systematically
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. Imbalance zones are analytical references based on historical price behavior and lower-timeframe participation, not guarantees of future reaction. Markets can rebalance, ignore, or invalidate any zone without warning. Always use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicator

Session Reclaim Planner [AGPro Series]Session Reclaim Planner
🧠 Core Idea
Did price reclaim a key session high or low with enough acceptance to create a valid planning context?
📌 Overview / What it does
Session Reclaim Planner is an intraday decision-support tool built around session high and session low reclaim behavior. It builds a configurable reference session, maps the session high/low rails, then monitors whether price temporarily loses one of those rails and reclaims it with measurable acceptance.
The script produces a 0-100 Reclaim Score, session level rails, a reclaim pocket, a risk edge, a target corridor, event labels, alerts, and a compact AG Pro planning panel. It is designed to help traders organize session reclaim context instead of reacting to every touch of a session level.
It does not predict price direction, automate trades, or mark every session high/low as important. The script focuses on a specific sequence: session rail built -> rail temporarily lost -> rail reclaimed by close -> acceptance quality reviewed.
🎯 Purpose & Design Philosophy
This script was built to fill the gap between simple session level markers and broad session reaction tools.
Many session indicators show highs, lows, opens, boxes, or kill zones. Those references can be useful, but they often leave the trader with the harder question: did the level actually get reclaimed with enough structure to matter?
Session Reclaim Planner supports a planning-first mindset. It asks whether the setup is valid, how strong it is, where the risk edge sits, where the target corridor is, and what the next action state should be.
⚡ Why This Script Is Different
Most session tools focus on time windows, session opens, or static high/low levels.
This script does NOT clone Session Reaction Map, Kill Zone Session Engine, Session VWAP Reaction Engine, Session Range Expansion Planner, Previous Day Sweep & Reclaim, or a generic support/resistance map.
Instead, it focuses only on session rail reclaim behavior after a completed reference session. The reclaim must come from a clear rail loss and a close back through the level, then the script evaluates acceptance, participation, room, and risk structure.
⚙️ Methodology
1. Context Detection
The script builds a configurable session range and stores the session high and low as active reclaim rails.
2. Reference Mapping
The high and low rails are projected forward. The user can evaluate both rails or focus only on the high or low.
3. Reaction Evaluation
The planner waits for a temporary rail loss, then checks whether price closes back through the rail with enough reclaim distance.
4. Visual Output
Accepted events create a reclaim pocket, risk edge, target corridor, chart labels, panel state, and alert conditions.
🗺️ How to Read the Chart
Zones = the reclaim pocket and target corridor.
Labels = rail loss, reclaim watch, plan review, failed reclaim, and target review events.
Colors = bullish low reclaim uses AGPro teal, bearish high reclaim uses AGPro pink, neutral review states use gold, and target context uses indigo.
Panel = current session level, Reclaim Score, acceptance status, risk edge, and action state.
🚦 Signals & States
• Reclaim Watch → price has temporarily lost a selected session rail and the planner is waiting for a reclaim close.
• Acceptance Watch → a reclaim close exists, but the plan still needs enough quality or acceptance.
• Plan Review → score and acceptance are strong enough to review risk and target context.
• Risk Edge Test → price is testing the active risk boundary.
• Failed Reclaim → price closes through the risk edge and the reclaim plan is no longer valid.
• Target Review → price reaches the target corridor and the reaction should be reviewed.
🔔 Alerts Logic
Bullish Session Reclaim triggers when the session low is lost, reclaimed, and the score reaches the alert threshold.
Bearish Session Reclaim triggers when the session high is lost, reclaimed, and the score reaches the alert threshold.
Plan Review triggers when the active reclaim reaches the required score and acceptance conditions.
Failed Reclaim triggers when price closes through the active risk edge.
Target Review triggers when price reaches the active target corridor.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The score combines multiple conditions:
• Reclaim close strength
• Acceptance closes
• Volume support
• Risk-to-target room
• Session range fit
When those elements align, the reclaim context becomes stronger. When one or more elements are weak, the panel keeps the user in watch or no-review states.
📊 When to Use
• 1H publication charts and lower intraday execution-review charts
• Intraday markets with clear session behavior
• Session high/low reclaim workflows
• London or New York continuation/reversal review
• Markets where traders actively monitor session rails
• Clean reclaim sequences after temporary level loss
⚠️ When NOT to Use
• Very low liquidity markets
• Extremely noisy micro timeframes
• Symbols where session windows are not meaningful
• Conditions with erratic gaps or unreliable volume
• Markets where the reference session is not relevant to your workflow
🎛️ Key Inputs
• Visual Timeframe Preset → default chart objects are optimized for 1H and lower publication charts, while 4H or all intraday visuals can be enabled manually.
• Session Timezone → defines how session windows are interpreted.
• Level Build Session → builds the reference high and low rails.
• Monitor Session → defines when reclaim behavior is evaluated.
• Reclaim Rail Mode → selects high, low, or both rails.
• Minimum Rail Loss ATR → controls how much level loss is required before a reclaim watch starts.
• Acceptance Closes → controls how many closes must hold the reclaimed side.
• Target Corridor Model → selects rail-based, R-based, or hybrid target logic.
• Panel and Label Settings → control readability, location, theme, and font sizes.
🖥️ Interface & Visual Design
The interface is built around a clean AG Pro planning panel and chart-first visual structure.
The session rails define the level context. The reclaim pocket defines the recovered area. The risk edge shows where the active plan weakens. The target corridor frames the next review area.
Labels are intentionally compact and offset away from candles so the chart remains readable without looking empty.
🧪 Practical Usage Workflow
1. Read the AG Pro panel.
2. Check whether the session rails are built.
3. Wait for a rail loss and reclaim close.
4. Review the Reclaim Score and acceptance count.
5. Compare the risk edge and target corridor with broader market context.
🔍 Interpretation Guidelines
Treat the script as a structured session reclaim map.
A higher score means the reclaim has cleaner acceptance, better participation, and better room relative to risk. A lower score means the reclaim may still exist, but the plan quality is weaker or incomplete.
The target corridor is a review area, not a guaranteed objective.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not auto trading
• Not guaranteed signals
• Not a generic support/resistance map
• Not a session open reaction scanner
• Not a VWAP reclaim tool
⚠️ Limitations & Transparency
Session behavior depends heavily on symbol, liquidity, timezone, and timeframe.
A reclaim that looks clean on one timeframe may look incomplete or noisy on another.
Volume support can be less reliable on markets where reported volume is limited or synthetic.
No rule-based script can account for every news event, spread condition, execution constraint, or market regime shift.
🧠 Market Context Notes
Session reclaim behavior often matters because traders watch session highs and lows as liquidity and structure references.
The key distinction is not the level itself. The key distinction is whether price lost the level, reclaimed it, and then held acceptance strongly enough to deserve review.
🧾 Use Case Examples
When price sweeps below the built session low, closes back above it, holds acceptance, and has room toward the opposite rail, the panel may move into Plan Review.
When price reclaims a rail but immediately closes through the risk edge, the state shifts to Failed Reclaim.
When price reaches the target corridor, the script marks Target Review so the user can evaluate the reaction instead of assuming continuation.
🧱 System Philosophy
Session Reclaim Planner follows the AGPro decision-engine model:
Validate the setup.
Score the quality.
Map the risk.
Frame the target.
Show the next action state.
🔐 Non-Promise Statement
The script does not provide certainty.
It organizes session reclaim context with rule-based logic and visual planning references.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own decisions, risk management, and execution.
This script is for educational and analytical use only and does not provide financial advice.
📚 Educational Note
Use the tool to study how session high and session low reclaim behavior changes across symbols, sessions, and timeframes.
Indicator

Mobile Wallstreet Confidence IndicatorMobile Wallstreet Confidence Indicator
Most indicators lie to you. They fire signals on every candle, flood your chart with noise, and leave you holding the bag wondering what went wrong. This one is different.
The Mobile Wallstreet Confidence Indicator was engineered to stay silent until the market is genuinely ready — and when it fires, you'll know exactly why and exactly how confident the setup is.
HOW IT WORKS
Every signal passes through a strict 6-layer filter system before a single arrow appears on your chart:
1. Multi-Timeframe Stack (M15 / H1 / H4 / D1)
The indicator reads all four timeframes simultaneously using a triple EMA alignment model. You control how many must agree before a signal is even considered. No more trading against the higher timeframe trend.
2. Hull MA Momentum Gate
Price must be on the correct side of a rising or falling Hull MA. If momentum isn't confirmed, the signal is blocked — full stop.
3. ATR Depth & Range Filter
The market must show meaningful range and retrace depth relative to ATR. Flat, choppy, low-conviction price action gets filtered out automatically.
4. Structure Clearance
Signals won't fire into overhead resistance or below key support. The indicator measures structure clearance in ATR units so it adapts to every market and every volatility environment.
5. Pattern Rank (0–10)
Each setup is scored across 5 criteria — EMA alignment, RSI momentum, structure break, candle body strength, and price position. Only setups above your minimum rank threshold make the cut.
6. Confidence Score (0–100)
Every signal comes with a live confidence score weighted across MTF agreement, trend alignment, Hull momentum, RSI strength, and pattern rank. You see the number. You decide your conviction.
WHAT YOU GET ON THE CHART
🟢 BUY arrow — all layers aligned bullish, confidence threshold met
🔴 SELL arrow — all layers aligned bearish, confidence threshold met
📊 MTF Dashboard — live top-right panel showing M15 / H1 / H4 / D1 direction, bull/bear counts, confidence scores, pattern ranks, and a plain-English status message telling you exactly what the market is waiting on
🏷️ Signal Labels — confidence score and pattern rank printed directly on every arrow so you never have to guess signal quality
FULLY CUSTOMIZABLE
Every parameter is adjustable to fit your trading style:
Execution timeframe
Fast / Slow EMA periods
Hull MA period
ATR period
Number of MTF timeframes required to agree
Minimum confidence score threshold
Minimum pattern rank threshold
Retrace depth multiplier
Structure clearance multiplier
Structure lookback window
Toggle new signals only, labels, and dashboard on/off
BUILT-IN ALERTS
Set PulseWire alerts on BUY and SELL signals and never miss a setup — whether you're watching the screen or not.
WHO THIS IS FOR
This indicator is for traders who are done with noise. If you want a tool that thinks before it speaks, filters relentlessly, and gives you full transparency on every signal it generates — this was built for you.
Swing traders. Day traders. Multi-timeframe operators. Anyone who trades with a plan.
Mobile Wallstreet. Confidence on every candle. Indicator

Confluence Engine Strategy [JOAT]Confluence Engine Strategy
Overview
Confluence Engine Strategy is a fully automated Pine Script v6 strategy that combines four independent signal layers into a single numeric confluence score (0–100) before executing any trade. Entries require genuine agreement between linear regression momentum, dual EMA trend regime, ATR volatility state, and higher-timeframe bias. All exits are ATR-proportional with configurable take-profit and stop-loss multiples, plus a bar-based timeout and a trend-flip emergency exit. Commission (0.05% per side) and slippage (2 ticks) are configured for realistic backtesting.
Why Require Confluence?
Single-condition strategies (e.g., "go long when RSI crosses 50") produce entries in every conceivable market environment — ranging, trending, low-volatility, high-volatility — most of which are statistically unfavourable for that signal type. Requiring multiple independent conditions to agree simultaneously filters the entry universe down to the high-probability subset where each individual indicator is operating in its most favourable context. The Confluence Engine makes this filtering explicit and auditable through a numeric score.
Signal Layer 1 — Linear Regression Crossover
The primary entry trigger mirrors the Regression Flux Candles logic: a 21-bar linear regression of close (LR close) crossing above/below an 8-bar SMA of itself. The LR approach de-noises price before computing the crossover, significantly reducing the whipsaw rate compared to raw close-based SMA crossovers.
Signal Layer 2 — Dual EMA Trend Regime
Two exponential moving averages (fast: 21-period, slow: 55-period) define the trend regime. Long entries are only considered when the fast EMA is above the slow EMA; short entries only when fast is below slow. This prevents the LR crossover from triggering counter-trend entries in established trends — one of the most common sources of false signals in momentum strategies.
Signal Layer 3 — ATR Volatility State
The current 14-bar ATR is compared to a 50-bar ATR. Entries are only accepted when the current ATR is above a configurable fraction of the slow ATR (default 0.7). This volatility gate blocks trades during compression phases — low-volatility periods where breakouts frequently fail. The strategy only participates when directional energy is present.
Signal Layer 4 — Higher-Timeframe Bias
A higher-timeframe linear regression direction is fetched via request.security() with lookahead_off. The HTF LR close vs. HTF LR open comparison gives a single bullish/bearish vote from the higher timeframe. Long entries receive a confluence bonus when the HTF agrees; short entries receive a bonus when the HTF is bearish. This aligns trade direction with the prevailing macro bias.
Confluence Score and Threshold
Each of the four layers contributes points to the confluence score:
- LR crossover in direction: +30
- Dual EMA alignment: +25
- ATR volatility expansion: +20
- HTF bias alignment: +25
Maximum score: 100. The minimum required score to execute an entry (default 60) filters out entries where fewer than three layers agree. This threshold is adjustable — lower it for more signals, raise it for higher selectivity.
Entry Logic
Long: LR crossover up AND the accumulated confluence score >= minimum AND the signal is on a confirmed bar AND warmup has elapsed AND no position is currently open AND no cooldown bars remain.
Short: LR crossover down AND confluence >= minimum AND same guards.
A configurable cooldown period (default 5 bars) prevents re-entering the same direction immediately after an exit, avoiding overtrading in choppy conditions.
Exit Logic — Four Exit Conditions
1. ATR Take-Profit: Long exits when close >= entry + ATR × TP multiplier (default 2.0). Short exits below entry - ATR × TP.
2. ATR Stop-Loss: Long exits when close <= entry - ATR × SL multiplier (default 1.2). Short exits above entry + ATR × SL.
3. Bar Timeout: If neither TP nor SL is hit within a configurable number of bars (default 20), the trade exits at market — preventing capital from being locked in stalled trades.
4. Trend Flip Exit: If the dual EMA regime flips against the trade direction (fast EMA crosses slow EMA), the trade exits immediately — recognising that the structural basis for the entry has been invalidated.
Strategy Properties
- Initial capital: $10,000
- Order size: 10% of equity per trade (sustainable risk allocation)
- Commission: 0.05% per side (representative of major exchange fees)
- Slippage: 2 ticks (accounts for spread and execution delay)
- Currency: USD
- Pyramiding: disabled (one position at a time)
These settings are designed to produce realistic backtesting results. Risk per trade is capped well below the 5–10% equity guideline. Commission and slippage are included to prevent overstating performance.
Inputs Reference
Signal Layers
- LR Length (21) — linear regression period
- Signal SMA Length (8) — crossover trigger SMA
- Fast EMA (21) / Slow EMA (55) — trend regime definition
- ATR Length (14) / ATR Slow Length (50) / ATR Threshold (0.70)
- HTF Timeframe — higher-timeframe bias source (default "D")
Confluence & Filters
- Min Confluence Score (60) — minimum sum of layer scores required for entry
- Cooldown Bars (5) — bars to wait after exit before re-entering
- Max Bars in Trade (20) — timeout exit
Risk Management
- TP ATR Multiple (2.0) — take-profit distance in ATR units
- SL ATR Multiple (1.2) — stop-loss distance in ATR units
How to Read the Results
Apply the strategy to a liquid instrument on a 1H or 4H chart with sufficient history to generate 100+ trades. Evaluate:
- Net profit relative to max drawdown (seek ratio > 2:1)
- Win rate in context of average win vs. average loss
- Profit factor (total gross profit / total gross loss, seek > 1.3)
- Number of trades (sufficient sample size for statistical inference)
Adjust the confluence minimum score to trade off signal frequency against quality: 50 produces more trades, 75 produces fewer but higher-quality entries.
Non-Repainting Design
All entries fire on strategy.entry() within barstate.isconfirmed blocks. HTF bias uses lookahead_off. No future bar data is accessed. Historical signals do not shift position.
Limitations
- The strategy is designed as a general-purpose framework. It is not optimised for any specific instrument or session. Optimal parameters vary significantly across markets and timeframes.
- ATR-based exits are approximate. In gap markets (equities overnight, weekend gaps on crypto), the stop-loss may be exceeded significantly before the exit executes.
- Backtesting results are computed on historical data only and do not account for execution quality, broker-specific fees, or market impact. Past backtesting performance does not guarantee future live results.
- The bar timeout exit may prematurely close positions that would have eventually reached TP. This is a deliberate conservative design choice to limit capital lock-up, not a flaw.
Disclaimer
This strategy is provided for educational and informational purposes only. Backtesting results presented in the strategy tester represent historical simulation and do not guarantee any future trading outcome. Past performance is not indicative of future results. Never risk capital you cannot afford to lose. Always use proper risk management and conduct independent analysis before making any trading decisions.
Made with passion by officialjackofalltrades
Strategy

Prism Channel Architecture [JOAT]Prism Channel Architecture
Introduction
Prism Channel Architecture is a dual-channel overlay indicator that layers two mathematically distinct structural frameworks onto your price chart simultaneously: a best-fit Pivot Channel derived from actual price pivot points, and a Linear Regression Channel built from statistical least-squares fitting. Together they create a structural prism through which trend direction, channel quality, and breakout momentum can be evaluated from multiple angles at once.
Most channel tools force you to choose between objectivity and responsiveness. Pivot channels adapt to real market structure but can lag. Regression channels are statistically rigorous but ignore actual swing highs and lows. PCA runs both engines in parallel and highlights the moments when they agree — bull alignment and bear alignment states — as the highest-conviction reads in the system.
Core Concepts
Pivot Channel Fitting
The indicator collects up to a configurable maximum of confirmed pivot highs and pivot lows using PulseWire's built-in pivot functions:
float pivHigh = ta.pivothigh(high, pivLeft, pivRight)
float pivLow = ta.pivotlow( low, pivLeft, pivRight)
From those stored pivot arrays, it searches for the best pair of recent pivot highs to fit the upper channel boundary, and the best pair of recent pivot lows to fit the lower channel boundary. The quality score for each candidate pair is computed by checking how many of the recent bars were actually contained below the upper line (or above the lower line) within an ATR tolerance:
for k = 0 to checks - 1
float lineY = linePrice(x2, y2, x1, y1, bar_index - k)
if high <= lineY + atrVal * 0.3
contained += 1
float q = safeDiv(float(contained), float(checks), 0.0)
The pair with the highest containment ratio wins and becomes the drawn channel. This means the upper channel line is always the tightest valid resistance line through recent pivot highs, not an arbitrary parallel projection.
Linear Regression Channel
The regression channel computes a full manual least-squares fit over the lookback window, producing slope, intercept, and residual standard deviation:
float slope = safeDiv(n * sumXY - sumX * sumY, n * sumXSq - sumX * sumX, 0.0)
float intc = safeDiv(sumY - slope * sumX, n, close)
float stdDev = math.sqrt(safeDiv(ssRes, n, 0.0))
The upper and lower bands are drawn at `stdDev × Deviation Multiplier` distance from the regression midline, giving bands that are statistically calibrated to the actual spread of price around the trend. Color shifts from bull to bear when slope changes sign.
Channel Alignment Confluence
The system declares a Bull Alignment when both channels simultaneously agree price is in a bullish position — the regression slope is rising AND price is above the regression midline, AND price is in the upper half of the pivot channel (between the midline and the upper band):
bool lrBull = close > midNow and slope > 0.0
bool pivBull = close > uMid and close < uNow
bool alignBull = lrBull and pivBull
This confluence state is highlighted with a subtle background color — a quiet but meaningful signal that two independent structural frameworks are pointing in the same direction.
ATR-Based Breakout Detection
Breakout signals fire when price moves more than a configurable ATR multiple beyond the prior bar, provided the regression slope confirms direction:
bool brkUp = ta.crossover(close, close + crossTol * atrVal) and lrSlope > 0.0
bool brkDn = ta.crossunder(close, close - crossTol * atrVal) and lrSlope < 0.0
Breakout labels (▲ BRK / ▼ BRK) appear above or below the breakout bar and are alert-enabled.
Features
Pivot Channel — best-fit upper/lower boundaries through recent pivot highs/lows, quality-scored by containment ratio
Regression Channel — least-squares midline with statistically calibrated deviation bands, auto-colored by slope direction
Channel midline — dashed neutral midline bisecting the pivot channel for zone positioning
Bull and Bear Alignment detection — background highlight when both channels agree on direction
ATR-normalized breakout labels — ▲ BRK and ▼ BRK when price breaks out with trend confirmation
Channel Quality score — displayed in dashboard as percentage of recent bars contained
Pivot position classification — Bull Zone (upper half) or Bear Zone (lower half)
Up to 40 pivot highs and 40 pivot lows stored and evaluated
10-bar channel projection extended to the right of the last bar
Dashboard: LR direction, deviation mult, pivot quality, pivot position, alignment, breakout, ATR, pivot count
Alerts for bullish breakout, bearish breakout, bull alignment, and bear alignment
Webhook JSON alert format
Watermark
Input Parameters
Pivot Channel
Pivot Lookback Left — bars to the left required to confirm a pivot high or low (default 10)
Pivot Lookback Right — bars to the right required to confirm a pivot high or low (default 5)
Max Pivots Stored — maximum number of pivot highs and lows held in memory (default 30)
Quality Check Length — number of recent bars used to score channel containment (default 20)
Breakout ATR Mult — ATR multiplier threshold for breakout label generation (default 1.5)
Show Pivot Channel — toggle the pivot channel lines on/off
Regression Channel
Regression Length — bars used in the least-squares fit (default 50)
Deviation Mult — standard deviation multiplier for band width (default 2.0)
Show Regression Channel — toggle the regression channel lines and fill on/off
ATR Settings
ATR Length — lookback for ATR calculation used in breakout detection and containment tolerance (default 14)
Visuals
Bull Color — color for uptrending channels and bullish labels
Bear Color — color for downtrending channels and bearish labels
Neutral Color — color for channel midlines and neutral dashboard text
Show Dashboard — compact structural summary panel
Show Watermark
Show Breakout Labels — toggle ▲ BRK / ▼ BRK label markers
Alerts
Webhook JSON Format — switches alert messages to JSON format for automation pipelines
How to Use
Add PCA to your chart as a main-pane overlay indicator.
Let the chart load enough history so both channels initialize. A warmup period of at least 60 bars is enforced before channels begin drawing.
Use the Regression Channel to assess macro trend direction. If the midline slope is rising and price is above it, the macro environment is bullish.
Use the Pivot Channel to identify the structural support and resistance boundaries formed by actual price pivots. The upper pivot line is the tightest valid resistance. The lower pivot line is the strongest structural support.
Watch for Bull Alignment (cyan background) when both systems agree price is in a bullish structural position. This is the highest-conviction environment for long setups.
Watch for Bear Alignment (red background) for bearish structural setups.
Treat Breakout labels as momentum confirmation signals — they only fire when an ATR-significant price move occurs in the direction of the regression slope.
Check the Pivot Quality score in the dashboard. A quality above 65% means the channels are actively containing price well. Below 40% means the channel fit is loose and breakouts are less reliable.
Indicator Limitations
Pivot channel fitting evaluates only the 8 most recent pivot highs and the 8 most recent pivot lows when searching for the best pair. In very choppy markets with many closely-spaced pivots, the fitted channel may appear narrow or erratic.
The regression channel is recalculated on every bar over a fixed lookback window. It will repaint the past visually as new bars are added — the channel reflects the lookback window ending at the current bar, not a fixed historical period.
Channel quality scores can be artificially high in low-volatility trending conditions where price barely touches the edges of the channel.
Breakout signals require both an ATR threshold move AND a confirming regression slope. In sideways markets the slope condition filters out most breakout candidates, which may lead to missed signals on genuine horizontal range breaks.
Originality Statement
Prism Channel Architecture is an original Pine Script v6 publication. The dual-engine architecture combining a quality-scored best-fit pivot channel with an independently computed least-squares regression channel, and the definition of alignment confluence as agreement between those two distinct structural systems, is an original design. The pivot quality scoring methodology — measuring the containment ratio of recent bars within the candidate channel bounds with ATR tolerance — is an original technique not derived from any existing published indicator.
Disclaimer
This indicator is for educational and informational purposes only. Channels, alignment states, and breakout labels are analytical tools and do not constitute financial advice. Channel boundaries can and will be violated without warning. Always apply proper risk management and never trade solely based on indicator signals.
-Made with passion by jackofalltrades
Indicator

Solstice Fibonacci Engine [JOAT]Solstice Fibonacci Engine
Introduction
The Solstice Fibonacci Engine is a fully automatic Fibonacci retracement and extension tool built for traders who want institutional-grade price levels drawn on their chart without the tedium of manually dragging anchor points. It detects the dominant swing high and swing low within your currently visible chart range, recalculates every time you scroll or zoom, and renders the complete Fibonacci suite — retracements from 0% to 100% and extensions to -100% — in a single, clean overlay.
The engine is purpose-built around two price zones that institutional order flow traders treat as highest-probability areas: the OTE (Optimal Trade Entry) zone from 61.8% to 78.6% retracement, and the Target Zone from -50% to -61.8% extension. These zones are shaded and labeled automatically, with TP1 through TP4 labels placed at the key confluence levels that align with those areas, giving you a ready-made trade management framework the moment any new swing is established.
Core Concepts
Visible Range Swing Detection
Unlike most Fibonacci tools that require manual anchoring or use fixed lookback lengths, Solstice tracks the swing high and swing low within the portion of the chart you are actually looking at:
int visLeft = int(chart.left_visible_bar_time)
int visRight = int(chart.right_visible_bar_time)
bool isVis = time >= visLeft and time <= visRight
if isVis
if na(swHi) or high > swHi
swHi := high
swHiBar := bar_index
if na(swLo) or low < swLo
swLo := low
swLoBar := bar_index
When you scroll left or right the swing resets instantly to reflect your new visible window. This makes the tool behave like a dynamic Fibonacci that always measures the most contextually relevant move — the one you are actually analyzing.
Trend Direction from Swing Sequence
The engine determines whether price is in an uptrend or downtrend by comparing the bar index of the swing high against the bar index of the swing low:
bool trendUp = nz(swLoBar, 0) < nz(swHiBar, 0)
If the swing low came first (left) and the swing high came after (right), price moved up — so retracement levels are drawn from the top down. If the swing high came first, price moved down and levels are drawn from the bottom up. This single boolean drives whether TP1–TP4 labels are placed above or below current price.
OTE Zone — 61.8% to 78.6%
The Optimal Trade Entry zone marks the golden pocket of Fibonacci retracement theory. Price returning into this band after a clean impulsive move often finds the institutional order flow that originally created the swing:
if showOTE
fibZone(color.new(oteClr, 90), 61.8, 78.6, trendUp,
bar_index - 2, lx, swHi, swLo, "OTE ZONE")
The zone is rendered as a shaded box extending to the right of the last visible bar, keeping it visible as new bars form. An alert fires on bar close the first time price enters this zone after it was outside it.
Target Zone — -50% to -61.8% Extension
The Target Zone marks the take-profit extension area beyond the 0% level:
if showTgt
fibZone(color.new(tgtClr, 90), -50.0, -61.8, trendUp,
bar_index - 2, lx, swHi, swLo, "TARGET ZONE")
When price has retraced into the OTE and reversed, the -50% to -61.8% extension zone becomes the natural profit target objective — where the move typically exhausts before the next consolidation.
TP1–TP4 Trade Management Labels
Four take-profit labels are placed at the levels that define a complete trade management plan from entry to full profit-taking:
| Label | Level | Meaning |
|-------|-------|---------|
| TP1 | 38.2% | First objective — scalp or partial close |
| TP2 | 0% | Full return to the original swing point |
| TP3 | -27.2% | First extension beyond the swing |
| TP4 | -61.8% | Deep extension — full target zone |
Features
Auto swing detection from visible chart range — no manual anchoring required
Dynamic recalculation on every chart scroll or zoom
Full Fibonacci suite: 0%, 23.6%, 38.2%, 50%, 61.8%, 70.6%, 78.6%, 100%, -27.2%, -50%, -61.8%, -100%, 150%, 200%
Per-level toggle switches — show only the levels you want
OTE Zone (61.8%–78.6%) shaded box with right-extension
Target Zone (-50% to -61.8%) shaded box with right-extension
TP1–TP4 labels with optional percentage labels on every level
Optional swing diagonal line from anchor to anchor
Dashboard showing swing trend, zone touch status, swing high/low, and range
Auto dark/light theme detection
Alerts fire on confirmed bar close when price enters OTE or Target Zone
Webhook JSON alert format for automation
Watermark
Input Parameters
Main Settings
Show All Elements — master toggle for all drawing objects
Show Swing Diagonal Line — draws a line connecting the two swing anchor points
Line Width — 1 to 5 pixels
Line Style — Solid, Dashed, or Dotted
Label Offset (bars) — how far to the right labels are placed beyond the last bar
Fibonacci Levels
Individual toggles for each level: 0%, 23.6%, 38.2%, 50%, 61.8%, 70.6%, 78.6%, 100%, -27.2%, -50%, -61.8%, -100%, 150%, 200%
Zones and Targets
Show OTE Zone — toggles the 61.8%–78.6% shaded box
Show Target Zone — toggles the -50% to -61.8% shaded box
Show Zone Labels — text inside zone boxes
Show TP1–TP4 Labels — take-profit label markers
Show Level % Labels — percentage text on every drawn level line
Visual Settings
Theme — Auto (reads chart background), Dark, or Light
Show Dashboard — compact panel showing current swing readings
Dashboard Position — Top Left, Top Right, Bottom Left, Bottom Right
Show Watermark
Webhook JSON — switches alerts to machine-readable JSON format
Colors
Fib Lines — color for all retracement/extension level lines
OTE Zone — fill color for the OTE box
Target Zone — fill color for the Target Zone box
How to Use
Add the indicator to any chart on any timeframe — it automatically maps to your current visible range.
Zoom or scroll your chart to frame the impulsive swing you want to analyze. The Fibonacci grid recalculates to match.
Look for price to retrace into the OTE Zone (gold band between 61.8% and 78.6%). This is the institutional entry area.
When price reverses out of the OTE zone, monitor the TP1 label at 38.2% for partial profits, TP2 at 0% for full return to the swing origin, and TP3/TP4 in the Target Zone for extended runners.
Set the OTE Zone and Target Zone alerts to receive notifications when price enters either area on bar close.
Enable percentage labels if you need to confirm exact level values for manual entries.
Indicator Limitations
The swing is determined by the highest high and lowest low within the visible range only — it does not use a structural pivot detection algorithm. On heavily zoomed-out charts, the swing might span an unusually long period.
Fibonacci levels are mathematical retracements of the detected swing range. They are areas of interest, not guaranteed reversal zones. Always combine with your own confluence analysis.
The OTE and Target Zone alerts trigger only on the first bar close when price enters the zone from outside. If price exits and re-enters, a new alert fires.
Retracement drawing regenerates on every bar close at the last bar. On very high-resolution timeframes with large numbers of active objects, this can approach PulseWire drawing limits.
Originality Statement
The Solstice Fibonacci Engine is an original Pine Script v6 implementation. Its use of chart.left_visible_bar_time and chart.right_visible_bar_time for dynamic visible-range swing detection is a novel approach that produces a self-adjusting Fibonacci tool with no manual intervention. The OTE and Target Zone framework, TP1–TP4 label system, and scroll-responsive recalculation are original design decisions made specifically for this publication.
Disclaimer
This indicator is for educational and informational purposes only. It does not constitute financial advice. Fibonacci levels are areas of potential price reaction, not certainties. Past Fibonacci confluence does not guarantee future performance. Always use proper risk management and consult a licensed financial professional before trading.
-Made with passion by jackofalltrades
Indicator

Convergence Protocol [JOAT]
Convergence Protocol
Introduction
Convergence Protocol is an open-source strategy that combines four analytical modules — structural trend, volatility regime, delta pressure, and liquidity/structure break detection — into a multi-pathway entry and exit system. The strategy generates trade signals through five independent entry mechanisms, each requiring alignment between different analytical dimensions, and manages positions with ATR-based stops, dual take-profit levels, and an optional trailing stop that activates after the first target is reached.
The design rationale for combining these four modules is that each answers a different question about the market. Structure and trend analysis answers: what direction is the market likely to move? Volatility regime answers: does the market have the energy to sustain a directional move? Delta pressure answers: is volume supporting the proposed direction? Liquidity and structure break detection answers: has the market made a meaningful structural commitment that confirms directional intent? No single module alone provides a robust enough basis for a trade. Convergence across multiple modules provides a higher-quality signal set that reduces the frequency of marginal trades while maintaining enough opportunities to be practical.
Strategy Properties and Backtesting Settings
Default settings used for publication:
Initial Capital: Default PulseWire account size
Position Size: 5% of equity per trade
Commission: 0.04% per side (realistic for most crypto and equity platforms)
Slippage: 1 tick
Risk Per Trade: 5% of equity maximum (within sustainable limits)
Stop Loss: 1.5x ATR from entry
TP1: 1.2x risk (50% of position closed)
TP2: 2.5x risk (remaining position)
Trailing Stop: 1.0x ATR trailing offset, activates after TP1 hit
Backtesting results will vary significantly by instrument and timeframe. This strategy is intended to be evaluated across multiple instruments and market conditions before drawing conclusions. A single backtest run does not constitute evidence of future performance.
Core Modules
Module 1: Structural Trend Engine
The baseline uses a double-smoothed moving average (SMEMA). Swing highs and lows are tracked to classify market structure as bullish (HH+HL), bearish (LH+LL), or neutral. A 0-7 confluence score is assembled from: regime direction, structural alignment, volatility expansion, absence of squeeze, delta pressure, structure break confirmation, and liquidity sweep confirmation. Each module contributes a binary point to the score.
Module 2: Volatility Regime
Short-period ATR is compared to long-period ATR. A ratio above 1.05 with a rising oscillator confirms volatility expansion — the market has enough energy for directional moves. A squeeze condition (fast ATR well below slow ATR and its own moving average) signals that the market is coiling; entries are filtered or blocked depending on settings.
Module 3: Delta Pressure
Bar-by-bar delta (positive on bullish bars, negative on bearish bars) is smoothed into fast and slow EMAs. Their cross and relative position provide a directional bias from the volume perspective.
Module 4: Liquidity and Structure
A break of structure (BOS) is confirmed when price closes beyond the most recent pivot in any direction on a confirmed bar. Liquidity sweeps are detected when price wicks beyond a prior swing and closes back on the correct side. Both conditions contribute to the confluence score.
Entry Mechanisms
1. Confluence Score Entry
All four modules must be aligned and score at or above the minimum threshold (default: 2 of 7). This is the primary high-conviction entry.
2. Baseline Pullback Entry
In an established trend (regime confirmed), when price returns to within the step band of the baseline with positive delta confirmation, a pullback entry is generated. This produces more frequent entries by adding trend-continuation trades within an established directional move.
3. Squeeze Breakout Entry
When a detected squeeze condition resolves (squeeze ends) with trend and delta alignment, a breakout entry fires. This targets the expansion phase immediately following volatility compression.
4. Delta Crossover Entry
When the fast delta EMA crosses above the slow delta EMA in the direction of the regime, and the market is not in a squeeze, a momentum entry is generated.
5. Sweep Reversal Entry
When a liquidity sweep occurs with confirming delta pressure, a reversal entry is generated in the direction of the sweep reversal. This targets the classic sweep-and-go pattern.
Exit Logic
TP1: 50% of position closed at 1.2× risk. Locks in partial profit and reduces position size for the remainder of the trade
TP2: Remaining 50% targets 2.5× risk with a hard stop at the original stop level
Trailing Stop: After TP1 is hit, the strategy optionally converts to a trailing stop with an ATR-based offset, allowing the winning portion of the trade to capture extended moves
Regime Exit: If the market regime flips against the position (bullish regime while short, or bearish regime while long), the position is closed at market. This protects against holding trades through structural regime reversals
Limitations and Considerations
The strategy uses OHLCV-based calculations throughout. It does not have access to tick data, order book information, or real-time execution data that institutional traders use
Backtesting results are inherently optimistic due to perfect execution assumed at bar close prices. Real-world execution will differ
The five entry mechanisms produce different trade frequencies. Users should evaluate each mechanism independently in backtesting before enabling all simultaneously
The regime change exit can produce early exits in choppy markets where the regime briefly flips before resuming the original direction
The trailing stop activation after TP1 is a fixed ATR offset from the highest/lowest price reached. It does not adapt to subsequent volatility changes during the trade
The strategy is designed for trending markets. In persistent ranging environments, the confluence score-based entries will underperform because the regime module will frequently return a Ranging classification, suppressing primary entries
Commission and slippage settings in the strategy Properties should be adjusted to match the actual costs on the instrument and broker being used before drawing any performance conclusions
Originality Statement
This strategy is original in its specific multi-pathway entry architecture and the unified 0-7 confluence scoring system that synthesizes structural, volatility, delta, and liquidity analysis into a single conviction metric. Each of the five entry pathways serves a distinct market condition: confluence entries target high-alignment setups; pullback entries target trend continuation in established moves; squeeze breakout entries target volatility expansion transitions; delta crossover entries target momentum initiation; sweep reversal entries target institutional accumulation/distribution patterns. No single existing strategy approach covers all five scenarios. The combination is justified because these five market conditions occur at different points in the market cycle, and a strategy limited to one condition type will sit idle during the other four.
Disclaimer
This strategy is provided for educational and informational purposes only. Past backtest results do not guarantee future performance. No backtesting result should be interpreted as evidence that this strategy will be profitable in live trading. Markets change, and conditions that produced past results may not recur. The strategy does not account for taxes, broker requirements, or psychological factors in live trading. Always use proper risk management and consult with a qualified financial professional before making any investment decisions. The author is not responsible for any losses incurred from using this strategy.
-Made with passion by officialjackofalltrades
Strategy

Candle Volume Architecture [JOAT]
Candle Volume Architecture
Introduction
Candle Volume Architecture is an overlay indicator that constructs a price-based volume distribution profile for each detected swing, identifies the Point of Control (the price level with the highest bar density within that swing), calculates a configurable Value Area (default 70% of distribution), and renders these findings as a visual volume architecture directly on the price chart. Unlike traditional Volume Profile tools that require fixed time periods or session boundaries, this indicator auto-detects swings from price action and builds its distribution profile dynamically around each structural move.
Volume Profile is a professional tool used to identify price levels with the highest historical trading interest. The Point of Control is the level within any period where the most trading occurred — it functions as a gravitational center that price tends to revisit. The Value Area contains the majority of trading activity and often provides support and resistance as price moves away from and returns to it. This indicator applies these concepts to auto-detected price swings rather than calendar periods, aligning the profile with actual market structure rather than arbitrary time divisions.
Core Concepts
1. Swing Detection
Swings are detected by tracking when price makes a new extreme and then retreats. An upper swing is confirmed when the prior bar's high matched the N-bar highest high, but the current bar fails to match — indicating the swing high has been set. The same logic applies to lower swings. This produces swing high and low markers that update as new extremes form.
2. Volume Distribution Profile
When a swing direction change is detected (bull to bear or bear to bull), the prior swing's price range is divided into a configurable number of bins (default 24). Each bin is populated by counting how many bars within the swing had their closing price fall within that bin's price range. The bin with the highest count becomes the Point of Control.
bin_size = (real_top - real_bot) / i_bins
for j = 0 to bars_in_range
idx = int((close - real_bot) / bin_size)
bins_count.set(idx, bins_count.get(idx) + 1)
3. Point of Control (POC)
The POC is the bin with the highest bar count. It is rendered as a dual-width line (thin solid + thick shadow) that extends forward in time, providing a live reference for where the most concentrated activity occurred in the last swing.
4. Value Area Calculation
Starting from the POC, the Value Area expands outward, adding the next highest-count bin on either side until the cumulative count reaches the configured percentage of total bars (default 70%). The Value Area is rendered as a transparent box covering the identified price range.
5. Profile Bin Visualization
Each bin is rendered as a box whose right edge extends proportionally to its bar count (wider = more activity). Opacity scales with count, so the POC bin is fully opaque and low-count bins are more transparent. This produces a horizontal bar chart appearance directly on the price chart.
Features
Auto-Detected Swing Profiles: Profile builds and renders at each swing direction change
Point of Control Line: Dual-width shadow line extending from each swing, updated to current bar
Value Area Box: Transparent zone covering the configurable percentage of swing volume
Opacity-Scaled Bin Bars: Visual profile bars with count-proportional width and transparency
Swing Range Outline: Dashed box delineating each swing's high-to-low range
Live Swing Direction Line: Current swing trend line drawn on the last bar
POC Proximity Detection: Dashboard highlights when price is within 0.3 ATR of the active POC
8-Row Dashboard: Swing trend, POC level, swing high/low, swing range, POC bias
Input Parameters
Swing Length: N-bar highest/lowest lookback for swing detection (default: 80)
Profile Bins: Number of price bins in the distribution (default: 24)
POC Line Width: Width of the POC rendering line (default: 2)
Value Area %: Percentage of distribution to include in the Value Area (default: 70%)
Show Profiles: Filter to bull only, bear only, both, or none
How to Use This Indicator
POC as Reference
The active POC line represents the most contested price level of the last swing. Price frequently revisits this level. When price is above the POC, the POC functions as potential support. When price is below, potential resistance.
Value Area as Context
Price outside the Value Area (above VAH or below VAL) represents a less-active price zone. Moves outside the Value Area that fail to hold can return toward the Value Area. Sustained acceptance outside the Value Area suggests a new distribution is forming.
Profile Shape for Sentiment
A profile that is skewed toward the top of its range (POC near the high) suggests the swing was dominated by higher-price acceptance — bullish distribution. A POC near the swing low suggests bearish distribution.
Limitations
The distribution is built from closing prices within the swing range, not from actual volume at price. This is a close approximation but differs from true Volume Profile tools that use tick data
The swing detection requires a minimum of swing-length bars before the first profile is generated
On very fast timeframes (1 minute or lower), the swing lengths may be too short to produce meaningful distributions
The maximum bars in range cap (500 bars) prevents the profile builder from analyzing excessively long swings that could cause performance issues
Originality Statement
Applying Volume Profile methodology to auto-detected price swings rather than fixed calendar periods produces profiles that are structurally relevant rather than time-arbitrary. The opacity-scaled bin rendering produces an intuitive visual representation where the most active levels are immediately obvious. The real-time POC proximity detection in the dashboard provides an active alert when price approaches the most significant level of the last swing.
Disclaimer
This indicator is for educational and informational purposes only. The distribution profiles are approximations built from close price counts, not true order flow data. Point of Control and Value Area levels are historical references and do not guarantee future price reactions. Always apply proper risk management.
-Made with passion by officialjackofalltrades
Indicator

Indicator

Adaptive Regime Momentum [JOAT]Adaptive Regime Momentum
Introduction
The majority of publicly available trend-following strategies rely on one of two entry mechanisms: a moving average crossover, or a price-versus-MA relationship. These are valid starting points, but they share a common weakness — they fire signals based on a single confirmatory condition that can be triggered by brief, low-conviction price moves. A single bar pushing above a moving average while volume is thin and the MA is barely sloping is not the same market condition as a sustained directional move with volume behind it and a clearly sloping MA. Yet a simple strategy would treat both identically.
Adaptive Regime Momentum is a trend-following strategy that requires three independent conditions to align before generating an entry signal. These three layers — MA slope confirmation over multiple consecutive bars, price position relative to the MA, and a volume-based demand filter — must all agree simultaneously. The result is a strategy that generates fewer signals but with higher internal consistency between entry conditions. It is designed for liquid markets on daily or higher timeframes where each component is reliably measurable.
This is an overlay strategy — all visuals are plotted directly on the price chart.
---
Strategy Properties
The following default settings are used for all backtests unless modified:
Initial capital: $10,000
Position sizing: 5% of equity per trade
Commission: 0.05% per side
Pyramiding: 0 (only one open position at a time; new signals are ignored while a position is active)
Stop loss: 2.5x ATR below the entry price (long), 2.5x ATR above the entry price (short), calculated from strategy.position_avg_price
Take profit: 4.0x ATR above the entry price (long), 4.0x ATR below the entry price (short), calculated from strategy.position_avg_price
Trail / slope exit: Position is closed early if price crosses to the wrong side of ComboMA ± 1.5x ATR, or if the MA slope reverses direction
The stop and take profit are anchored to strategy.position_avg_price — the actual average fill price of the position — rather than the signal bar's close. This ensures that in backtesting, stop and TP distances are measured from where the trade was actually opened, not from a theoretical signal level.
These are backtesting defaults only. They do not represent a recommendation for live trading position sizing or risk management.
---
Core Concepts
Signal 1 — ComboMA Slope Confirmation (Structural Momentum)
The ComboMA is a blend of two moving averages:
ALMA (Arnaud Legoux Moving Average) — a smooth MA with reduced lag, fitting to recent price without overreacting to single bars
ZLMA (Zero-Lag Moving Average) — a lag-compensated MA designed to reduce the delay between price movement and MA response
The two are blended into a single ComboMA value. The slope of this composite is then evaluated not just on the current bar, but across the last N consecutive bars (default: 3). A slope is only confirmed as UP if all of the last 3 bars showed a positive slope. A slope is only confirmed as DOWN if all 3 bars showed a negative slope. A single slope fluctuation — even if the most recent bar shows a positive slope — does not trigger confirmation unless all N bars agree.
This multi-bar slope confirmation is the primary mechanism that distinguishes this strategy from a simple MA-based entry. A one-bar slope flip that immediately reverses is filtered out. Only a sustained slope direction triggers the first condition.
Signal 2 — Price vs. ComboMA (Real-Time Confirmation)
The second condition requires that price is currently on the correct side of the ComboMA:
For a long: close > ComboMA
For a short: close < ComboMA
This condition is evaluated at the current bar, providing real-time confirmation that price is aligned with the structural slope direction. The MA slope could be upward from prior bars, but if price has already pulled back below the MA, the second condition vetoes the entry. Both the historical slope and the current price position must agree.
Signal 3 — Volume RSI (Demand Pressure Validation)
Volume RSI is RSI applied to raw volume over an 8-bar period, then divided by 50. A result above 1.0 (the default threshold) means the Volume RSI is above 50 — indicating that volume activity on recent bars has been relatively elevated compared to the preceding period.
For a long entry: Volume RSI / 50 must exceed the threshold
For a short entry: same condition applies
Volume RSI does not confirm direction — it confirms participation . A move accompanied by above-average volume has more demand/supply backing than a low-volume drift. When volume is below threshold, the third condition is not met and no entry is generated, even if slope and price position align.
RSI Filter
An additional RSI filter is applied to the close:
RSI(14) must be above 50 for long entries
RSI(14) must be below 50 for short entries
This acts as a momentum gating condition — confirming that short-term momentum is consistent with the trade direction before entry is permitted.
Non-Repainting Execution
All entry conditions are gated by barstate.isconfirmed . No signal is generated until the current bar has fully closed. This prevents intra-bar signal flickering and ensures that the backtest accurately represents what would have been traded on confirmed bar closes.
---
Exit Logic
The strategy uses a layered exit system combining fixed risk-defined targets with adaptive trend exits:
Fixed exits (via strategy.exit):
Stop loss at 2.5x ATR from entry price
Take profit at 4.0x ATR from entry price
Trail exits (via strategy.close):
Price closes beyond ComboMA ± 1.5x ATR on the wrong side
The ComboMA slope reverses (multi-bar confirmation fails in the opposite direction)
The trail exit allows winning positions to exit earlier if the trend deteriorates before reaching the fixed take profit, while the fixed TP provides a defined maximum target. The stop loss is the unconditional floor regardless of trail conditions.
---
ATR Shadow Visual
The chart displays two layers of ATR bands around the ComboMA:
Inner band: ComboMA ± 1x ATR
Outer band: ComboMA ± 2x ATR
These bands give a visual read of how extended price is from the MA relative to recent volatility, and where the trail exit threshold sits (1.5x ATR, between the two bands). They are visual aids only and do not affect strategy logic.
---
Performance Table
A table is displayed on the chart showing current strategy metrics:
Net P&L
Open P&L (current unrealized)
Win Rate
Average winning trade
Average losing trade
Maximum drawdown
Total trades
Current position direction
Current MA slope status
---
Features
Three-layer entry confirmation: multi-bar MA slope, price vs. MA, and Volume RSI
RSI momentum filter as an additional gating condition
ALMA + ZLMA blend for the ComboMA, reducing lag without sacrificing smoothness
Multi-bar slope confirmation preventing single-bar slope flickers from triggering entries
ATR-based stop and take profit anchored to actual fill price via strategy.position_avg_price
Trail exit on slope reversal or price-vs-MA breach
Non-repainting: all signals confirmed via barstate.isconfirmed
Pyramiding disabled — one position at a time
ATR shadow bands for visual context around the ComboMA
Live performance table with key metrics
---
Input Parameters
ALMA / ZLMA settings — length, offset, and sigma for each MA component
Slope Confirm Bars (default 3) — consecutive bars of slope agreement required for confirmation
Volume RSI Length (default 8) — RSI period applied to volume
Volume Threshold (default 1.0) — Volume RSI / 50 minimum for the demand filter
RSI Length (default 14) — RSI period for the momentum filter
ATR Length — period for ATR used in stop, TP, trail, and visual bands
Stop Multiplier (default 2.5) — ATR multiplier for the fixed stop loss
TP Multiplier (default 4.0) — ATR multiplier for the fixed take profit
Trail Multiplier (default 1.5) — ATR multiplier for the trail exit threshold
---
How to Use
Apply to daily or higher timeframes on liquid instruments. Volume RSI is most meaningful where volume data is consistent and representative of actual market participation.
Allow the chart to load sufficient historical bars before evaluating backtest results. The ComboMA slope confirmation requires multiple bars of agreement, and early bars in the dataset may not reflect the strategy's typical behavior. Aim for at least several hundred bars of data for meaningful backtest statistics.
Review the performance table while backtesting to understand average win size relative to average loss, drawdown, and total trade count. A strategy with very few trades may show favorable metrics by chance rather than edge — consider whether the trade count is sufficient to draw conclusions.
The default 5% equity position size produces moderate equity curve sensitivity. Smaller sizes will reduce drawdown and return proportionally; larger sizes will amplify both.
Commission is set to 0.05% per side (0.1% round trip) by default. Adjust this to match your actual trading costs. Higher commission rates — especially relevant for frequent-trading timeframes — will reduce net results.
Do not optimize parameters on the same data you use to evaluate performance. Optimization on historical data produces settings tuned to past noise, not future edge.
The trail exit on slope reversal means that strongly trending markets where the MA briefly flattens before resuming may see early exits. This is the tradeoff for using slope as an exit condition.
---
Limitations
Backtest results are calculated on historical data and do not guarantee future performance. Market conditions change, and a strategy that performed well in a particular regime may perform differently as conditions evolve.
The Volume RSI filter requires reliable volume data. This strategy is not recommended for synthetic instruments, CFDs where volume represents contracts rather than underlying market activity, or very short intraday timeframes where volume is fragmented and noisy. On such instruments, the third entry condition may be meaningless or misleading.
The multi-bar slope confirmation requirement means the strategy will miss fast, sharp trend initiations where the MA slope has not yet had N bars to confirm. This is a deliberate tradeoff — reducing false entries at the cost of some late entries on fast moves.
Pyramiding is disabled. The strategy will not add to winning positions. This limits upside during strongly trending markets where additional entries might be beneficial, but it also limits drawdown from compounding positions that subsequently reverse.
ATR-based stops and TPs are fixed at entry. They do not adjust after the trade is open (apart from the trail exit). If volatility expands significantly after entry, a 2.5x ATR stop that was appropriate at entry may become relatively tight.
The performance table reflects cumulative backtest results as of the current bar. Results will vary across different lookback windows and instruments.
Default capital of $10,000 with 5% equity sizing means each trade risks approximately $500 before the stop is hit (assuming stop is the loss floor). This is a backtesting convention — it is not a recommendation for live account sizing.
No strategy produces guaranteed results. The three-layer entry system improves internal signal consistency but cannot eliminate the inherent uncertainty of financial markets.
---
Originality Statement
Standard MA-based trend strategies treat a single bar's price-vs-MA relationship as sufficient for entry. ARM's primary differentiation is the multi-bar slope confirmation requirement : the ComboMA slope must be consistently positive (or negative) across N consecutive bars before the first condition is met. A one-bar slope deviation — common during consolidations and brief retracements — does not trigger entry. Only a sustained slope direction qualifies.
The ComboMA itself is a blend of ALMA and ZLMA, combining the smoothness and Gaussian weighting of ALMA with the lag-compensation of ZLMA. Neither is used in isolation because each has a specific weakness: ALMA can lag on sharp moves; ZLMA can be sensitive to noise. The blend leverages the strengths of both while partially offsetting their weaknesses.
The three-layer confirmation architecture — slope duration, price position, and demand validation — requires agreement across genuinely different measurement types: structural momentum over time, current price location, and volume activity. These are not three views of the same quantity. The stop and TP placement using strategy.position_avg_price rather than the signal bar close is a practical accuracy measure: in backtesting, it means risk distances are calculated from the price at which the trade was actually filled, not from where the signal was generated, which can differ from the fill price particularly on gap opens.
---
Disclaimer
This strategy is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any security. Backtested results are hypothetical and do not reflect actual trading. Hypothetical performance results have inherent limitations and do not account for execution slippage, liquidity constraints, or the psychological challenges of live trading. All trading involves risk, including the possible loss of principal. Always conduct your own research and consult a qualified financial professional before making any trading or investment decisions.
-Made with passion by officialjackofalltrades
Strategy

Indicator

Tidal Volume Oscillator [JOAT]Tidal Volume Oscillator
Introduction
The Tidal Volume Oscillator is a separate-pane oscillator that attempts to answer a single question: is the current price movement being carried by genuine volume participation, or is it occurring on weak flow? It constructs a volume-weighted momentum score, normalizes it to a bounded range of −100 to +100, applies a Fourier-inspired exponential decay smoothing pass to reduce noise without introducing phase lag, and then scales the result with an adaptive trend filter. A flow momentum line tracks the acceleration of the oscillator itself. A divergence engine scans for all four divergence types simultaneously — regular bullish, regular bearish, hidden bullish, and hidden bearish — and plots them directly in the oscillator panel.
The indicator does not predict future price. It contextualizes current price movement relative to volume behavior and flags when price action and volume-weighted momentum are moving in opposite directions, which historically precedes changes in directional character — though not always, and not reliably in all instruments or conditions.
---
Core Concepts
The VZO Foundation
The Volume Zone Oscillator (VZO) is an established concept that categorizes volume as positive or negative based on the direction of price change, then computes a ratio of positive to negative volume over a rolling window. This indicator rebuilds that concept from the ground up using a different normalization approach:
Relative Volume: Instead of using raw volume, the oscillator first normalizes each bar's volume against a rolling SMA of volume. This produces a relative volume reading — a value above 1.0 means the bar traded heavier than average, below 1.0 means lighter. This step removes the absolute scale of volume from the calculation, allowing the oscillator to behave comparably across instruments with vastly different volume profiles and across timeframes where absolute volume differs by orders of magnitude.
Volume-Weighted Momentum: The price change on each bar is smoothed via EMA, and the relative volume is separately smoothed via EMA. Multiplying these two smoothed values produces a volume-weighted momentum signal. This is then smoothed again to form a base momentum reading.
RSI-Style Normalization: Positive and negative portions of the base momentum are separated, each independently smoothed, and their ratio is fed into an RSI-style formula: vzo = 100 * (ratio - 1) / (ratio + 1) . This bounds the oscillator strictly between −100 and +100 and gives it a symmetric zero-line structure where positive values indicate dominant upward volume momentum and negative values indicate dominant downward volume momentum.
Fourier Exponential Decay Smoothing
After the initial VZO is computed, a second smoothing pass is applied using exponential decay weights. For each bar, the contribution of each of the prior N bars is weighted by exp(-i / (len * 0.3)) , where i is the number of bars back. This means the most recent bar carries maximum weight and each earlier bar contributes exponentially less. The window clips naturally as the weights approach zero.
The result is a smoothing pass that is inspired by frequency-domain thinking: it emphasizes recent values and de-emphasizes older values in a continuous decay rather than in the binary on/off fashion of a simple rolling average. The smoothed output tracks the oscillator's underlying shape while suppressing high-frequency noise without the phase shift that a centered moving average would introduce.
ADF Trend Filter
An adaptive multiplier is derived by comparing a short SMA and a long SMA of price, normalizing their difference by the rolling standard deviation of price over a matching window. This produces a dimensionless value that reflects the strength of the current trend relative to recent volatility — conceptually analogous to the logic behind an Augmented Dickey-Fuller trend test applied in a simplified real-time form.
This multiplier is kept close to 1.0 intentionally. Its role is not to dramatically change the oscillator's value but to apply a mild scaling that slightly amplifies the VZO when trend conditions are strong and slightly suppresses it during choppy, mean-reverting conditions. The effect is subtle but helps the oscillator's readings align better with the underlying market character.
Final Blended VZO
The final oscillator value blends the EMA-smoothed VZO and the Fourier-smoothed VZO according to a blend parameter, scales the result by the ADF multiplier, and clamps the output to the range. The blend parameter controls how much weight goes to the Fourier-smoothed version versus the EMA-smoothed version, allowing the user to tune between responsiveness and smoothness.
Flow Momentum Line
A secondary line is plotted alongside the main oscillator, computed as:
flow_momentum = (vzo - ema(vzo, lookback)) * 0.5
This measures the rate of change of the oscillator — its acceleration — and scales it to stay visually proportional. When the flow momentum line is rising, the oscillator is accelerating upward. When it is falling, the oscillator is losing momentum regardless of its absolute level. Crossovers between the oscillator and the flow momentum line can highlight inflection points in volume-weighted momentum.
Divergence Engine
The divergence engine uses pivot high and pivot low detection to identify four divergence types:
Regular Bullish Divergence: Price makes a lower low while the oscillator makes a higher low. Suggests weakening downward volume participation on the new price low.
Regular Bearish Divergence: Price makes a higher high while the oscillator makes a lower high. Suggests weakening upward volume participation on the new price high.
Hidden Bullish Divergence: Price makes a higher low while the oscillator makes a lower low. Often associated with pullbacks within an established uptrend where volume momentum remains stronger than the pullback's depth implies.
Hidden Bearish Divergence: Price makes a lower high while the oscillator makes a higher high. Often associated with rallies within an established downtrend where volume momentum is failing to confirm the price bounce.
The engine uses ta.valuewhen to retrieve the oscillator's value at the most recent prior pivot of the same type, then compares it to the current pivot. Lines and labels are drawn directly in the oscillator pane, keeping all divergence context in a single panel.
Dynamic Color Blending
The oscillator line and histogram (if enabled) use color blending that responds to both the direction of the oscillator and the intensity of the flow momentum. Colors transition smoothly between bull and bear palettes as conditions shift, with intensity modulated by momentum acceleration. This avoids binary color flips and gives a continuous visual read of the oscillator's strength and direction.
---
Features
Relative-volume-normalized VZO foundation — removes absolute volume scale bias
RSI-style normalization producing a symmetric −100 to +100 oscillator
Fourier exponential decay smoothing pass for noise reduction without phase lag
ADF-inspired adaptive trend multiplier for regime-sensitive scaling
Blended output combining EMA and Fourier smoothing with user-adjustable weighting
Flow momentum line showing oscillator acceleration
Full four-type divergence engine: regular bull/bear and hidden bull/bear
Divergence lines and labels rendered directly in the oscillator pane
Dynamic color blending based on direction and momentum intensity
Overbought/oversold level lines at user-defined thresholds (default ±80)
Fully toggleable visual components including divergence types individually
---
Input Parameters
VZO Length: Primary lookback for the volume-weighted momentum and normalization calculations (default: 14)
Smoothing Length: Short EMA length used in the initial volume-weighted momentum construction (default: 5)
Signal Length: EMA length applied to the final VZO for the signal/flow line (default: 9)
Fourier Window: Number of bars used in the exponential decay smoothing pass (default: 20)
Fourier Blend: Proportion of the final output taken from the Fourier-smoothed VZO versus the EMA-smoothed VZO (default: 0.4, meaning 40% Fourier / 60% EMA)
Overbought Level: Upper reference line threshold (default: +80)
Oversold Level: Lower reference line threshold (default: −80)
Pivot Bars: Number of bars on each side required to confirm a pivot high or low for divergence detection
Visual Toggles: Individual controls for divergence types (regular bull, regular bear, hidden bull, hidden bear), flow momentum line, bar coloring, and OB/OS lines
---
How to Use
Reading the oscillator: Values above zero indicate that volume-weighted momentum favors buyers over the lookback window. Values below zero indicate it favors sellers. The magnitude reflects how dominant one side is. A reading of +60 is meaningfully different from +20 — the former suggests strong participation on the upside, the latter suggests modest positive lean.
Overbought/oversold levels: The default ±80 levels are deliberately set wide. Reaching ±80 indicates a statistically strong skew in volume momentum, not simply a directional bias. A reading at +85 that begins to decline is worth noting; a reading that has been above +80 for many bars without declining suggests strong persistent flow, not an automatic reversal condition.
Flow momentum line: Use the flow momentum line to identify when the oscillator is accelerating or decelerating. If the oscillator is above zero but the flow momentum line is falling and crossing below the oscillator, volume-weighted momentum is losing strength even if it has not crossed zero. This can be an early warning of a fading move.
Divergences: Divergence signals appear as labeled lines in the oscillator pane. They flag a disagreement between price structure and volume momentum structure. Regular divergences are typically associated with potential trend reversal conditions; hidden divergences are typically associated with trend continuation conditions during a pullback. Neither type is a standalone entry signal — they require context from price structure, higher timeframe trend, and other confirmation.
Combining types: A regular bearish divergence occurring while the oscillator is above +60 and the flow momentum line is declining is a more compelling condition than a divergence occurring at a neutral oscillator reading. Look for confluence between divergence signals, oscillator level, and flow momentum direction.
Timeframe notes: On lower timeframes, the divergence engine will fire frequently and many signals will resolve as noise. On higher timeframes, divergence signals are structurally more significant but rarer. The Fourier blend and VZO length should be calibrated to the timeframe being traded.
---
Limitations
This indicator does not predict future price movement. All readings are computed from past and current bar data.
Volume data quality varies significantly across instruments and data providers. On instruments with unreliable, synthetic, or missing volume data (some forex pairs, certain CFDs, spread-betting instruments), the oscillator's readings will be distorted or meaningless.
Divergences are detected only at confirmed pivot points, which by definition require a lookback into past bars. A divergence signal will appear after the pivot is confirmed, not at the pivot bar itself. This is inherent to pivot-based divergence detection and is not a bug.
Hidden divergences can occur frequently during strong trends and produce many signals that resolve without follow-through on shorter timeframes.
The ADF-inspired filter is a simplified heuristic, not a formal statistical test. It does not guarantee that the adaptive scaling accurately reflects whether a market is trending or mean-reverting at any given moment.
The Fourier exponential decay smoothing is not a formal frequency-domain Fourier transform. The term is used descriptively to indicate the exponential weighting pattern, not to imply that the calculation resolves into sinusoidal components.
Extreme or sustained overbought/oversold readings do not guarantee a reversal. Strong trends can keep the oscillator pinned at extremes for extended periods.
The oscillator is bounded at ±100 by construction. This means that at extreme readings, additional strengthening of volume momentum does not move the line further — the clamping obscures incremental changes at extremes.
Past divergence performance on a given instrument is not indicative of future performance.
---
Originality Statement
The VZO concept is established in the public domain. This implementation departs from the standard in several meaningful ways. Using relative volume (each bar's volume divided by a rolling SMA of volume) rather than raw volume removes the absolute scale of volume from the oscillator's behavior — a standard VZO applied to a futures contract and a low-float equity will behave differently purely due to volume magnitude; this version will not. The RSI-style normalization of the volume-weighted momentum ratio is retained from the VZO concept but is applied to a momentum signal constructed differently from the standard signed-volume approach. The Fourier exponential decay smoothing layer is an original addition: it is not a standard EMA, WMA, or VWMA — it applies a decaying weight function that is conceptually distinct from any standard Pine Script built-in smoothing function, producing a cleaner oscillator output with less phase distortion than an equivalent EMA. The ADF-inspired adaptive multiplier is a real-time regime-sensitivity mechanism not present in any standard oscillator. The four-type divergence engine built into the same panel, detecting all four divergence classes simultaneously using pivot comparison logic, provides complete divergence coverage without requiring additional scripts or manual line drawing. The combination of these elements — relative-volume normalization, Fourier decay smoothing, adaptive trend scaling, blended output, flow momentum line, and full-coverage divergence detection — into a single oscillator panel represents an original synthesis that is not replicated by any standard built-in indicator.
---
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Past performance of any indicator or strategy is not indicative of future results. Always conduct your own research and consult a qualified financial professional before making any trading decisions.
-Made with passion by officialjackofalltrades
Indicator

Volatility Squeeze Oscillator [JOAT]Volatility Squeeze Oscillator
Introduction
Volatility does not move randomly. It compresses, coils, and then releases — and the magnitude of the release is frequently proportional to the depth and duration of the compression. This relationship between volatility contraction and subsequent expansion is one of the most durable patterns in market behavior across all asset classes and timeframes. The Volatility Squeeze Oscillator is built to quantify this relationship with precision, using a multi-layered analysis framework that goes well beyond standard squeeze detection.
At its core, the indicator uses an ATR compression ratio engine to measure the difference between a short-term and long-term ATR. When the short-term ATR is smaller than the long-term ATR, volatility is contracting — the market is coiling. When the short-term ATR expands beyond the long-term reference, the coil is releasing. This compression differential is normalized against the high-low range, making the oscillator comparable across different instruments and volatility regimes.
Three additional analytical layers are stacked on top of the compression engine. A cumulative delta proxy estimates buying versus selling pressure within each bar using range-based calculations — no Level 2 or order flow data required. A volume RSI module measures whether the current volume is elevated relative to its own history, providing a confluence filter that separates high-conviction from low-conviction squeeze releases. And a statistical deviation band system built on a 200-bar lookback marks the historically significant boundaries of the squeeze oscillator's own distribution, so traders can identify not just whether a squeeze is forming, but how extreme it is relative to its own history.
Core Concepts
1. ATR Compression Ratio Engine
The compression ratio is derived from two ATR calculations at different smoothing periods. Both use EMA smoothing rather than RMA (Wilder's method) to produce a more responsive and visually cleaner oscillator. The short-term ATR reflects current volatility conditions. The long-term ATR (calculated at double the base period) establishes the reference level representing the recent historical norm. The difference between these two — long minus short — is the squeeze value: positive when the market is contracting (short ATR below long-term baseline), negative when expanding.
trueRange = ta.tr(true)
atrShort = ta.ema(trueRange, len)
atrLong = ta.ema(atrShort, len * 2)
sqzRaw = atrLong - atrShort
hlRange = ta.highest(high, len) - ta.lowest(low, len)
sqzVal = hlRange > 0 ? sqzRaw / hlRange : 0
Normalizing by the HL range makes the oscillator dimensionless — a squeeze value of 0.3 carries the same meaning whether you are analyzing a $1 stock or a $50,000 Bitcoin contract. The signal line is an EMA of the squeeze value, used to detect the inflection point where the squeeze begins to build (sqzVal crossing above sqzSig) or release (sqzVal crossing below sqzSig).
2. Hyper-Squeeze Detection
A hyper-squeeze occurs when the squeeze value is not merely positive (compressing) but is actively rising for N consecutive bars — indicating an accelerating contraction rather than a stable one. Accelerating compression is particularly significant because it suggests market participants are increasingly reducing their activity, creating a coiled spring effect where the eventual release may be more forceful.
hyperSqz = sqzVal > 0 and ta.rising(sqzVal, hyperLen)
When a hyper-squeeze is active, a violet tint is overlaid on the oscillator background in addition to the regular delta-driven background color. The dashboard updates the hyper squeeze row to ACTIVE status. This dual visual layer makes extended compression phases immediately distinguishable from ordinary positive squeeze readings.
3. Cumulative Delta Proxy
Order flow analysis — understanding whether buyers or sellers are dominant within a given period — typically requires tick-level data or exchange-provided volume breakdown. This indicator constructs a proxy for cumulative delta using bar-level range analysis, making the information accessible without any data feed requirements.
barRange = high - low
bullPress = barRange > 0 ? (close - low) / barRange : 0.5
bearPress = barRange > 0 ? (high - close) / barRange : 0.5
deltaBar = bullPress - bearPress
deltaSma = ta.sma(deltaBar, deltaLen)
deltaPos = deltaSma > 0
A close near the high of the bar implies buyers dominated (bull pressure near 1.0). A close near the low implies sellers dominated (bear pressure near 1.0). The difference, smoothed over a configurable window, produces a normalized delta reading. When delta is positive during a squeeze, the compressed volatility is accumulating with a bullish lean. When negative, with a bearish lean. This directional information is used both in the histogram coloring (alpha derived from delta conviction) and in dashboard output.
4. Volume RSI Confluence
Volume RSI applies the standard RSI momentum formula to the volume series rather than price. This produces a normalized reading of whether current volume is elevated or depressed relative to its recent distribution. A high volume RSI (default threshold: 65) during a squeeze release indicates that the expansion is occurring on above-average participation — a meaningful distinction from low-volume releases that can quickly reverse.
volRsi = ta.rsi(volume, 14)
highVol = volRsi > volThresh
The volume RSI value and status are displayed in the dashboard. Alert conditions include a "high-volume release" alert specifically when both a squeeze release signal and elevated volume RSI occur simultaneously, providing a higher-conviction composite signal.
5. Statistical Deviation Bands
Rather than using fixed threshold lines at arbitrary values, the oscillator's own distribution is analyzed statistically using a 200-bar lookback. The mean and one and two standard deviation levels of the squeeze value over this window establish dynamically updating bands. These bands are filled with a gradient and rendered at adaptive transparency based on the current Z-score — as the oscillator approaches the 2σ band, the fill becomes more opaque, visually emphasizing extreme readings.
sqzMean = ta.sma(sqzVal, statLen)
sqzStd = ta.stdev(sqzVal, statLen)
band1Up = sqzMean + sqzStd
band2Up = sqzMean + 2 * sqzStd
band1Dn = sqzMean - sqzStd
band2Dn = sqzMean - 2 * sqzStd
zScore = sqzStd > 0 ? (sqzVal - sqzMean) / sqzStd : 0
A squeeze reading above the 2σ upper band is historically anomalous compression — significantly above what has been typical over the prior 200 bars. Such readings often precede the most explosive release moves.
6. Histogram Coloring and Background Rendering
The histogram bar colors encode two simultaneous dimensions. The base color is red when the squeeze is building (sqzVal above sqzSig) and teal when releasing (sqzVal below sqzSig). The alpha channel of each bar is modulated by the absolute value of the delta conviction — high delta conviction produces more saturated colors, while low-conviction delta (price closing near the bar midpoint) produces more transparent bars. The background color is a 93% alpha gradient driven entirely by delta: teal for bullish delta, red for bearish delta, with the hyper-squeeze violet tint layered on top when active.
Features
ATR Compression Ratio Engine: Measures the difference between short-term and long-term EMA-smoothed ATR, normalized by HL range for cross-instrument comparability.
Signal Line: EMA of the squeeze value provides the crossover reference for detecting compression buildup and release initiation.
Hyper-Squeeze Detection: Identifies accelerating compression phases where the squeeze is rising for N consecutive bars simultaneously.
Cumulative Delta Proxy: Bar-range-based buying and selling pressure estimate, smoothed and normalized, requiring no Level 2 data.
Volume RSI Confluence: RSI applied to volume series identifies above-average participation, separating high-conviction releases from low-volume ones.
Statistical Deviation Bands: 200-bar mean and sigma levels with gradient fill and adaptive transparency based on Z-score position.
Delta-Driven Alpha Histogram: Histogram color and opacity encode both squeeze direction and delta conviction simultaneously.
Layered Background Coloring: Delta-based background with hyper-squeeze overlay provides immediate pane-level context without requiring close inspection.
Signal Markers: Circle markers at oscillator bottom on squeeze cross and release cross events.
Seven-Row Dashboard: Real-time status covering state, hyper squeeze, volume RSI, delta bias, Z-score, and squeeze value.
Four Alert Conditions: Squeeze building, release detected, hyper squeeze active, and high-volume release composite signal.
Input Parameters
ATR Settings:
Base Length: Period for short-term ATR EMA and HL range lookback (default: 20)
Hyper-Squeeze Settings:
Hyper Squeeze Consecutive Bars: Number of consecutive rising bars required for hyper-squeeze (default: 3)
Delta Settings:
Delta Smoothing Window: SMA period for the delta bar average (default: 10)
Volume RSI Settings:
Volume RSI Period: RSI lookback applied to volume series (default: 14)
Volume RSI Threshold: Level above which volume is considered elevated (default: 65)
Statistical Bands Settings:
Statistical Lookback: Bar count for mean and standard deviation computation (default: 200)
Show Bands: Toggle deviation band fills (default: true)
Display Settings:
Show Background: Toggle delta and hyper-squeeze background coloring (default: true)
Show Signal Markers: Toggle circle markers at squeeze and release crosses (default: true)
Show Dashboard: Toggle the seven-row information table (default: true)
How to Use This Indicator
Step 1: Monitor the Squeeze State
The primary read from this oscillator is the current state displayed in the dashboard: SQUEEZING, RELAXING, or EXPANDING. Squeezing means the compression ratio is positive and rising — the market is actively coiling. Relaxing means the compression is positive but flattening or declining — the coil is beginning to unwind. Expanding means the oscillator has gone negative — volatility is actively expanding beyond the historical baseline. The transition from SQUEEZING to RELAXING is the early warning signal; the transition to EXPANDING is confirmation that the release has begun.
Step 2: Watch for Hyper-Squeeze Conditions
When the dashboard shows HYPER SQUEEZE: ACTIVE and the chart shows the violet tint overlay, the compression is accelerating — each bar the market is coiling tighter. These conditions historically precede more forceful releases. In hyper-squeeze conditions, position sizing on the anticipated breakout can be considered carefully, as the magnitude of the release may be larger than during ordinary squeeze exits.
Step 3: Check Delta Bias for Directional Lean
Before committing to a directional bias, check the delta row in the dashboard. Positive delta (bullish) during a squeeze indicates that even during compression, buyers have been closing bars near the upper portion of their range — a bullish accumulation signature. Negative delta (bearish) suggests the opposite. Delta bias does not guarantee direction, but it provides a useful lean when combined with the squeeze release signal.
Step 4: Require Volume RSI Confluence on Release
Not all squeeze releases produce sustained moves. Low-volume releases frequently reverse within a few bars. The "High-Volume Release" alert fires only when both a release cross and elevated volume RSI (above threshold) occur simultaneously. Waiting for this composite signal before acting on a release — rather than responding to the release cross alone — filters out a meaningful number of false expansion signals in low-participation environments.
Indicator Limitations
The ATR compression ratio measures relative volatility contraction but cannot determine the direction of the eventual breakout. This indicator identifies when a release is likely, not which way price will move. Directional analysis must come from structure, trend, or other contextual tools.
The delta proxy is a bar-level approximation of order flow. It does not access actual tick data, order book data, or trade-level information. In markets with high-frequency activity, the close-to-high/low ratio can systematically misrepresent actual buying and selling pressure.
The statistical deviation bands require 200 bars to be fully seeded. On instruments or timeframes with limited history, or immediately after loading a new chart, the bands may produce unreliable readings until sufficient data is available.
Volume RSI confluence is not applicable to instruments where volume data is unreliable, unavailable, or represents synthetic aggregation (some forex pairs, certain CFDs). In these cases, the volume RSI row should be treated as informational only.
The hyper-squeeze condition measures consecutive rising bars in the squeeze value. This makes it sensitive to the base period setting — shorter periods produce more variable squeeze values, leading to more frequent interruptions of the consecutive count.
This indicator operates entirely on the chart's native timeframe. It does not incorporate multi-timeframe squeeze data — a squeeze on a 15-minute chart may be occurring within the context of a much larger timeframe expansion that this indicator would not reflect.
Originality Statement
The Volatility Squeeze Oscillator is a purpose-built analytical instrument that combines techniques not previously assembled in this specific architecture.
The ATR compression ratio engine — using EMA-smoothed ATR at the base period versus double the base period, normalized by the HL range — is an original squeeze quantification method. It differs from the widely used Lazybear TTM Squeeze (which measures Bollinger Band width versus Keltner Channel width) by operating entirely within the ATR framework with range normalization.
The hyper-squeeze detection via ta.rising() on the already-positive squeeze value identifies accelerating compression as a distinct state separate from ordinary compression, a categorization not found in standard squeeze implementations.
The cumulative delta proxy using bar-range ratios (close minus low divided by range for bull pressure; high minus close divided by range for bear pressure), smoothed and normalized, provides order-flow-inspired information without any data dependency beyond OHLC — an original application of range analysis.
The integration of volume RSI as a confluence gate within the squeeze oscillator framework — not as a separate indicator but as an internal filter with dedicated dashboard output and composite alert conditions — is an original design choice.
The statistical deviation band system applied to the squeeze oscillator's own values (using a 200-bar SMA and StDev of the squeeze value itself) to create adaptive significance thresholds is an original meta-statistical layer not found in comparable oscillators.
Disclaimer
The Volatility Squeeze Oscillator is provided for educational and informational purposes only. It is a technical analysis tool and does not constitute financial advice. Identifying squeeze conditions does not predict the direction or magnitude of subsequent price moves with any certainty. All trading involves risk of loss. Users are solely responsible for their own trading decisions. Please consider your individual risk tolerance and consult a licensed financial professional before engaging in any trading activity.
-Made with passion by officialjackofalltrades
Indicator

Regime & Structure Engine [JOAT]Regime & Structure Engine
Introduction
Markets do not move randomly — they cycle through defined behavioral states: trending phases where momentum compounds in one direction, and ranging phases where price consolidates before the next impulse. Identifying which state the market is currently in, and detecting when structural breaks signal a transition, is fundamental to any disciplined trading approach. The Regime & Structure Engine is built around that single core principle: before anything else, know your regime.
This indicator unifies three distinct analytical layers into a single overlay system. The first layer is the Hull-EMA Hybrid (HEMA), a custom moving average that resolves the trade-off between smoothness and responsiveness by combining double-weighted EMA calculation with a square-root length final smoothing. The second layer is a three-state confirmed regime engine that uses the relative alignment of three HEMA periods to classify market condition as bull, bear, or neutral — with a mandatory two-bar confirmation to eliminate false transitions. The third layer is a market structure engine based on classical swing pivot logic, capable of identifying Break of Structure (BOS) and Change of Character (CHoCH) events that signal genuine momentum shifts.
All of this is augmented by a Z-score cumulative impulse detector that quantifies the statistical significance of directional momentum streaks, a trend cloud that visually represents regime state through gradient fills, proximity-based bar coloring that encodes distance from the HEMA mid-layer, a configurable alert system, and a compact six-row dashboard. Every signal in this indicator is anchored to confirmed bars only, eliminating any look-ahead repainting.
Core Concepts
1. Hull-EMA Hybrid (HEMA) Moving Average
The foundational calculation of this indicator is the HEMA — a three-step smoothing function that delivers both noise reduction and lag compensation. A standard EMA applies uniform smoothing that creates meaningful lag on higher periods. Hull Moving Averages address lag through weighted differencing but can produce jagged outputs. The HEMA bridges this by constructing the Hull-style weighted difference first, then applying a square-root-period EMA as the final smoother.
f_hema(src, len) =>
ta.ema(2 * ta.ema(src, len / 2) - ta.ema(src, len), math.round(math.sqrt(len)))
Three instances are calculated at lengths 20, 50, and 100, producing a fast, slow, and macro trend layer respectively. The fast layer reacts to short-term price action, the slow layer represents the primary trend, and the macro layer anchors the broader structural bias. When all three are aligned in sequence (fast above slow above macro, or inverse), the trend is considered directionally clean.
2. Three-State Confirmed Regime Engine
Regime classification is determined by the ordinal alignment of all three HEMA layers. A raw bull signal requires hema1 greater than hema2, which must in turn be greater than hema3. The inverse defines raw bear. Any other arrangement is classified as neutral. To prevent rapid regime flipping on borderline conditions, a two-bar confirmation requirement is enforced: the raw signal must hold for at least two consecutive bars before the confirmed regime variable updates.
rawBull = hema1 > hema2 and hema2 > hema3
rawBear = hema1 < hema2 and hema2 < hema3
var int confirmCount = 0
var int confirmedRegime = 0
if rawBull
confirmCount := confirmCount + 1
else if rawBear
confirmCount := confirmCount - 1
else
confirmCount := 0
confirmedRegime := confirmCount >= 2 ? 1 : confirmCount <= -2 ? -1 : 0
This confirmation mechanism is critical in volatile markets where HEMA layers can briefly reorder on a single candle only to revert immediately. The two-bar requirement sacrifices minimal reaction speed in exchange for a meaningful reduction in false regime transitions.
3. Z-Score Cumulative Impulse Detection
Regime direction tells you the structural bias. The Z-score impulse system tells you when that bias is being expressed with statistical force. Rather than measuring a single bar's momentum, this system accumulates consecutive directional closes into a running streak — a cumulative bull or bear pressure counter — then normalizes that streak against its own historical mean and standard deviation.
cumBull = close > close ? nz(cumBull ) + (close - close ) : 0
cumBear = close < close ? nz(cumBear ) + (close - close) : 0
zBull = (cumBull - ta.sma(cumBull, zLen)) / ta.stdev(cumBull, zLen)
zBear = (cumBear - ta.sma(cumBear, zLen)) / ta.stdev(cumBear, zLen)
impulseUp = ta.crossover(zBull, zThresh) and barstate.isconfirmed
impulseDn = ta.crossover(zBear, zThresh) and barstate.isconfirmed
An impulse fires when the Z-score exceeds the user-defined threshold (default: 2.0 sigma). This ensures that only statistically unusual momentum streaks generate signals, filtering out the ordinary ebb and flow of price during low-conviction moves.
4. BOS and CHoCH Market Structure
Market structure tracking is built on classical pivot high/low detection using Pine Script's built-in ta.pivothigh and ta.pivotlow functions. A Break of Structure (BOS) occurs when price closes or wicks beyond the most recent swing high (bullish BOS) or swing low (bearish BOS). A Change of Character (CHoCH) is a BOS that opposes the direction of the prior BOS — indicating a potential regime reversal rather than continuation.
swingHigh = ta.pivothigh(high, swingLen, swingLen)
swingLow = ta.pivotlow(low, swingLen, swingLen)
lastSwingHigh = ta.valuewhen(not na(swingHigh), swingHigh, 0)
lastSwingLow = ta.valuewhen(not na(swingLow), swingLow, 0)
bosUp = barstate.isconfirmed and ta.crossover(close, lastSwingHigh)
bosDn = barstate.isconfirmed and ta.crossunder(close, lastSwingLow)
chochUp = bosUp and lastBOSDir == -1
chochDn = bosDn and lastBOSDir == 1
CHoCH events are particularly significant because they represent the market's first structural evidence of a trend change — not merely a continuation of prior momentum. Distinguishing BOS from CHoCH allows traders to calibrate their response: a BOS in trend direction is a continuation entry opportunity, while a CHoCH warrants reassessment of existing positions.
5. Trend Cloud and Proximity Bar Coloring
The trend cloud fills the space between the HEMA fast and slow layers. The fill color matches the confirmed regime — teal for bull, red for bear, gray for neutral — creating an immediate visual encoding of market state across the chart. Bar coloring is driven by a normalized proximity calculation using the 14-period ATR as a reference distance.
normProx = math.abs(close - hema2) / (atr14 * 3)
barAlpha = math.min(math.round(normProx * 200), 200)
Bars that are far from the HEMA slow layer receive more saturated coloring, while bars trading near the HEMA mid-line are rendered at reduced opacity. This creates an intuitive gradient where extreme dislocations are visually prominent.
Features
HEMA Triple Layer: Three independent Hull-EMA Hybrid instances at periods 20, 50, and 100 provide fast, primary, and macro trend context simultaneously.
Confirmed Regime State: Two-bar confirmation gate prevents false regime transitions on temporary HEMA crossovers, reducing noise on volatile instruments.
BOS Detection: Swing-based Break of Structure signals on both bullish and bearish side, drawn at confirmed bars only with no look-ahead.
CHoCH Detection: Change of Character identification when BOS direction opposes the prior structural break, highlighting potential trend reversal zones.
Z-Score Impulse: Statistically normalized cumulative momentum streaks that fire signals only when directional pressure reaches a configurable sigma threshold.
Gradient Trend Cloud: Dynamic fill between HEMA layers color-coded by regime for instant visual orientation on any timeframe.
Proximity Bar Coloring: ATR-normalized distance from HEMA mid controls bar color alpha, making dislocations visually distinct.
Six-Row Dashboard: Compact table displaying regime, last BOS direction, bull Z-score, bear Z-score, and HEMA layer alignment.
No Repainting: All signals gated behind barstate.isconfirmed — no signals are printed on unfinished bars.
Full Alert Coverage: Seven alert conditions covering BOS, CHoCH, impulse, and regime flip events.
Input Parameters
HEMA Settings:
Fast Length: Period for the HEMA fast layer (default: 20)
Slow Length: Period for the HEMA slow layer (default: 50)
Macro Length: Period for the HEMA macro layer (default: 100)
Source: Price source for all HEMA calculations (default: close)
Regime Settings:
Confirmation Bars: Number of consecutive bars required to confirm a regime change (default: 2)
Structure Settings:
Swing Length: Pivot lookback for swing high/low detection (default: 10)
Show BOS Labels: Toggle BOS annotation labels on the chart (default: true)
Show CHoCH Labels: Toggle CHoCH annotation labels on the chart (default: true)
Z-Score Settings:
Z Lookback: Rolling window for Z-score mean and standard deviation (default: 50)
Z Threshold: Sigma level required to fire an impulse signal (default: 2.0)
Display Settings:
Show Trend Cloud: Toggle the gradient fill between HEMA layers (default: true)
Show Bar Colors: Toggle proximity-based bar coloring (default: true)
Show Dashboard: Toggle the six-row information table (default: true)
How to Use This Indicator
Step 1: Establish Regime Context
Before analyzing any signal, check the dashboard and the trend cloud to identify the confirmed regime. A bull regime (all three HEMA layers in ascending order with a teal cloud) means the structural bias favors long positions. A bear regime (descending alignment with a red cloud) favors shorts. A neutral regime suggests consolidation — reduce position sizing or stand aside. The regime confirmation requirement means the dashboard will update one to two bars after alignment begins, giving you a cleaner entry rather than reacting to the first crossover.
Step 2: Wait for Structure to Break
Within the context of the confirmed regime, watch for BOS events in the trend direction. A bullish BOS during a bull regime is a continuation structure signal — it means price has broken above a prior swing high, suggesting the up-trend is extending. A bearish BOS during a bull regime, especially if classified as a CHoCH, is your first warning that the structure may be shifting. Use the BOS labels on the chart to track the sequence of structural breaks over time.
Step 3: Confirm with Z-Score Impulse
A BOS or CHoCH becomes significantly more actionable when accompanied by a Z-score impulse signal in the same direction. When the cumulative bull streak normalized to 2+ sigma fires at the same time as or immediately following a bullish BOS, the move is backed by sustained directional momentum — not a single large candle. When regime, structure, and impulse all align, the signal quality is at its highest.
Step 4: Manage Position with HEMA Proximity
Once in a position, the proximity bar coloring helps manage exits. Bars that are far from HEMA mid (highly saturated) represent extended conditions — areas where mean reversion risk is elevated. Bars near HEMA mid are in equilibrium. Exits on strength (closing during a high-saturation bullish bar after a BOS continuation trade) allow for locking in gains at points of extension rather than waiting for a reversal to develop.
Indicator Limitations
The two-bar regime confirmation introduces a brief delay relative to the actual HEMA crossover. On fast-moving instruments, this can mean a slightly later entry but provides meaningful protection against false transitions.
BOS detection is based on prior swing highs and lows defined by the swing length parameter. On very low swing length settings, minor highs and lows will be used as structure levels, potentially generating frequent BOS events of less structural significance.
Z-score impulse requires a sufficient lookback to establish a stable mean and standard deviation for the cumulative streak. In the first Z-lookback bars of any chart, signals may be less statistically reliable as the normalization period is not fully seeded.
The HEMA and all derivative signals are calculated on the chart's native timeframe. This indicator does not internally pull higher timeframe data — users who want multi-timeframe regime context should reference signals from higher timeframe chart instances.
Like all trend-following tools, this indicator will produce whipsaw signals in choppy, range-bound markets where neither bulls nor bears sustain momentum long enough to trigger clean regime confirmation.
Proximity bar coloring uses ATR as a normalizer. During volatility regime shifts (e.g., sudden spike in ATR), the alpha thresholds may temporarily misrepresent proximity distance.
Originality Statement
The Regime & Structure Engine is not a repackaging of any single existing indicator. It is a purpose-built synthesis of methodologies that individually exist in various forms but have not been combined in this specific architecture.
The HEMA function (Hull-inspired double-weighted EMA followed by square-root-period smoothing) is a custom construction that differs from both standard HMA and standard EMA in its layering approach and final smoothing step.
The three-state confirmed regime engine with mandatory multi-bar confirmation is an original state machine design. Most indicators display regime as a simple crossover condition; this system enforces a holding period before state transition.
The Z-score cumulative impulse system measures the statistical significance of a directional streak rather than the magnitude of a single bar move. This normalization approach — accumulating consecutive closes and comparing against rolling sma/stdev — is not a standard oscillator pattern.
The combination of HEMA-based regime with classical BOS/CHoCH structural analysis on top of Z-score momentum creates a three-dimensional signal framework that no single publicly available indicator replicates.
The proximity bar coloring system using ATR-normalized distance to the HEMA mid layer as the alpha channel driver is an original visual encoding not found in standard bar coloring implementations.
Disclaimer
The Regime & Structure Engine is provided for educational and informational purposes only. It is a technical analysis tool and does not constitute financial advice. Past behavior of price relative to indicator signals does not guarantee future results. All trading involves risk, including the potential loss of principal. Users are solely responsible for their own trading decisions. Always conduct your own due diligence and consider consulting a licensed financial professional before making any investment decisions.
-Made with passion by officialjackofalltrades
Indicator

MTF Confluence Gauge [JOAT]MTF Confluence Gauge
Introduction
One of the most persistent challenges in technical analysis is the problem of timeframe conflict. A setup that looks perfectly constructed on a 15-minute chart can be swimming against a powerful current on the 4-hour chart, while simultaneously aligned with the daily trend. Traders who operate on a single timeframe are making decisions without full awareness of the forces acting on the instrument across the full spectrum of market participants — from short-term speculators to institutional position traders whose horizons span weeks or months.
The MTF Confluence Gauge addresses this challenge by simultaneously reading the HEMA (Hull-EMA Hybrid) trend state of up to 5 configurable assets across 5 configurable timeframes — producing 25 individual trend readings. Each reading is a directional vote: +1 for bullish HEMA alignment, -1 for bearish alignment, 0 for neutral. These 25 votes are summed into a raw score ranging from -25 to +25, normalized to a -100 to +100 scale, and further refined by local market modifiers including a delta proxy, volume RSI, volatility squeeze state, and local HEMA trend. The result is a composite gauge that represents the aggregate directional consensus across assets and timeframes simultaneously.
This multi-asset capability makes the indicator unique even among multi-timeframe tools. Most MTF indicators read a single instrument across multiple timeframes. The MCG reads multiple instruments across multiple timeframes — enabling users to understand whether a bullish signal on their primary instrument is supported by correlated assets (e.g., sector ETFs, index futures, correlated crypto pairs) or is an isolated move that runs counter to the broader market ecosystem. A long signal supported by bullish readings across correlated assets and multiple timeframes is fundamentally different in quality from one that is isolated to a single timeframe of a single instrument.
Core Concepts
1. HEMA Trend Function for MTF Reads
The HEMA trend function is the foundational building block of every cell in the 5×5 matrix. For each asset-timeframe combination, request.security() retrieves the HEMA values on that timeframe, and the relative alignment of the fast, slow, and macro HEMA layers determines the trend vote. The lookahead parameter is explicitly set to barmerge.lookahead_off to ensure no future data contamination — the trend reading reflects only information that was available at the close of the most recent completed bar of the target timeframe.
f_hema(src, len) =>
ta.ema(2 * ta.ema(src, len / 2) - ta.ema(src, len), math.round(math.sqrt(len)))
f_mtfTrend(sym, tf) =>
h1 = request.security(sym, tf, f_hema(close, hFast), lookahead=barmerge.lookahead_off)
h2 = request.security(sym, tf, f_hema(close, hSlow), lookahead=barmerge.lookahead_off)
h3 = request.security(sym, tf, f_hema(close, hMacro), lookahead=barmerge.lookahead_off)
h1 > h2 and h2 > h3 ? 1 : h1 < h2 and h2 < h3 ? -1 : 0
This function is called 25 times — once per cell in the matrix. The result for each call is stored in a 5×5 array of integers and subsequently used for both the raw score calculation and the table cell coloring.
2. Raw Score and Normalization
The 25 individual trend votes are summed to produce a raw score. This sum is then smoothed with a 3-bar EMA to reduce single-bar noise. Normalization to the range is achieved by dividing the smoothed raw score by 25 (the maximum possible absolute value) and multiplying by 100.
rawScore = 0
for r = 0 to 4
for c = 0 to 4
rawScore += trendMatrix.get(r * 5 + c)
smoothedRaw = ta.ema(rawScore, 3)
normalizedScore = smoothedRaw / 25 * 100
The normalized score forms the base for the histogram and is displayed in the dashboard as the "MTF Bias" value. By normalizing against the theoretical maximum, the scale is consistent regardless of how many assets are configured as neutral (0 votes) — the maximum expressible bull consensus is always +100 and the maximum bear consensus is always -100.
3. Local Score Modifiers
The raw MTF score represents the multi-asset, multi-timeframe consensus, but it does not account for the specific conditions of the primary chart instrument at the current moment. Four local modifier calculations adjust the score based on immediate market context. The local HEMA trend applies a ±10 point bonus. The delta proxy (bar-range-based buying/selling pressure) applies a ±5 point bonus. Volume RSI above threshold applies a ±5 point bonus in the direction of the local trend. The volatility squeeze state applies a ±5 bonus when the market is not squeezing (i.e., volatility is freely expressing direction). All individual bonuses are summed and the combined total is clamped to the range.
localBonus = localTrend * 10
deltaBonus = deltaPos ? 5 : -5
volBonus = highVol ? (localTrend > 0 ? 5 : -5) : 0
sqzBonus = squeezing ? 0 : localTrend * 5
totalScore = math.max(-100, math.min(100, normalizedScore + localBonus + deltaBonus + volBonus + sqzBonus))
displayScore = ta.ema(totalScore, 5)
The final display score is a 5-bar EMA of the adjusted total, providing visual smoothness in the histogram while retaining the responsiveness of the underlying calculations. Local modifiers mean the gauge can show strong bull bias from MTF readings while still being dampened by bearish local conditions — a useful warning mechanism.
4. The 5×5 Color-Coded Table
The visual centerpiece of this indicator is the 5×5 table rendered in the oscillator pane. Each of the 25 cells represents one asset-timeframe combination. Bullish cells are filled with teal and display an upward arrow (▲). Bearish cells are filled with red and display a downward arrow (▼). Neutral cells are filled with violet and display a dash (—). Row 6 of the table shows the column-sum score for each timeframe column, giving an immediate vertical read of how strongly any given timeframe is leaning across all configured assets. This allows traders to identify whether bias is uniform across timeframes or concentrated in specific horizons.
5. Histogram, Squeeze Background, and Reference Lines
The composite score is rendered as a histogram with gradient fill — teal shades above zero transitioning toward deep teal at maximum bull readings, red shades below zero deepening toward maximum bear. Reference lines at ±25 define the "bias threshold" — readings beyond this level indicate a meaningful multi-timeframe lean. Reference lines at ±60 define the "strong conviction threshold" — readings here suggest near-uniform agreement across the majority of configured cells. When the local volatility squeeze is active (detected via ATR compression), the oscillator pane background tints violet, visually indicating that the current score may be elevated or depressed relative to its normal expression due to compressed price action.
Features
25-Cell MTF Matrix: 5 configurable assets × 5 configurable timeframes, each independently returning a HEMA trend vote.
lookahead_off Security Calls: All request.security() calls use barmerge.lookahead_off to prevent future bar data contamination.
Smoothed Normalization: Raw score EMA-smoothed then normalized to for consistent cross-session comparability.
Four Local Modifiers: Local HEMA trend, delta proxy, volume RSI, and squeeze state each contribute bonus points to produce a context-aware composite score.
5×5 Color-Coded Table: Teal/red/violet cells with directional arrows and column score totals for immediate visual matrix reading.
Gradient Histogram: color.from_gradient fill above and below zero with reference lines at ±25 (bias) and ±60 (strong conviction).
Squeeze Background Tint: Violet overlay on oscillator pane background when local volatility compression is detected.
Nine-Row Dashboard: MTF bias label (six levels from STRONG BULL to STRONG BEAR), composite score, raw MTF score, squeeze state, Pearson R, delta bias, volume RSI, and local trend.
Six Alert Conditions: Cross above +25, cross below -25, cross above +60, cross below -60, cross above 0, cross below 0.
Input Parameters
Asset Configuration:
Asset 1-5 Symbols: Ticker symbols for each of the five configurable assets (defaults: current symbol, SPY, QQQ, GLD, TLT or equivalents)
Timeframe Configuration:
TF1-TF5: Five timeframe strings for the matrix columns (defaults: "15", "60", "240", "D", "W")
HEMA Settings:
Fast Length: HEMA fast period for all MTF reads (default: 20)
Slow Length: HEMA slow period for all MTF reads (default: 50)
Macro Length: HEMA macro period for all MTF reads (default: 100)
Local Modifier Settings:
Delta Window: Smoothing period for delta proxy calculation (default: 10)
Volume RSI Threshold: Level above which volume is considered high (default: 65)
ATR Squeeze Length: Period for local volatility compression detection (default: 20)
Display Settings:
Show Table: Toggle the 5×5 trend matrix table (default: true)
Show Histogram: Toggle the composite score histogram (default: true)
Show Dashboard: Toggle the nine-row information table (default: true)
Show Squeeze Background: Toggle the violet compression tint (default: true)
How to Use This Indicator
Step 1: Configure Assets for Your Trading Context
The indicator's value scales directly with the relevance of the configured assets to your primary instrument. For equity traders, configuring sector ETFs correlated with the primary stock (e.g., XLK for technology stocks, XLF for financials) alongside index instruments (SPY, QQQ, DIA) creates a meaningful consensus gauge. For crypto traders, configuring BTC, ETH, and leading altcoins provides an ecosystem-wide directional read. For forex traders, related currency pairs and safe-haven instruments (gold, bonds) capture macro correlation. Spend time selecting assets whose price behavior is structurally linked to your primary trading instrument.
Step 2: Use the Table for Timeframe Structure Analysis
Before looking at the composite score, read the table column by column. If the shorter timeframe columns (15m, 1H) are predominantly teal (bullish) but the longer timeframe columns (Daily, Weekly) are predominantly red (bearish), the market is in short-term counter-trend bounce territory — a higher-risk environment for long trades. Conversely, when both short and long timeframe columns are aligned in the same direction, the consensus is clean and structural. The column score row at the bottom of the table quantifies this alignment numerically.
Step 3: Interpret the Composite Score Levels
The ±25 threshold is the first meaningful level. A score above +25 indicates that more than half of the 25 cells are bullish (adjusted for local modifiers), suggesting a genuine bias rather than random noise. Between +25 and +60, the market has a directional lean but lacks uniform agreement. Above +60, the consensus is strong — the majority of assets across the majority of timeframes are in bullish alignment. The inverse applies below -25 and -60. Cross-zero signals (score moving from negative to positive) indicate a shift in aggregate consensus, which is often a leading indicator of trend changes on the primary instrument.
Step 4: Monitor Local Modifier Impact
The dashboard displays both the raw MTF score and the composite adjusted score. The difference between these two values reflects the cumulative impact of local modifiers. A large positive difference means local conditions (delta, volume, squeeze, HEMA) are amplifying the MTF signal. A large negative difference means local conditions are dampening it — the MTF matrix shows bulls, but the primary instrument itself is not confirming. In these cases, patience is warranted before entering.
Indicator Limitations
The indicator makes 25 request.security() calls plus additional local calculations. On crowded chart setups with many other indicators, this computational load may affect chart loading time. PulseWire enforces limits on request.security() calls per script; users should be aware of this limit if adding other indicators with security calls.
All 25 MTF trend readings update on the chart's native timeframe bars. Readings from higher timeframes update only when a new bar completes on that timeframe — the HEMA reading for a weekly timeframe, for instance, updates only at the weekly close. Between weekly closes, the weekly cell reading remains at the prior week's value.
HEMA calculations at very short periods on very high timeframes (e.g., period 20 on a Monthly timeframe) may have insufficient bars to produce statistically stable readings. Users should ensure the target instrument has sufficient history on all configured timeframes.
Asset correlation is dynamic — assets that are correlated in one market regime may decouple in another. A gauge configured for normal market correlation may produce misleading readings during crisis events when traditional correlations break down.
The local modifier adjustments (±10, ±5, ±5, ±5) are fixed contribution weights. They do not adapt to changing market conditions and may disproportionately influence the composite score during specific regimes.
The composite score is a simplified linear aggregation of heterogeneous signals. It treats a weekly HEMA reading as equivalent to a 15-minute HEMA reading in terms of contribution weight, which may not reflect the practical importance of longer timeframe trends.
Originality Statement
The MTF Confluence Gauge is an original multi-dimensional trend aggregation tool that differs meaningfully from existing multi-timeframe indicators.
The 5×5 asset-timeframe matrix — simultaneously reading five user-configurable assets (not just one instrument across five timeframes) across five user-configurable timeframes — is an original architectural choice that enables cross-asset consensus analysis not available in standard MTF indicators.
The HEMA-based trend vote function (requiring all three HEMA layers to be in sequence for a definitive +1 or -1 vote, otherwise returning 0) is a more stringent trend classification than simple moving average crossovers typically used in MTF dashboards.
The four-component local modifier system — HEMA bonus, delta proxy bonus, volume RSI bonus, and squeeze state bonus — applied as additive adjustments to the normalized MTF score before display is an original composite scoring architecture.
The six-level bias label system in the dashboard (STRONG BULL, BULL, SLIGHT BULL, SLIGHT BEAR, BEAR, STRONG BEAR) derived from the composite score threshold ranges provides a human-readable categorical summary not commonly implemented in MTF oscillators.
The visual integration of the 5×5 table within the oscillator pane (rather than as a separate overlay) alongside the gradient histogram, squeeze background tint, and reference lines at ±25 and ±60 represents a unified pane design not seen in comparable indicators.
Disclaimer
The MTF Confluence Gauge is provided for educational and informational purposes only. It is a technical analysis tool and does not constitute financial advice. Multi-timeframe and multi-asset confluence does not guarantee trade success. Correlation between assets changes over time and cannot be relied upon to remain stable. All trading involves risk of loss. Users are solely responsible for their own trading decisions. Please consider your individual risk tolerance and consult a licensed financial professional before engaging in any trading activity.
-Made with passion by officialjackofalltrades
Indicator

Liquidity Zone Harvester [JOAT]Liquidity Zone Harvester
Introduction
Institutional order flow leaves footprints in market structure. When a large buyer or seller places a significant order, the execution of that order creates an imbalance between supply and demand at a specific price level — and markets frequently return to these levels to test whether the original interest remains. These price areas are commonly referred to as order blocks or liquidity zones, and they form one of the core concepts in institutional and Smart Money trading methodology.
The Liquidity Zone Harvester is an automated order block detection and management system that identifies these zones using statistically validated momentum signals rather than arbitrary manual placement. Instead of drawing boxes wherever a trader's eye thinks supply or demand may exist, this indicator uses Z-score cumulative impulse detection to identify when directional momentum has reached statistically significant levels — and only then marks the most recent opposing-close candle as the source order block. Volume quality gates ensure that only high-participation impulses create zones, filtering out low-conviction moves that are less likely to represent genuine institutional activity.
What sets this indicator apart from standard order block tools is what happens after zone creation. Every active zone is tracked through a dual-mechanism aging system. The Bayesian exponential decay model progressively reduces zone visual intensity over time with a configurable half-life, providing a continuous probability signal about zone freshness. Simultaneously, a Kaplan-Meier survival analysis engine — borrowed from medical statistics — estimates the probability that a given zone will survive future price tests, based on the historical survival rates of all previously observed zones in the training window. Each zone displays both its current age and its estimated survival probability directly on the chart, turning static boxes into dynamically updated probability estimates.
Core Concepts
1. Z-Score Cumulative Impulse Detection
Zone creation is triggered only when directional momentum reaches a statistically defined threshold. The system accumulates a running streak of directional closes — when consecutive bars close higher than their open, the bull accumulator grows; when consecutive bars close lower, the bear accumulator grows. The streak resets when direction reverses. This cumulative streak is then normalized against its own rolling mean and standard deviation, producing a Z-score that measures how unusual the current momentum streak is relative to recent history.
cumBull := close > open ? nz(cumBull ) + (close - open) : 0
cumBear := close < open ? nz(cumBear ) + (open - close) : 0
zBull = (cumBull - ta.sma(cumBull, zLen)) / ta.stdev(cumBull, zLen)
zBear = (cumBear - ta.sma(cumBear, zLen)) / ta.stdev(cumBear, zLen)
bullEvent = ta.crossover(zBull, zThresh) and barstate.isconfirmed and volOK
bearEvent = ta.crossover(zBear, zThresh) and barstate.isconfirmed and volOK
When a bullEvent fires (bull Z-score crosses the threshold with volume confirmation), the system looks backward to find the most recent down-close candle — the last bar where sellers were dominant before the impulse began. This becomes the demand zone. Similarly, a bearEvent marks the most recent up-close candle as the supply zone.
2. Volume Quality Gate
Not all Z-score impulses are created equal. An impulse that occurs on abnormally low volume represents weak conviction — possibly a thin-market price drift rather than genuine institutional momentum. The volume gate applies RSI to the volume series to normalize it against its own history. Only when volume RSI exceeds the configurable threshold is the volOK condition true, enabling zone creation.
volRsi = ta.rsi(volume, 14)
volOK = volRsi > volThresh
This filter meaningfully reduces the number of zones created during low-participation conditions such as pre-market sessions, lunch hours, or holiday-period trading — precisely the times when order block levels are least likely to represent significant institutional interest.
3. Order Block Zone Construction
When a signal event is confirmed, the most recent opposing candle is identified using ta.valuewhen(). For a bullEvent, the system finds the most recent bar where close was less than open (a down candle) — its high and low define the demand zone boundaries. For a bearEvent, it finds the most recent up candle — its high and low define the supply zone boundaries. A box object is created spanning from that historical bar to the current bar, with height defined by the candle's actual high-low range.
lastDnHigh = ta.valuewhen(close < open, high, 0)
lastDnLow = ta.valuewhen(close < open, low, 0)
lastDnBar = ta.valuewhen(close < open, bar_index, 0)
if bullEvent
newBox = box.new(lastDnBar, lastDnHigh, bar_index, lastDnLow, ...)
bullBoxes.push(newBox)
4. Overlap Prevention (f_no_overlap)
To avoid cluttering the chart with redundant zones that occupy the same price territory, an overlap check function evaluates whether a proposed new zone overlaps with any existing zone of the same type. The function iterates over all existing bull or bear boxes and compares the new zone's top and bottom against each existing box's top and bottom. A guard condition (nBull > 0) prevents the iteration from running on an empty array, which would cause an index -1 crash.
f_no_overlap(newTop, newBot, boxes) =>
noOverlap = true
if boxes.size() > 0
for i = 0 to boxes.size() - 1
b = boxes.get(i)
if newTop >= box.get_bottom(b) and newBot <= box.get_top(b)
noOverlap := false
noOverlap
5. Bayesian Exponential Decay
Each zone's visual transparency is driven by an exponential decay function that represents the diminishing probability of zone relevance over time. The half-life parameter (default: 75 bars) defines how quickly a zone fades. At age 0, the zone is fully opaque. At age 75 bars, the zone is at 50% opacity. At age 150 bars, 25% opacity. This continuous decay — rather than a binary active/expired switch — provides an analog probability signal directly encoded in the zone's visual intensity.
decayFactor = math.exp(-0.693 * age / halfLife)
zoneAlpha = math.round(decayFactor * 200)
box.set_bgcolor(b, color.new(zoneColor, 255 - zoneAlpha))
6. Kaplan-Meier Survival Analysis
The Kaplan-Meier estimator is a nonparametric statistical method originally developed to measure survival probabilities in clinical trial data. In this indicator, "survival" is defined as a liquidity zone remaining unmitigated (not breached by a closing price on two separate occasions). Each time a zone is mitigated, it is recorded as a "death event" at its current age. Zones that expire by age limit without mitigation are recorded as "censored events" — incomplete observations. The KM formula multiplies survival probabilities across all observed events up to a given age.
// For each completed event (death at age t_i with n_i at-risk zones):
S_t := S_t * (1.0 - d_i / n_i)
// Product over all event times <= query age
For each active zone, the indicator queries the KM estimate at the zone's current age and displays the result as a percentage label. A zone at age 40 showing "Age 40 | 72%" means that historically, 72% of zones survived to at least 40 bars without being mitigated — giving traders a quantitative assessment of how likely the zone is to hold on the next test.
Features
Z-Score Cumulative Impulse: Statistical momentum threshold using normalized cumulative directional streaks to gate zone creation.
Volume Quality Gate: Volume RSI filter ensures only high-participation impulses create zones.
Precise Order Block Identification: Most recent opposing candle (last down-close for bull event, last up-close for bear event) defines zone boundaries.
Overlap Prevention: f_no_overlap function checks all existing zones before creating a new one, preventing chart clutter from redundant levels.
Bayesian Exponential Decay: Zone opacity decays over time with configurable half-life, encoding freshness as a visual probability signal.
Kaplan-Meier Survival Analysis: Medical-statistics survival estimator applied to zone longevity, displayed as a percentage probability label on each active zone.
Dynamic Zone Extension: Box right edge extends to the current bar on every update, keeping zones visually connected to the present.
Mitigation Tracking: Zones that are closed through twice are flagged as mitigated and removed, with the event recorded for KM analysis.
Seven-Row Dashboard: Active demand count, active supply count, bull Z, bear Z, volume RSI, KM training size, and signal status.
Two Alert Conditions: Zone created alert and zone rejection (price tests and bounces back) alert.
Input Parameters
Z-Score Settings:
Z Lookback: Rolling window for Z-score normalization (default: 50)
Z Threshold: Sigma level required to trigger an impulse event (default: 2.0)
Volume Gate Settings:
Volume RSI Period: RSI lookback for volume normalization (default: 14)
Volume RSI Threshold: Minimum volume RSI for zone creation eligibility (default: 55)
Zone Management Settings:
Max Zone Age: Maximum bars a zone remains active before forced removal (default: 300)
Mitigation Count: Number of closes through a zone required for mitigation (default: 2)
Max Active Zones Per Side: Maximum simultaneous demand or supply zones displayed (default: 5)
Decay Settings:
Decay Half-Life: Number of bars at which zone opacity reaches 50% of initial value (default: 75)
KM Settings:
KM Training Window: Bar lookback for Kaplan-Meier training data collection (default: 500)
Show Survival Labels: Toggle KM probability labels on active zones (default: true)
Display Settings:
Show Demand Zones: Toggle demand (bull) zone boxes (default: true)
Show Supply Zones: Toggle supply (bear) zone boxes (default: true)
Show Dashboard: Toggle the seven-row information table (default: true)
How to Use This Indicator
Step 1: Understand Zone Creation Conditions
Zones are not created on every bar — they are created only when a statistically significant directional impulse (Z-score above threshold) occurs on above-average volume. This selectivity is intentional. In any given trading session, you will likely see only a few zone creation events, each backed by a genuine momentum surge that suggests institutional participation. When you see a new zone appear, note the Z-score values in the dashboard and the volume RSI reading — higher values on both indicate a stronger impulse and more confident zone placement.
Step 2: Prioritize Fresh, High-Survival Zones
Not all zones on the chart are equally relevant. A fresh zone (low age, full opacity) at a KM survival rate of 80% is a far stronger candidate for price reaction than an old zone (high age, near-transparent) at 30% survival probability. Use both the visual opacity and the KM label together: as a zone ages and fades, reduce your expectation that it will provide meaningful support or resistance. When price approaches a zone that is both visually fresh and shows high KM survival probability, the statistical expectation of reaction is at its highest.
Step 3: Watch for Zone Rejection Alerts
The zone rejection alert fires when price tests a zone (enters the box boundary) and then closes back away from it without mitigating it. This is the core trade setup: price returning to the institutional order block level, briefly penetrating it, and then reversing. The rejection alert provides a timely notification for potential entries in the direction of the original impulse that created the zone, with the zone's near boundary serving as the natural stop-loss reference.
Step 4: Monitor KM Training Size for Statistical Validity
The dashboard displays the KM training sample size — the number of completed zone events (both mitigated and aged-out) available for the survival analysis. With fewer than 10 training events, the KM estimate has high variance and should be treated as rough guidance. With 30 or more training events, the estimate becomes statistically stable. On instruments or timeframes where the indicator has run for extended periods, the KM estimates become increasingly reliable as the training dataset grows.
Indicator Limitations
The Z-score cumulative impulse and volume gate require sufficient chart history for the rolling normalization periods to be seeded. In the first Z-lookback bars of a new chart, zone creation signals may be less reliable as the mean and standard deviation are not yet fully established.
Kaplan-Meier survival estimates are only as reliable as the training dataset. On instruments or timeframes that have not accumulated many completed zone events, the survival probabilities should be treated as rough estimates rather than statistically precise values.
The mitigation definition (two closes through the zone) is a configurable approximation. In real order block theory, mitigation can be defined in several ways; this indicator's specific definition may not match every trader's conceptual framework.
Zones are based on the most recent opposing candle at the time of the impulse event. In fast markets where multiple large candles cluster closely together, the marked candle may not represent the most significant institutional order location.
This indicator requires volume data. On instruments where volume is unavailable or unreliable (some synthetic indices, certain forex pairs), the volume gate will not function as intended and should be disabled or its threshold lowered significantly.
The exponential decay model assumes a constant half-life across all market conditions. In reality, zone relevance can be regime-dependent — a zone formed during a trending market may remain relevant longer than one formed during a range, or vice versa.
Maximum active zones per side is a hard limit. If the limit is reached, new valid zone creation events will be rejected until an existing zone is mitigated or aged out.
Originality Statement
The Liquidity Zone Harvester is a genuinely original indicator that applies statistical and mathematical frameworks from outside the trading domain to a problem common in technical analysis.
The Z-score cumulative impulse detection — using consecutive close-open accumulation normalized against rolling sma/stdev — as the primary trigger for order block marking is an original signal architecture. Most order block indicators use visual pattern matching (e.g., a large candle followed by a gap) rather than statistical significance thresholds.
Applying the Kaplan-Meier survival estimator — a nonparametric method from biostatistics — to estimate the probability that a liquidity zone will survive future price tests is a novel application of medical statistics to market analysis. This provides a mathematically grounded probability estimate that no standard order block indicator offers.
The Bayesian exponential decay applied to zone visual transparency — using a configurable half-life to continuously encode zone freshness as opacity — is an original visual design that treats zone relevance as a continuously diminishing probability rather than a binary active/inactive state.
The overlap prevention function that iterates over all existing zone arrays before creating a new zone — with the index-crash guard for empty arrays — is a specific engineering solution to a concrete problem in box-based indicator design.
The volume RSI quality gate, applied specifically to filter Z-score impulse events rather than as a standalone signal, is an original confluence filter design that specifically addresses the problem of thin-market false signals in order block detection.
Disclaimer
The Liquidity Zone Harvester is provided for educational and informational purposes only. It is a technical analysis tool and does not constitute financial advice. Liquidity zones and order blocks are analytical constructs; they do not guarantee price reactions. Past zone behavior as encoded in Kaplan-Meier estimates does not predict future zone performance. All trading involves risk of loss. Users are solely responsible for their own trading decisions. Please consider your individual risk tolerance and consult a licensed financial professional before engaging in any trading activity.
-Made with passion by officialjackofalltrades
Indicator

Spectra Inflection [JOAT]Spectra Inflection
Introduction
Spectra Inflection is an advanced open-source momentum oscillator that replaces conventional RSI with a Laguerre-domain filter, applies Jurik Moving Average (JMA) adaptive smoothing, and overlays a Zero-Lag EMA (ZEMA) signal line to produce a momentum reading with substantially less lag and noise than standard oscillators. The indicator then layers on Schmitt trigger state transitions, dynamic VWMA bands, gradient histogram rendering, momentum divergence detection, velocity and acceleration tracking, squeeze detection, exhaustion signals, and a comprehensive 16-row dashboard — all in a single pane.
This indicator exists because traditional momentum oscillators like RSI suffer from two fundamental problems: lag and noise. Lag causes late entries and exits. Noise causes false signals in choppy markets. Spectra Inflection addresses both by combining a Laguerre filter (which compresses price history into a shorter effective window without losing smoothness) with JMA adaptive smoothing (which tracks fast moves closely while filtering out chop). The result is a momentum curve that responds to genuine trend shifts quickly while remaining stable during consolidation.
Core Concepts
1. Laguerre RSI Core
The Laguerre filter is a four-element recursive filter originally developed by John Ehlers. Unlike a standard RSI that uses a fixed lookback window, the Laguerre filter uses a damping factor (alpha) to create an exponentially-weighted cascade of four internal registers (L0 through L3). This produces a smoother, more responsive oscillator:
float gamma = 1.0 - alpha
L0 := alpha * close + gamma * nz(L0 )
L1 := -gamma * L0 + nz(L0 ) + gamma * nz(L1 )
L2 := -gamma * L1 + nz(L1 ) + gamma * nz(L2 )
L3 := -gamma * L2 + nz(L2 ) + gamma * nz(L3 )
The cumulative up/down movements across all four registers are then computed to derive an RSI-like value scaled 0-100. Lower alpha values produce smoother output (more filtering), while higher values produce faster response. The default alpha of 0.07 provides a balance between responsiveness and noise rejection.
2. JMA Adaptive Smoothing
The raw Laguerre RSI output is then passed through a Jurik Moving Average, which is a proprietary-class adaptive filter. JMA uses a volatility-tracking mechanism to adjust its smoothing dynamically: when the input is volatile, JMA tracks more closely; when the input is stable, JMA smooths more aggressively. This means the momentum line hugs genuine reversals tightly while filtering out noise during consolidation. The JMA implementation uses three parameters: period (smoothing length), phase (lead/lag adjustment), and power (responsiveness curve).
3. ZEMA Signal Line
A Zero-Lag EMA is calculated on the JMA-smoothed momentum line. ZEMA works by computing two EMAs and extrapolating the difference to cancel out the inherent lag:
ema1 = ta.ema(src, len)
ema2 = ta.ema(ema1, len)
zema = ema1 + (ema1 - ema2)
Crossovers between the momentum line and the ZEMA signal line generate potential entry and exit signals. The indicator scores each crossover based on the angle of approach, distance from the midline, and volume context to produce a "cross quality" rating.
4. Schmitt Trigger State Machine
Rather than using simple threshold crossings (which produce whipsaws), the indicator uses a Schmitt trigger — a hysteresis-based state machine where the entry threshold differs from the exit threshold. For example, the momentum line must cross above 62 to enter a bullish state, but must drop below 55 to exit it. This prevents rapid flip-flopping in choppy conditions and produces cleaner, more tradeable state transitions.
5. Dynamic VWMA Bands
Volume-Weighted Moving Average bands are calculated around the momentum line. These bands expand when volume is high (indicating conviction) and contract when volume is low (indicating indecision). Price touching or exceeding the bands while momentum is extended signals potential exhaustion or continuation depending on the volume context.
Features
Gradient Histogram: A color-gradient histogram below the momentum line shows the distance from the midline (50). Colors shift smoothly from muted near the center to vivid at extremes, providing instant visual feedback on momentum intensity without cluttering the chart
Neon Glow Rendering: The main momentum line uses a multi-layer plot technique where progressively wider, more transparent copies of the line are stacked to create a subtle glow effect that intensifies with momentum strength
Momentum Divergence Detection: The indicator detects both regular and hidden divergences using fractal pivot anchoring. When price makes a new high but the Laguerre RSI makes a lower high (bearish divergence), or price makes a new low but the oscillator makes a higher low (bullish divergence), the indicator draws divergence lines and labels
Velocity and Acceleration Tracking: First and second derivatives of the momentum line are calculated and smoothed. Velocity shows the rate of momentum change; acceleration shows whether momentum is speeding up or slowing down. These are displayed in the dashboard
OB/OS Exhaustion Detection: When momentum reaches extreme overbought or oversold levels with declining velocity, the indicator flags potential exhaustion points where reversals are more likely
Cross Quality Scoring: Each momentum/signal crossover is scored 0-100 based on the angle of the cross, distance from the midline, and whether volume confirms the move. Higher scores indicate higher-conviction crosses
Band Squeeze Detection: When VWMA bands contract below a threshold, the indicator identifies a "squeeze" condition — compressed momentum that often precedes a sharp expansion move
Midline Conviction Signals: Crosses of the 50 midline are tracked with volume confirmation to identify shifts in the underlying momentum bias
Momentum Regime Classification: The dashboard classifies the current momentum state as Trending Bull, Trending Bear, Ranging, or Transitional based on the composite of all sub-systems
16-Row Dashboard: A comprehensive real-time table displays Laguerre RSI, JMA momentum, ZEMA signal, state, velocity, acceleration, cross quality, band width, squeeze status, divergence history, regime classification, and more
Input Parameters
Laguerre Core:
Alpha: Damping factor for the Laguerre filter (default: 0.07). Lower = smoother, higher = faster
JMA Smoothing:
Period: JMA smoothing length (default: 8)
Phase: Lead/lag adjustment from -100 to +100 (default: -50)
Power: Responsiveness curve (default: 0.6)
Signal Line:
ZEMA Length: Period for the zero-lag signal line (default: 13)
State Thresholds:
Bull Entry/Exit: Schmitt trigger thresholds for bullish state (default: 62/55)
Bear Entry/Exit: Schmitt trigger thresholds for bearish state (default: 38/45)
VWMA Bands:
Band Length: VWMA calculation period (default: 20)
Band Width: Multiplier for band distance (default: 1.5)
Visuals:
Toggles for histogram, glow, divergence lines, bar coloring, background zones, squeeze markers, and dashboard
How to Use This Indicator
Step 1: Identify the Momentum Regime
Check the dashboard's regime classification. In trending regimes, look for pullback entries in the direction of the trend. In ranging regimes, look for mean-reversion setups at the VWMA band extremes.
Step 2: Wait for Schmitt Trigger State Transitions
Rather than acting on every oscillator wiggle, wait for the Schmitt trigger to confirm a state change. A transition from neutral to bullish (momentum crossing above the bull threshold with hysteresis) is a higher-conviction signal than a simple RSI crossing 50.
Step 3: Confirm with Cross Quality
When a momentum/signal crossover occurs, check the cross quality score. Scores above 60 indicate strong, angled crosses with volume confirmation. Scores below 30 suggest weak, flat crosses that are more likely to fail.
Step 4: Watch for Divergences
Divergences between price and the Laguerre RSI often precede reversals. Regular divergences signal potential trend changes; hidden divergences signal trend continuation. Use these in conjunction with the regime classification for context.
Step 5: Monitor Squeeze and Exhaustion
Band squeezes indicate compressed momentum — prepare for a breakout. Exhaustion signals at OB/OS extremes with declining velocity suggest the current move is losing steam.
Indicator Limitations
Like all momentum oscillators, this indicator is a lagging derivative of price. It confirms moves rather than predicting them
The Laguerre filter's alpha parameter significantly affects behavior — values that work well on one timeframe or instrument may need adjustment for others
Divergence detection uses fractal pivots which require a right-bar confirmation delay (default 5 bars). Divergences are identified after the fact, not in real-time
The Schmitt trigger prevents whipsaws but also delays state transitions. In fast-moving markets, the state change may come after a significant portion of the move has already occurred
Volume-based features (VWMA bands, cross quality scoring) work best on instruments with reliable volume data. On forex or instruments with synthetic volume, these features may be less meaningful
This is a momentum tool, not a complete trading system. It should be combined with trend structure, support/resistance, and risk management for actual trading decisions
Originality Statement
This indicator is original in its synthesis of multiple advanced signal processing techniques into a unified momentum analysis system. While individual components (Laguerre filters, JMA smoothing, ZEMA, Schmitt triggers) are established concepts in technical analysis and signal processing, this indicator is justified because:
The Laguerre-to-JMA-to-ZEMA processing chain creates a momentum signal with properties not achievable by any single technique alone — the Laguerre provides the raw momentum extraction, JMA provides adaptive noise filtering, and ZEMA provides a lag-compensated reference
The Schmitt trigger state machine replaces simple threshold crossings with hysteresis-based transitions, substantially reducing false signals in choppy conditions
Cross quality scoring provides a quantitative measure of signal conviction that is not available in standard oscillator implementations
The integration of velocity, acceleration, exhaustion detection, squeeze detection, and divergence analysis into a single coherent pane eliminates the need for multiple separate indicators
Dynamic VWMA bands provide volume-contextual overbought/oversold boundaries rather than fixed 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. Past performance of any indicator does not guarantee future results. The momentum readings, state classifications, and signals displayed are mathematical calculations based on historical price data — they do not predict future price movement. Always use proper risk management and conduct your own analysis before making trading decisions. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Killzone Cartograph [JOAT]Killzone Cartograph
Introduction
Killzone Cartograph is an advanced open-source session structure mapper built around ICT (Inner Circle Trader) concepts. It automatically detects and renders the major institutional trading sessions — Asia, London, New York, and London Close — as color-coded boxes on the chart, calculates deviation projections from session ranges, tracks the New York Midnight Open as a key reference level, measures session dominance, detects session overlaps, and provides session bias signals. The indicator transforms raw time-of-day data into a structured visual map of when and where institutional activity concentrates.
The reason this indicator exists is that price does not move randomly throughout the day. Institutional order flow clusters around specific session windows — the "killzones" — where liquidity is deepest and the largest moves originate. Retail traders who ignore session structure often enter during low-liquidity periods (getting chopped) or miss the high-probability windows entirely. Killzone Cartograph makes session structure visible so traders can align their activity with institutional timing.
Core Concepts
1. Session Killzone Detection and Rendering
Each session is defined by a time window and timezone. The indicator detects when the current bar falls within each session and renders a box from the session's high to low, extending as the session progresses:
Asia Session: Typically 2000-0000 NY time. Often establishes the initial range that London and New York will sweep
London Session: Typically 0200-0500 NY time. The first major liquidity injection of the day, frequently setting the daily direction
New York Session: Typically 0700-1000 NY time. The highest-volume window where the London move is either confirmed or reversed
London Close: Typically 1000-1200 NY time. A secondary window where institutional position management creates distinct price patterns
Each session box is rendered with a distinct color from a muted institutional palette — tyrian violet for Asia, cardinal for London, cerulean for New York, and gunmetal for London Close. Box borders use the session color while fills use high transparency to avoid obscuring price action.
2. Deviation Projections
Once a session's range is established, the indicator projects deviation levels above and below the session high and low. These projections use configurable multipliers of the session range to identify where price might reach if it breaks out of the session box. This concept is rooted in the ICT framework where session ranges serve as measuring sticks for subsequent moves:
float sessionRange = sessionHigh - sessionLow
float devUp = sessionHigh + sessionRange * deviationMult
float devDn = sessionLow - sessionRange * deviationMult
Deviation levels are drawn as dashed lines extending from the session box, providing visual targets for breakout moves.
3. New York Midnight Open Reference
The NY Midnight Open (the opening price at 00:00 New York time) is a key ICT reference level. It serves as a daily bias marker — price above the midnight open suggests bullish daily bias, below suggests bearish. The indicator tracks this level and draws it as a horizontal reference line across the chart. Many institutional algorithms reference this level for daily positioning decisions.
4. Session Dominance and Overlap Detection
The indicator tracks which session produces the largest range each day and identifies it as the "dominant" session. It also detects when sessions overlap (London/New York overlap is particularly significant as it produces the highest liquidity of the day). Overlap periods are highlighted because they often generate the most significant price moves.
5. Session Bias Signals
At the close of each session, the indicator evaluates the session's price action to determine bias:
If the session closed in its upper third with expanding range, bullish bias is assigned
If the session closed in its lower third with expanding range, bearish bias is assigned
Otherwise, neutral bias is assigned
These bias arrows appear at session boundaries to provide quick directional context for the next session.
6. Killzone Strength Scoring
Each killzone receives a strength score based on the session's range relative to the daily ATR, volume during the session, and whether the session produced a directional move or just chopped. Higher scores indicate more significant sessions that are more likely to set the tone for subsequent price action.
Features
Session Box Rendering: Automatically drawn boxes for each session with configurable colors, extending as the session progresses and finalizing at session close
Deviation Projection Lines: Dashed lines at configurable multiples of the session range, projecting potential breakout targets
NY Midnight Open Line: Persistent horizontal reference at the 00:00 NY open price, updated daily
Previous Day High/Low Levels: Horizontal lines marking the prior day's extremes as key support/resistance references
Session Overlap Highlighting: Background coloring during session overlap periods (particularly London/NY overlap)
Dominance Coloring: The dominant session's box receives enhanced visual treatment to stand out
Session Bias Arrows: Directional arrows at session boundaries indicating the session's concluded bias
Killzone Strength Score: Numerical score for each session displayed in the dashboard
Session Bar Coloring: Optional bar coloring that tints candles based on which session they belong to
16-Row Dashboard: Displays current session, session high/low/range, deviation levels, midnight open, daily bias, dominant session, overlap status, killzone scores, and previous day levels
Input Parameters
Session Windows:
Asia/London/New York/London Close session times: Configurable time windows in exchange timezone
Timezone: Timezone for session calculations (default: America/New_York)
Deviation:
Deviation Multiplier: Multiple of session range for projection lines (default: 1.0)
Show Deviations: Toggle deviation projection lines
Reference Levels:
Show Midnight Open: Toggle NY Midnight Open reference line
Show Previous Day H/L: Toggle prior day's high and low levels
Visuals:
Toggles for each session's box rendering, bias arrows, bar coloring, overlap background, and dashboard
Individual color inputs for each session
How to Use This Indicator
Step 1: Identify the Active Session
The colored box tells you which session is currently active. Focus your trading during the session windows where you have the most experience and where your strategy performs best.
Step 2: Use Session Ranges as Context
The Asia session range often serves as the "initial balance" for the day. Watch for London to sweep one side of the Asia range (a liquidity grab) before establishing the daily direction. The New York session then either confirms or reverses the London move.
Step 3: Trade Deviation Projections
When price breaks out of a session box, the deviation projection lines provide measured-move targets. These are not guaranteed levels but represent statistically common extension distances based on the session's own range.
Step 4: Reference the Midnight Open
Use the NY Midnight Open as a daily bias filter. If price is above the midnight open, favor long setups. If below, favor short setups. This simple filter aligns your trading with the daily institutional bias.
Step 5: Prioritize Overlap Windows
The London/New York overlap (typically 0700-1000 NY time) produces the highest liquidity and often the day's most significant move. This is the highest-probability window for directional trades.
Close-up of the London/New York overlap period showing session boxes overlapping, deviation projections extending from the London range, and the NY Midnight Open reference line with price reacting to it
Indicator Limitations
Session times are fixed inputs based on typical institutional schedules. During daylight saving time transitions, session windows may need manual adjustment depending on your broker's timezone handling
Session structure analysis is most relevant for forex, futures, and indices that have distinct session-based liquidity patterns. Crypto markets trade 24/7 with less distinct session boundaries
Deviation projections are statistical tendencies, not guaranteed levels. Price may fall short of or exceed projected deviations
The NY Midnight Open is a reference level, not a support/resistance level with inherent strength. Its significance comes from institutional algorithm behavior, which may vary
Session dominance and bias signals are determined after the session closes, making them useful for context but not for real-time entries within that session
On higher timeframes (4H, Daily), individual session boxes may not render meaningfully as multiple sessions fit within a single candle
Originality Statement
This indicator is original in its comprehensive integration of ICT session concepts into a unified mapping system. While session boxes and killzone detection exist in other scripts, this indicator is justified because:
The deviation projection system uses the session's own range as a measuring stick, providing context-specific targets rather than generic ATR-based projections
Killzone strength scoring quantifies session significance using range, volume, and directional metrics — providing an objective measure not available in simple session box indicators
Session overlap detection with visual highlighting identifies the highest-liquidity windows automatically
The integration of NY Midnight Open, previous day levels, session bias, and dominance tracking into a single tool eliminates the need for multiple separate session indicators
Session bias arrows provide actionable directional context at session boundaries based on multi-factor analysis of the concluded session
The muted institutional color palette and clean box rendering avoid the visual clutter common in session-based indicators
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 structures, deviation projections, and bias signals are based on historical patterns of institutional activity and do not guarantee future price behavior. Market conditions change, and sessions that historically produced strong moves may not always do so. Always use proper risk management and conduct your own analysis. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Cadence Veil [JOAT]Cadence Veil /b]
Introduction
Cadence Veil is an advanced open-source regime classification indicator that fuses an H-Infinity adaptive filter, R-squared efficiency gating, dual-window chop scoring, and Kaufman adaptive efficiency into a unified five-state regime engine. The indicator classifies every bar into one of five market states — Expansion Bull, Expansion Bear, Compression, Whipsaw, or Dormant — using a hysteresis state machine that prevents rapid flip-flopping between regimes. It then overlays volatility envelope bands, a ZEMA bias ribbon, structural pivot tracking, regime shift boxes, and gradient visualization to create a complete market phase recognition system.
The core problem this indicator solves is regime misidentification. Most traders apply the same strategy regardless of market conditions — trend-following in chop, mean-reversion in trends, or trading during dormant periods when nothing meaningful is happening. Each of these mismatches leads to losses. Cadence Veil explicitly classifies the current regime so traders can select the appropriate strategy for the conditions. A compression regime calls for breakout preparation. An expansion regime calls for trend-following. A whipsaw regime calls for caution or sitting out entirely. A dormant regime means the market lacks the energy for any strategy to work reliably.
Core Concepts
1. H-Infinity Adaptive Filter
The centerline of the indicator uses an H-Infinity filter rather than a conventional moving average. H-Infinity filtering is a control theory technique designed to produce optimal estimates under worst-case noise conditions. Unlike a Kalman filter (which assumes Gaussian noise), the H-Infinity filter makes no assumptions about noise distribution, making it more robust in financial markets where price noise is decidedly non-Gaussian:
for i = 0 to hinfOrder - 1
float s = array.get(hinfState, i)
float e = array.get(hinfError, i) + hinfNoise
float g = e / (e + hinfDist)
array.set(hinfState, i, s + g * (close - s))
array.set(hinfError, i, (1.0 - g) * e)
The filter maintains internal state and error estimates that adapt each bar. The gain parameter (error divided by error plus disturbance) determines how much the filter trusts new data versus its existing estimate. Higher disturbance values make the filter more conservative (smoother); lower values make it more responsive. The filter order parameter controls how many state dimensions are tracked, with higher orders providing more sophisticated noise modeling.
2. R-Squared Efficiency Gate
R-squared measures how well price movement fits a linear regression line. A high R-squared (close to 1.0) means price is moving in a straight, efficient line — a strong trend. A low R-squared (close to 0) means price is moving randomly with no directional efficiency:
float r2Raw = math.pow(ta.correlation(close, bar_index, effLen), 2)
float r2Smooth = ta.sma(r2Raw, effSmooth)
The indicator uses an auto-calibrating threshold: the rolling mean of R-squared plus k standard deviations. This means the threshold adapts to the instrument's typical trending behavior. A hysteresis band prevents the gate from flickering — once open, R-squared must drop further to close the gate than it needed to rise to open it.
3. Dual-Window Chop Scoring
Chop is measured using the efficiency ratio concept: the net price movement divided by the total path length over a window. A perfectly straight move scores 0 (no chop); a move that goes nowhere despite lots of bar-to-bar movement scores 1 (maximum chop). The indicator uses two windows — a fast window (default 14 bars) for recent chop and a slow window (default 50 bars) for structural chop — and blends them:
f_chop(int len) =>
float netMove = math.abs(close - close )
float pathLen = math.sum(math.abs(close - close ), len)
pathLen == 0.0 ? 1.0 : 1.0 - (netMove / pathLen)
float chopBlend = (chopFastVal + chopSlowVal) / 2.0
The dual-window approach catches both short-term whipsaws and longer-term structural chop that a single window might miss.
4. Kaufman Efficiency Ratio
The Kaufman ER provides a third independent measure of trend quality. It compares the absolute net price change over N bars to the sum of all bar-to-bar changes over the same period. Values near 1.0 indicate efficient, directional movement; values near 0 indicate noisy, non-directional movement. This complements R-squared (which measures linearity) and chop score (which measures path efficiency) by measuring absolute directional efficiency.
5. Composite Trend Score and State Machine
The three measures are blended into a single composite trend score:
float trendScore = (kaufER * 0.35) + ((1.0 - chopBlend) * 0.35) + (r2Smooth * 0.30)
This score, combined with the H-Infinity filter slope and volatility ratio, feeds into a five-state machine with persistence requirements. A candidate state must hold for a configurable number of consecutive bars (default 3) before the regime officially transitions. This prevents single-bar noise from triggering false regime changes.
The five states are:
Expansion Bull: R-squared gate open, trend score above threshold, H-Infinity slope positive
Expansion Bear: R-squared gate open, trend score above threshold, H-Infinity slope negative
Compression: High chop score, low volatility ratio — market is coiling
Whipsaw: High volatility but also high chop — dangerous conditions with large moves in both directions
Dormant: None of the above conditions met — market lacks energy or direction
6. Volatility Envelope Bands
Adaptive bands are constructed around the H-Infinity line using ZEMA-smoothed ATR. The bands scale their width based on the current regime: narrower during compression (0.7x), wider during expansion (1.2x), and standard during normal conditions. This regime-adaptive scaling means the bands contract when the market is coiling (tightening the range for breakout detection) and expand when the market is trending (giving the trend room to breathe).
Features
Five-State Regime Classification: Clear categorical identification of the current market phase with color-coded rendering throughout the indicator
H-Infinity Core Line with Glow: The adaptive filter line renders with a gradient glow whose color and intensity reflect the current regime and trend score
Regime Shift Boxes: When the regime changes, a colored box is drawn that expands to encompass the price range of the new regime, providing a visual record of regime transitions
Regime Shift Labels: Labels at regime transitions show the new regime abbreviation and the trend score at the time of transition
ZEMA Bias Ribbon: A filled ribbon between the H-Infinity line and its ZEMA shows directional bias with bull/bear coloring
Structural Pivot Detection: Swing highs and lows are identified and labeled with regime context — pivots formed during expansion regimes are colored differently than those formed during compression
Structure Lines: Dashed horizontal lines at the most recent swing high and low provide support/resistance reference
Envelope Breach Detection: The dashboard reports whether price is inside the bands, above/below the inner band, or above/below the outer band
Composite Signal Strength: A 0-100 score measuring how aligned all subsystems are (R-squared gate, Kaufman ER, chop score, and ZEMA bias)
Regime History Tracking: The dashboard shows the last three regime states in sequence, revealing the pattern of market phase transitions
Gradient Background Zones: Background coloring shifts on a gradient from compression tones to the current regime color based on the trend score
Regime-Aware Bar Coloring: Candle colors reflect the current regime with momentum-based gradient intensity
14-Row Dashboard: Displays regime state, duration, trend score, signal strength, R-squared gate status, chop blend, Kaufman ER, volatility ratio, H-Infinity gain, ZEMA bias, swing levels, envelope position, and regime history
Input Parameters
H-Infinity Filter:
Filter Order: Number of state-space dimensions (default: 3, range: 1-8)
Process Noise: Expected noise level (default: 0.5)
Disturbance: External disruption parameter (default: 1.0)
Efficiency Gate:
R-Squared Length: Correlation calculation period (default: 30)
Smoothing: R-squared smoothing period (default: 10)
Threshold k: Standard deviations above mean for auto-threshold (default: 1.0)
Chop Detector:
Fast Window: Short-term chop measurement (default: 14)
Slow Window: Long-term chop measurement (default: 50)
State Engine:
Entry Persistence: Consecutive bars required for regime transition (default: 3)
Hysteresis Band: Width of the hysteresis zone to prevent flickering (default: 0.15)
Volatility Envelope:
Inner/Outer ATR Multipliers: Band distance from the core line (default: 1.2/2.4)
ATR Length: Period for ATR calculation (default: 14)
Visuals:
Toggles for envelope bands, ZEMA bias ribbon, structural pivots, structure lines, regime shift boxes, regime shift signals, background zones, bar coloring, and dashboard
How to Use This Indicator
Step 1: Identify the Current Regime
The dashboard's regime field and the background coloring immediately tell you the market phase. This is the most important piece of information — it determines which strategy to apply.
Step 2: Match Strategy to Regime
Expansion Bull/Bear: Use trend-following strategies. Enter pullbacks to the H-Infinity line or inner band in the direction of the expansion
Compression: Prepare for a breakout. Tighten stops, reduce position sizes, and watch for the regime to shift to expansion. The ZEMA bias may hint at the breakout direction
Whipsaw: Reduce exposure or sit out. This regime produces large moves in both directions that stop out trend-followers and mean-reversion traders alike
Dormant: No edge exists. Wait for the market to wake up
Step 3: Use Signal Strength for Conviction
The composite signal strength (0-100) tells you how aligned all subsystems are. A 75+ score during an expansion regime is high-conviction. A 25 score during expansion suggests the regime may be weakening.
Step 4: Monitor Regime Transitions
Regime shift boxes and labels mark exactly where transitions occurred. The most profitable trades often come at the transition from compression to expansion — the breakout from a coiled market.
Step 5: Read the Regime History
The history chain (e.g., "COMP > EXP+ > DORM") reveals the market's recent phase pattern. A sequence like "COMP > EXP+ > COMP > EXP+" suggests a market that trends in bursts between consolidation periods.
Cadence Veil showing a regime transition sequence: compression (purple box) resolving into expansion bull (green box), with the H-Infinity line glow intensifying, envelope bands widening, and the trend score rising in the dashboard
Indicator Limitations
The H-Infinity filter, while theoretically robust, has three parameters (order, noise, disturbance) that significantly affect behavior. Optimal settings vary across instruments and timeframes and may require experimentation
The persistence requirement for regime transitions (default 3 bars) creates a delay. Fast regime changes may be identified several bars after they begin. This is a deliberate trade-off for stability
The five-state classification is a simplification of continuous market behavior. Markets can exist in states that don't cleanly fit any category, and the boundaries between states are inherently fuzzy
R-squared, chop score, and Kaufman ER all use lookback windows. They describe what the market has been doing, not what it will do. A regime can change immediately after being classified
The whipsaw state is identified but no strategy is recommended for it because whipsaw conditions are inherently difficult to trade profitably. The indicator's value here is in warning you to reduce exposure
Volatility envelope bands adapt to the regime but still use ATR, which is backward-looking. Sudden volatility shifts (news events, gaps) may not be reflected in the bands for several bars
Originality Statement
This indicator is original in its application of control theory (H-Infinity filtering) to market regime classification and its synthesis of multiple independent efficiency measures into a unified state machine. While regime detection and adaptive filtering are established concepts, this indicator is justified because:
The H-Infinity filter is rarely used in technical analysis. Its worst-case noise optimization makes it theoretically more appropriate for financial markets than the more common Kalman filter, which assumes Gaussian noise
The triple-measure efficiency assessment (R-squared linearity + dual-window chop + Kaufman efficiency) provides more robust regime detection than any single measure. Each captures a different aspect of market behavior
The five-state classification with hysteresis persistence requirements produces stable, actionable regime labels rather than the flickering binary (trending/ranging) classifications common in simpler indicators
Regime-adaptive volatility envelope scaling automatically adjusts band behavior to the detected market phase, providing context-appropriate support/resistance levels
The composite signal strength score synthesizes all subsystems into a single conviction measure
Regime shift boxes provide a visual record of market phase transitions that aids in pattern recognition across longer timeframes
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. Regime classifications are based on historical data analysis and do not predict future market phases. A market classified as "Expansion Bull" can reverse at any time. Compression does not guarantee a subsequent breakout, and the direction of any breakout is not predicted by the compression classification. Always use proper risk management and conduct your own analysis. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Chaos Regime Detection Engine [JOAT]Chaos Regime Detection Engine
Introduction
The Chaos Regime Detection Engine is an advanced open-source market microstructure indicator that classifies market conditions into distinct regimes using multi-dimensional volatility analysis, directional conviction measurement, and institutional flow detection. This indicator transforms raw market data into actionable regime intelligence, helping traders identify when markets are trending, ranging, chaotic, or experiencing volatility shocks.
Unlike single-dimension volatility indicators that only measure price movement magnitude, this engine analyzes market structure through four independent scoring systems that combine into a unified regime classification framework. The indicator is designed for traders who understand that different market regimes require different trading approaches and that regime identification is the foundation of adaptive strategy selection.
Why This Indicator Exists
This indicator addresses a fundamental challenge in trading: markets constantly shift between different behavioral regimes, and strategies that work in one regime often fail in another. The core innovation lies in synthesizing multiple market microstructure measurements into a probabilistic regime classification system:
Directional Flow Regime: Markets exhibiting high price efficiency, low choppiness, and strong ADX conviction - ideal for trend-following strategies
Equilibrium Regime: Markets showing balanced conditions with moderate volatility and weak directional bias - suitable for mean-reversion approaches
Chaotic Turbulence Regime: Markets displaying high choppiness, low efficiency, and conflicting signals - best avoided or traded with tight stops
Volatility Shock Regime: Markets experiencing extreme volatility expansion with high volume - requires defensive positioning or volatility strategies
Each regime classification is derived from normalized scores across multiple dimensions, ensuring that regime identification remains robust across different instruments, timeframes, and market conditions. The system provides not just regime labels but confidence levels and intensity measurements that quantify regime strength.
Core Components Explained
1. ATR and Volatility Percentile Analysis
The indicator calculates Average True Range (ATR) over a customizable period (default 14) and expresses it as a percentage of current price. This normalization allows cross-instrument comparison and removes price-level bias.
ATR percentile ranking over 100 bars provides context for current volatility relative to recent history. High percentile rankings (>70) indicate elevated volatility, while low rankings (<30) suggest compressed volatility. This percentile approach is superior to raw ATR because it adapts to each instrument's unique volatility characteristics.
The volatility percentile feeds into multiple regime scores, particularly the Volatility Shock score, which combines ATR percentile with standard deviation percentile and volume surge detection to identify extreme volatility events.
2. Kaufman Efficiency Ratio
The Efficiency Ratio measures how efficiently price moves from point A to point B by comparing net price change to total path length:
Efficiency = Net Price Change / Sum of Absolute Bar-to-Bar Changes
Values near 1.0 indicate highly efficient, directional movement (trending). Values near 0.0 indicate inefficient, choppy movement (ranging). The indicator uses a customizable lookback period (default 20) to calculate efficiency.
High efficiency feeds into the Directional Flow score, while low efficiency contributes to both Equilibrium and Chaotic Turbulence scores. This dual contribution ensures that the regime classification captures the full spectrum of market behavior.
3. Choppiness Index
The Choppiness Index quantifies market choppiness using logarithmic calculations:
Choppiness = 100 * log10(Sum of ATR / (Highest High - Lowest Low)) / log10(Length)
Values above 61.8 indicate choppy, range-bound markets. Values below 38.2 indicate trending markets. The indicator uses a customizable period (default 14) for this calculation.
The Choppiness Index is inverted when contributing to the Directional Flow score (100 - Choppiness) because low choppiness indicates high directional clarity. High choppiness directly contributes to the Chaotic Turbulence score, identifying markets where price action lacks clear direction.
4. ADX Directional Conviction System
The indicator implements a complete ADX (Average Directional Index) calculation including +DI and -DI components:
+DI measures upward directional movement strength
-DI measures downward directional movement strength
ADX measures the strength of directional movement regardless of direction
ADX values above the trend threshold (default 25) indicate emerging directional conviction. Values above the strong threshold (default 40) indicate dominant directional conviction. The indicator uses customizable lengths for both DI calculation (default 14) and ADX smoothing (default 14).
ADX contributes bonus points to the Directional Flow score when above threshold and to the Equilibrium score when below threshold. The difference between +DI and -DI provides directional bias (long vs short) and conviction strength measurements.
5. Standard Deviation and RVI Analysis
Standard deviation of close prices over 20 bars provides an alternative volatility measurement that captures price dispersion rather than range. The indicator calculates standard deviation as a percentage of price and ranks it using percentile analysis.
The Relative Volatility Index (RVI) applies standard deviation concepts to directional movement:
RVI = 100 * StdDev(Up Moves) / (StdDev(Up Moves) + StdDev(Down Moves))
RVI values above 50 indicate upward volatility dominance, below 50 indicates downward volatility dominance. This provides directional context to volatility measurements that raw standard deviation lacks.
Both metrics contribute to the Volatility Shock score, helping identify when markets are experiencing not just high volatility but directionally biased volatility expansion.
6. Volume Delta Integration
The indicator estimates buying and selling pressure using volume and candle structure:
Buy Volume = Volume when close > open
Sell Volume = Volume when close < open
Volume surge detection compares current volume to 20-period average using a customizable threshold (default 1.5x). Volume surges add bonus points to the Volatility Shock score, confirming that volatility expansion is accompanied by genuine institutional participation rather than thin-market noise.
This volume integration ensures that regime classifications reflect actual market activity rather than just price movement patterns.
7. Regime Scoring and Classification Engine
The indicator calculates four independent regime scores (0-100 scale):
Directional Score = (Efficiency * 100 + (100 - Choppiness) + ADX Bonus) / 2.2
Equilibrium Score = (100 - ATR Percentile + (100 - Efficiency * 100) + ADX Penalty) / 2.2
Turbulence Score = (Choppiness + (100 - Efficiency * 100)) / 2
Shock Score = (ATR Percentile + StdDev Percentile + Volume Surge Bonus) / 2.3
These scores are then normalized to sum to 100%, creating a probability distribution across the four regimes. The dominant regime is determined by the highest normalized score, with confidence level equal to that score's magnitude.
Regime intensity is classified as Nascent (score 35-45), Established (score 45-60), or Dominant (score >60), providing additional context about regime strength and stability.
8. Fractal Divergence Detection
The indicator implements fractal-based divergence detection using a composite volatility index that combines:
30% ATR Percentile
20% Efficiency Ratio
20% Inverted Choppiness
15% StdDev Percentile
15% RVI
This composite index is smoothed with a 5-period EMA and analyzed for fractal tops and bottoms using a 5-bar pattern recognition system. Divergences are detected when price makes new highs/lows but the composite volatility index fails to confirm, suggesting hidden institutional positioning or liquidity asymmetries.
Regular divergences signal potential reversals, while hidden divergences suggest trend continuation after pullbacks. The indicator plots these divergences with color-coded markers and draws connecting lines for visual clarity.
Visual Elements
Composite Volatility Line: Main plot showing the smoothed composite volatility index with dynamic gradient coloring based on regime confidence
Regime Intensity Histogram: Histogram showing regime-specific intensity with transparency based on confidence level
Microstructure Indicators: Subtle circle plots showing ATR percentile, efficiency ratio, and directional clarity for detailed analysis
Conviction Overlay: Stepline plot showing ADX with gradient coloring based on conviction strength
Fractal Divergence Markers: Circle plots at fractal tops/bottoms with color-coded divergence identification
Regime Threshold Lines: Horizontal lines at key regime transition levels (50, 60, 40, 75, 25)
Probability Zone Fill: Subtle background fill showing current regime probability field
Signal Shapes: Triangle shapes on price chart for high-confidence regime transitions and divergences
Comprehensive Dashboard: 12-row intelligence panel showing regime state, certainty, bias, probability scores, conviction, confluence, and all key metrics
The dashboard provides at-a-glance regime assessment with color-coded values, status indicators, and confidence measurements for all regime dimensions simultaneously.
Input Parameters
Signal Architecture:
Regime Shift Signals: Toggle chaos-to-order transition detection (default enabled)
Regime Persistence Signals: Toggle regime stability confirmations (default enabled)
Fractal Divergence Detection: Toggle hidden liquidity flow asymmetries (default enabled)
Minimum Confluence Threshold: Multi-factor validation requirement (1-5, default 3)
Volatility Microstructure:
Volatility Expansion Period: ATR calculation length (5-50, default 14)
Volatility Percentile Window: Percentile ranking lookback (20-500, default 100)
Price Efficiency Horizon: Efficiency ratio calculation period (5-100, default 20)
Chaos Measurement Period: Choppiness index length (5-50, default 14)
Directional Conviction:
Conviction Measurement Length: DI calculation period (5-50, default 14)
Conviction Smoothing Factor: ADX smoothing length (1-50, default 14)
Conviction Emergence Level: ADX trend threshold (15-40, default 25)
Conviction Dominance Level: ADX strong threshold (30-60, default 40)
Institutional Flow:
Enable Flow Asymmetry Detection: Toggle volume delta analysis (default enabled)
Flow Surge Multiplier: Volume threshold for surge detection (1.0-5.0, default 1.5)
Regime Parameters:
Directional Regime Threshold: Score required for directional classification (50-90, default 60)
Chaotic Regime Threshold: Score required for chaos classification (10-50, default 40)
Volatility Shock Threshold: Score required for shock classification (25-50, default 35)
Visualization:
Regime Intelligence Panel: Toggle dashboard display (default enabled)
Microstructure Indicators: Toggle detailed metric plots (default enabled)
Regime Probability Zones: Toggle background probability field (default enabled)
Intelligence Panel Scale: Small/Normal/Large dashboard sizing (default Normal)
Colors:
All colors are fully customizable including directional expansion (neon cyan), volatility shock (neon pink), equilibrium state (gold), and chaotic turbulence (sunset orange).
How to Use This Indicator
Step 1: Identify Current Regime
Check the dashboard "STATE" field to see current regime classification. Note the intensity level (Nascent/Established/Dominant) and certainty percentage. Dominant regimes with high certainty (>80%) are most reliable for strategy selection.
Step 2: Assess Regime Certainty
Monitor the "CERTAINTY" metric. High certainty (>60%) indicates clear regime conditions where strategies aligned with that regime should perform well. Low certainty (<40%) suggests transitional conditions where defensive positioning is appropriate.
Step 3: Check Directional Bias
Review the "BIAS" field showing Long Flow, Short Flow, or Neutral. This indicates whether directional conviction favors long or short positioning within the current regime. The numerical value shows conviction strength.
Step 4: Analyze Regime Probability Scores
Examine the four regime probability scores (Directional, Equilibrium, Turbulence, Shock). These show the relative likelihood of each regime. When one score dominates (>60%), regime classification is clear. When scores are balanced, market is transitional.
Step 5: Monitor Conviction Metrics
Check "CONVICTION" showing ADX value and status (Dominant/Emerging/Absent). Dominant conviction (>40) confirms that directional regimes have strong follow-through potential. Absent conviction (<25) suggests equilibrium or chaotic conditions.
Step 6: Evaluate Confluence Matrix
Review the "CONFLUENCE" score (0-5) showing how many confirmation factors align. Maximum confluence (5/5) indicates all factors agree, providing highest-confidence regime classification. Low confluence (1-2/5) suggests conflicting signals requiring caution.
Step 7: Watch for Regime Transitions
Regime transition signals (triangles on price chart) mark shifts between regimes. These are critical moments for strategy adjustment. Transitions from Chaos to Directional often mark the start of new trends. Transitions to Shock regimes warn of elevated risk.
Step 8: Use Divergence Signals
Fractal divergence markers (labeled "DIV") identify price-volatility asymmetries that often precede regime changes. Bullish divergences in Equilibrium regimes may signal upcoming Directional regimes. Bearish divergences in Directional regimes may warn of regime exhaustion.
Best Practices
Use Directional Flow regimes for trend-following strategies with trailing stops
Use Equilibrium regimes for mean-reversion strategies with defined profit targets
Avoid new positions during Chaotic Turbulence regimes or use very tight stops
Reduce position size or hedge during Volatility Shock regimes
Regime transitions with high confluence (4-5/5) offer highest-probability strategy shift opportunities
Dominant intensity regimes (>60% certainty) are most reliable for strategy execution
Nascent intensity regimes (<45% certainty) require defensive positioning until regime establishes
Monitor conviction metrics - Directional regimes without conviction (ADX <25) often fail
Fractal divergences are most reliable when they occur at regime extremes
Use the probability scores to anticipate regime transitions before they're officially classified
Equilibrium regimes with rising Directional scores suggest impending breakouts
Directional regimes with rising Turbulence scores warn of trend exhaustion
Indicator Limitations
Regime classification is probabilistic, not deterministic - no regime guarantees specific outcomes
The indicator identifies current regime but cannot predict regime duration
Regime transitions can be whipsaw-prone during genuinely transitional market conditions
Volume-based components require accurate volume data - some instruments have unreliable volume
The indicator works best on liquid instruments with consistent trading patterns
Newly listed instruments may lack sufficient history for reliable percentile calculations
Extreme market events (flash crashes, circuit breakers) can temporarily distort regime classification
The indicator shows what regime exists, not why - fundamental catalysts can override regime signals
Confluence scoring requires all factors to be relevant - some factors may be less meaningful on certain instruments
Fractal divergence detection requires clear fractal formation - choppy markets may produce false divergences
Regime intensity classifications are relative to recent history, not absolute across all market conditions
Technical Implementation
Built with Pine Script v6 using:
Complete ADX calculation with +DI/-DI components and customizable smoothing
Kaufman Efficiency Ratio using net change vs path length methodology
Choppiness Index with logarithmic normalization
Multi-component composite volatility index with weighted factor contributions
Percentile ranking calculations for ATR, standard deviation, and composite volatility
Fractal pattern recognition using 5-bar pivot detection
Divergence detection comparing price fractals to volatility fractals
Four-dimensional regime scoring system with normalization to probability distribution
Confluence factor calculation combining conviction, flow, clarity, certainty, and efficiency
Dynamic color gradients based on regime confidence and intensity
Comprehensive dashboard with 12 metrics and color-coded status indicators
Alert system for regime transitions, divergences, and conviction surges
The code is fully open-source with extensive comments explaining each calculation and regime classification logic.
Originality Statement
This indicator is original in its multi-dimensional regime classification approach. While individual components (ATR, Efficiency Ratio, Choppiness, ADX) are established concepts, this indicator is justified because:
It synthesizes four independent regime scoring systems into a unified probabilistic classification framework
The composite volatility index combines five distinct measurements with optimized weighting
Regime intensity classification (Nascent/Established/Dominant) provides confidence context beyond simple regime labels
Confluence scoring validates regime classification through multi-factor confirmation
Fractal divergence detection identifies hidden institutional positioning through volatility-price asymmetries
The normalization of regime scores to probability distribution ensures consistent interpretation across instruments
Integration of volume surge detection confirms that regime classifications reflect genuine market activity
The dashboard synthesizes 12 distinct metrics into a unified regime intelligence panel
Regime transition signals with confluence filtering provide high-confidence strategy adjustment points
The system adapts to each instrument's unique characteristics through percentile-based calculations
Each component contributes unique intelligence: ATR measures volatility magnitude, Efficiency measures directional clarity, Choppiness measures range-bound behavior, ADX measures conviction, volume confirms participation, and divergences reveal hidden positioning. The indicator's value lies in combining these complementary perspectives into a cohesive regime classification system that guides strategy selection.
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.
Regime classification is probabilistic analysis that identifies current market conditions but does not predict future regime duration or transitions. Regime signals do not guarantee profitable trades. Past regime patterns do not guarantee future regime patterns. Market conditions change, and strategies that worked in historical regimes may not work in future regimes.
The metrics displayed are mathematical calculations based on current market data, not predictions of future price movement. Regime transitions, divergences, and confluence scores do not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.
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 indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicator

Imbalance Cartograph [JOAT]Imbalance Cartograph
Introduction
The Imbalance Cartograph is an advanced open-source price imbalance mapping engine that identifies, tracks, and manages Fair Value Gaps (FVGs) and Supply/Demand zones across multiple layers. It goes far beyond basic FVG detection by adding auto-mitigation, volume filtering, transparency fade for aging zones, stacked imbalance detection, confluence highlighting, nearest zone radar, imbalance density scoring, and a comprehensive 15-row dashboard. Every zone is non-repainting and drawn only on confirmed bars.
The core idea is simple but powerful: institutional order flow creates imbalances in price delivery. These imbalances — gaps where price moved too fast for the market to fill, and zones where large orders were placed — act as magnets that price tends to revisit. By mapping all active imbalances and tracking their lifecycle, traders can identify high-probability areas where institutional interest exists.
Why This Indicator Exists
Fair Value Gaps and Supply/Demand zones are among the most discussed concepts in Smart Money methodology, yet most indicators that detect them are simplistic: they draw a box when a gap forms and leave it there indefinitely, with no lifecycle management, no volume confirmation, and no way to assess how many imbalances are clustered near current price.
The Imbalance Cartograph solves these problems by treating imbalances as living entities with a full lifecycle:
Creation: FVGs are detected using the standard three-candle gap pattern, but filtered by volume (only gaps formed on above-average volume qualify by default). Supply/Demand zones are created at swing pivots using configurable pivot lengths.
Aging: Older zones progressively fade in transparency, giving visual priority to fresh zones while keeping historical context visible.
Testing: When price returns to a zone, it transitions from "fresh" to "tested" with a color change, indicating the zone has been challenged but not broken.
Mitigation: FVGs are automatically deleted when price fills the gap completely. Supply zones broken by price can convert to breaker blocks (polarity flip).
Confluence: When an FVG overlaps with a Supply/Demand zone, the overlap area is highlighted as a high-probability confluence zone.
Layer 1: Fair Value Gaps
FVGs represent gaps in price delivery where the market moved so aggressively that it left unfilled space between candles. The indicator detects both bullish and bearish FVGs:
Bullish FVG: Current candle's low is above the candle-two-bars-ago's high, and the middle candle closed above that high. This creates an upward gap in price delivery.
Bearish FVG: Current candle's high is below the candle-two-bars-ago's low, and the middle candle closed below that low. This creates a downward gap.
Each FVG is drawn as a colored box extending forward (default 50 bars) with optional price labels showing the exact gap range.
Volume Filter: When enabled (default), FVGs only qualify if the middle candle's volume exceeds the 20-bar average. This filters out low-conviction gaps that are less likely to act as institutional reference points.
Auto-Mitigation: When enabled (default), FVGs are automatically deleted when price fills the gap. For bullish FVGs, this means price's low touches the top of the gap. For bearish FVGs, price's high reaches the bottom. The indicator tracks mitigation counts for the dashboard.
Stacked Imbalance Detection: When two or more consecutive FVGs form in the same direction, the indicator marks them as "STACKED" with a count. Stacked FVGs indicate sustained institutional pressure — the market is creating gap after gap in the same direction, which is a strong directional signal.
Layer 2: Supply and Demand Zones
Supply and Demand zones are created at swing pivot points detected using ta.pivothigh() and ta.pivotlow() with a configurable pivot length (default 10 bars).
Supply Zones: Created at swing highs. The zone extends from the swing high candle's high down to the candle body (max of open, close). These represent areas where selling pressure overwhelmed buying.
Demand Zones: Created at swing lows. The zone extends from the swing low candle's low up to the candle body (min of open, close). These represent areas where buying pressure overwhelmed selling.
Zone Lifecycle:
Fresh: Newly created zone, bright color, never tested
Tested: Price has returned to the zone but not broken through. Color shifts to indicate the zone has been challenged.
Broken/Breaker: When price breaks through a zone completely, it can optionally convert to a "breaker block" — the zone flips polarity (old supply becomes potential demand, and vice versa). This is a key Smart Money concept.
Overlap Prevention: New zones are checked against existing zones using an ATR-based threshold. If a new zone would overlap with an existing one, it is not drawn, keeping the chart clean.
BOS Lines: When price breaks through a supply or demand zone, a Break of Structure (BOS) line is drawn at the broken level, marking the structural shift.
Transparency Fade: When enabled, older zones gradually become more transparent based on their age in bars. This creates a natural visual hierarchy where fresh zones stand out and old zones fade into the background.
Advanced Features
Imbalance Confluence Detection:
The indicator checks whether any active FVG overlaps with any active Supply/Demand zone. When they overlap, the confluence area is highlighted with a gold-colored marker. These confluence zones represent areas where two independent institutional concepts agree — a gap in price delivery coincides with a structural supply or demand level. These are among the highest-probability zones on any chart.
Nearest Zone Radar:
The indicator continuously calculates the distance from current price to the nearest active zone (supply or demand). The dashboard displays the zone type, distance in ATR multiples, and direction. This gives traders an instant read on how close they are to the next potential reaction area.
Imbalance Density:
The indicator counts how many active FVGs and S/D zones exist within 3 ATR of current price and produces a density score (0-10). High density means price is surrounded by multiple imbalances — a "thick" area where reactions are likely. Low density means price is in "clean" territory with fewer institutional reference points.
15-Row Dashboard
Rows 1-2: Bull FVG and Bear FVG counts with stacked status
Rows 3-4: Supply and Demand zone counts with lifecycle state (Fresh/Tested)
Row 5: Breaker block count
Row 6: FVG fill rate (percentage of FVGs that have been mitigated)
Row 7: Nearest zone type, distance, and direction
Row 8: Imbalance density score and classification
Row 9: Confluence detection status (active/none)
Row 10: Stacked imbalance status
Row 11: Zone age (average bars since creation for active zones)
Row 12: Supply retest count and demand retest count
Row 13: Market bias based on imbalance distribution (more bull FVGs + demand = bullish)
Rows 14-15: Total FVG and zone statistics
Input Parameters
Fair Value Gaps:
Show FVGs (default on), FVG Extend bars (default 50), Max FVGs Displayed (default 15)
Auto-Mitigate FVGs (default on) — delete when price fills the gap
Volume Filter (default on) — only show FVGs with above-average volume
Supply / Demand Zones:
Show Zones (default on), Pivot Length (default 10), Max Zones (default 15)
Show BOS Lines (default on), Convert to Breaker (default on)
Fade Old Zones (default on) — transparency increases with age
Advanced Features:
Show Confluence Zones (default on), Show Stacked Imbalances (default on)
Show Price Labels on Zones (default on)
How to Use This Indicator
Step 1: Identify Active Imbalances
Look at the chart for active FVG boxes and S/D zones. Fresh zones (brighter colors) are more likely to produce reactions than tested or faded zones.
Step 2: Check Imbalance Density
The dashboard's density score tells you whether price is in a zone-rich or zone-poor area. High density (7+) means multiple imbalances are nearby — expect reactions. Low density (0-2) means price is in clean delivery territory.
Step 3: Watch for Confluence
When the dashboard shows "CONFLUENCE ACTIVE," an FVG overlaps with a S/D zone. These are the highest-probability reaction areas. Consider these zones for entries with tight stops.
Step 4: Monitor Stacked FVGs
Stacked FVGs (2+ consecutive gaps in the same direction) indicate strong institutional pressure. The market is not pausing to fill gaps — it is aggressively displacing price. Trade in the direction of stacked FVGs.
Step 5: Use Nearest Zone for Targets
The nearest zone radar tells you how far price is from the next potential reaction. Use this for setting take-profit targets or anticipating where price may stall.
Step 6: Track Mitigation Rate
The FVG fill rate shows what percentage of gaps have been filled. A high fill rate suggests the market is efficiently filling imbalances (range-bound behavior). A low fill rate suggests strong trending where gaps are being left behind.
Limitations
FVG detection uses a standard three-candle pattern. Not all gaps are created by institutional activity — news events and low-liquidity periods can create gaps that lack institutional significance.
Supply/Demand zones are based on swing pivots, which require a lookback period. The pivot length parameter significantly affects zone placement — shorter lengths create more zones, longer lengths create fewer but more significant zones.
Auto-mitigation deletes FVGs when price touches the gap boundary. In some cases, price may wick into a gap without truly filling it. The indicator treats any touch as mitigation.
Volume filtering uses the 20-bar volume average. On instruments with irregular volume patterns (e.g., crypto on weekends), this filter may be too aggressive or too lenient.
The indicator draws on confirmed bars only (barstate.isconfirmed), so zones appear one bar after the pattern completes. This is intentional to prevent repainting.
Imbalance zones show where institutional interest existed historically. They do not guarantee future price reactions.
Originality Statement
This indicator is original in its comprehensive lifecycle approach to imbalance mapping. While FVG detection and S/D zones exist in other scripts, this indicator is justified because:
It treats imbalances as entities with a full lifecycle (creation, aging, testing, mitigation, breaker conversion) rather than static drawings
The volume filter ensures only institutionally-significant FVGs are displayed, reducing noise from low-conviction gaps
Transparency fade creates a natural visual hierarchy that no static-color indicator provides
Stacked imbalance detection identifies consecutive FVGs as a measure of institutional pressure — a concept not available in standard FVG indicators
Confluence detection between FVGs and S/D zones creates a cross-layer analysis that identifies the highest-probability reaction areas
Nearest zone radar and imbalance density scoring provide quantitative measures of the imbalance environment around current price
The combination of FVG lifecycle management, S/D zone tracking with breaker conversion, confluence detection, density scoring, and a comprehensive dashboard creates a unified imbalance analysis system not available in any single existing indicator
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.
Price imbalances are historical observations about where gaps and zones formed. They do not predict future price movement. While price often revisits imbalances, there is no guarantee that any specific FVG will be filled or that any S/D zone will produce a reaction.
Always use proper risk management. Never risk more than you can afford to lose. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Meridian Zones [JOAT]Meridian Zones
Introduction
Meridian Zones is an advanced open-source session analysis engine built for traders who structure their trading around the Asia, London, and New York sessions. Unlike typical session indicators that clutter the chart with dozens of lines and levels, Meridian Zones takes a deliberately clean approach: session boxes, killzone backgrounds, session-colored candles, and precise liquidity sweep labels live on the chart, while all analytical depth lives in a fully-populated 15-row dashboard. The result is a chart that remains readable at any zoom level while giving you institutional-grade session intelligence at a glance.
The indicator tracks session ranges, calculates session VWAP, monitors volume distribution across sessions, detects liquidity sweeps with wick filtering and cooldown logic, flags volume spikes, grades institutional candles, and reports previous day high/low positioning — all without drawing a single horizontal line on the chart.
Why This Indicator Exists
Session-based trading is a cornerstone of institutional methodology. The Asia session establishes a range, London often breaks that range with directional intent, and New York either continues or reverses the London move. Understanding which session is dominant, where sweeps occur, and how volume distributes across sessions gives traders a significant edge.
Most session indicators fall into two traps: either they are too simple (just drawing boxes) or too cluttered (drawing session highs, lows, midpoints, opens, VWAP lines, and previous session levels all on the chart simultaneously). Meridian Zones avoids both by:
Drawing only the essential visual elements on the chart — session range boxes, killzone background shading, and labeled signals
Moving all analytical data into a comprehensive dashboard where it can be read without visual noise
Adding features that most session indicators lack entirely: session VWAP calculation, volume-weighted session dominance, institutional candle detection within sessions, and precise liquidity sweep identification with ATR-based wick filtering
Core Session Engine
Sessions are defined by UTC hour ranges (all configurable):
Asia: 00:00 - 08:00 UTC (default)
London: 08:00 - 16:00 UTC (default)
New York: 13:00 - 21:00 UTC (default)
The indicator detects session opens and closes, tracks high/low/volume/VWAP within each session, and draws range boxes when sessions close. A timeframe filter ensures the indicator only displays on charts where session analysis is meaningful (up to 4H by default).
Session overlap (London + NY) is automatically detected and reported in the dashboard, as overlap periods often produce the highest-volume, most directional moves of the day.
Session Tracking and Analytics
For each session, the indicator calculates and tracks:
Session Range: High and low of the session, displayed as a colored box
Session VWAP: Volume-weighted average price calculated from session open, updated every bar. This is the true institutional fair value for the session — not a simple midpoint
Session Momentum: The ratio of bullish candles to total candles within the session, giving a quick read on directional bias
Session Volume: Total volume accumulated during the session, used for dominance and volume leader calculations
Session Open/Close Prices: Used to determine session bias (bullish if close > open, bearish if close < open)
Liquidity Sweep Detection
One of the most valuable features is the precise liquidity sweep detector. A sweep occurs when price wicks beyond a session high or low and closes back inside — this is institutional stop hunting.
The sweep detector uses two filters to avoid false signals:
ATR Wick Filter: The wick beyond the session level must exceed a configurable ATR multiple (default 0.4x ATR). This eliminates tiny wicks that barely touch the level.
Cooldown Timer: After a sweep is detected, no new sweep can fire for a configurable number of bars (default 8). This prevents multiple labels from stacking on the same sweep event.
Sweep labels are color-coded: bullish sweeps (wicking below and closing above) in teal, bearish sweeps (wicking above and closing below) in rose.
Volume Spike Detection
When volume exceeds the session's average volume by a configurable multiplier (default 2.0x), a volume spike flag appears. Volume spikes during sessions often coincide with institutional order execution and can confirm the validity of a sweep or directional move.
Institutional Candle Labels
Candles with a body-to-range ratio exceeding the threshold (default 75%) are flagged as institutional candles. These are large-bodied, low-wick candles that indicate strong directional conviction — the kind of candles that institutions create when executing large orders.
Session-Colored Candles
When enabled, candles are tinted by the active session: gold for Asia, blue for London, rose for New York. This provides an instant visual reference for which session produced each candle, making it easy to see session transitions and overlap periods on the chart.
15-Row Dashboard
The dashboard is the analytical heart of the indicator. Every cell is populated — no empty rows. It displays:
Row 1: Active Session — Which session is currently active, or "OFF" between sessions
Row 2: Overlap Status — Whether London and NY are overlapping
Row 3-5: Session Ranges — Asia, London, and NY ranges in price with pip/point size
Row 6-8: Session Bias — Bullish/Bearish for each session based on open vs close
Row 9: Dominance — Which session has the largest range (the "dominant" session)
Row 10: Volume Leader — Which session has the highest total volume
Row 11: VWAP Position — Whether current price is above or below the active session's VWAP
Row 12: Range/ATR — Current session range as a multiple of ATR (shows how extended the session is)
Row 13: PDH/PDL — Previous Day High and Low with current price position relative to them
Row 14: Candle Quality — Current candle's body ratio and institutional grade
Row 15: Sweep Radar — Most recent sweep direction and how many bars ago it occurred
Input Parameters
Session Definitions (UTC):
Asia Start/End Hour (default 0/8)
London Start/End Hour (default 8/16)
NY Start/End Hour (default 13/21)
Features:
Show Session Boxes, Killzone Background, Session-Colored Candles, Session Open Markers
Show Liquidity Sweeps, Volume Spike Markers, Institutional Candle Labels, Dashboard
Sessions to Keep (default 3) — how many past session boxes remain on chart
Sweep Min Wick ATR multiplier (default 0.4), Sweep Cooldown bars (default 8)
Volume Spike Multiplier (default 2.0), Institutional Candle Body % (default 75%)
Timeframe Filter:
Show Up To (default 4H) — prevents the indicator from displaying on higher timeframes where session analysis is not meaningful
How to Use This Indicator
Step 1: Identify the Dominant Session
Check the dashboard for which session has the largest range and highest volume. The dominant session sets the directional tone for the day.
Step 2: Watch for Asia Range Breaks
London often breaks the Asia range. When London's first move sweeps the Asia high or low, the sweep label confirms the liquidity grab. The direction of the break often sets the trend for the day.
Step 3: Monitor Overlap Period
The London-NY overlap (typically 13:00-16:00 UTC) produces the highest volume and most decisive moves. Volume spikes during overlap are particularly significant.
Step 4: Use VWAP Position for Bias
If price is above the session VWAP, institutional flow is net bullish for that session. Below VWAP, net bearish. The dashboard shows this in real-time.
Step 5: Confirm with Institutional Candles
When a sweep occurs and is followed by an institutional candle (large body, high volume), the move has strong institutional backing.
Step 6: Reference PDH/PDL
Previous Day High and Low are key institutional levels. The dashboard shows whether price is above PDH (bullish), below PDL (bearish), or between them (range-bound).
Limitations
Session analysis is most relevant on intraday timeframes (1m to 4H). The timeframe filter prevents display on higher timeframes, but users should understand that session dynamics are inherently intraday concepts.
UTC-based session times may need adjustment for instruments that trade in different time zones or have non-standard trading hours.
Volume data quality varies by instrument. Forex volume on PulseWire is tick volume, which approximates but does not equal true institutional volume.
Session VWAP resets at each session open. It is not a continuous daily VWAP.
Sweep detection relies on wick analysis, which can produce false signals in extremely volatile or illiquid conditions.
The indicator shows session dynamics, not price predictions. A bullish session bias does not guarantee price will continue higher.
Originality Statement
This indicator is original in its clean-chart, dashboard-heavy approach to session analysis. While session boxes and killzone backgrounds exist in other indicators, this indicator is justified because:
It deliberately separates visual elements (chart) from analytical data (dashboard), solving the clutter problem that plagues most session indicators
Session VWAP calculation per session provides institutional fair value that simple midpoint calculations cannot match
The liquidity sweep detector uses dual filtering (ATR wick threshold + cooldown timer) for precision that basic "price crossed level" detection lacks
Volume-weighted session dominance and volume leader tracking provide insights into which session is driving the market — information not available in standard session indicators
Institutional candle grading within sessions identifies the specific candles where large orders were executed
The 15-row dashboard presents all session analytics simultaneously with zero empty cells, creating a true session command center
The combination of session boxes, sweep detection, volume spikes, institutional candle grading, and comprehensive analytics in a single clean-chart indicator is not available in existing public scripts
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.
Session analysis reveals historical patterns in how different trading sessions behave. Past session patterns do not guarantee future session behavior. Market conditions, news events, and institutional positioning can cause sessions to behave atypically at any time.
Always use proper risk management. Never risk more than you can afford to lose. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Displacement Lens [JOAT]Displacement Lens
Introduction
The Displacement Lens is an advanced open-source momentum analysis indicator that measures real-time displacement intensity by fusing four normalized momentum oscillators with volume-weighted candle body analysis. It produces a composite displacement score displayed as a gradient histogram with adaptive threshold bands, designed to separate institutional displacement candles from retail noise. This is not a simple oscillator mashup — it is a unified displacement measurement engine with institutional-grade features built on top of the core signal.
The indicator operates in its own pane (non-overlay) and provides traders with a clear, visual representation of when price is being displaced by institutional force versus when it is drifting on low-conviction retail flow.
Why This Indicator Exists
Standard momentum oscillators like RSI, CCI, or Bollinger %B each capture only one dimension of market momentum. Traders often flip between multiple oscillators trying to get a complete picture. The Displacement Lens solves this by:
Normalizing four independent oscillators (BB %B, CCI, ROC, RSI) to a common scale so they can be meaningfully combined
Weighting the composite by volume intensity and candle body ratio — because a large-bodied candle on high volume is institutional displacement, while a small-bodied candle on low volume is noise
Adding adaptive threshold bands that adjust to the signal's own volatility, rather than using fixed overbought/oversold levels that fail in different market conditions
Layering institutional features on top: decay detection, accumulation phases, divergence scanning, exhaustion markers, and a per-bar institutional candle grade
The result is a single composite signal that tells you not just "is momentum bullish or bearish" but "how strong is the institutional displacement right now, and is it accelerating, decaying, or exhausting?"
Core Signal Construction
The displacement signal is built in three stages:
Stage 1: Oscillator Normalization
Each of the four oscillators is normalized to a range using methods appropriate to each:
Bollinger %B: Measures where price sits within the Bollinger Bands. The raw %B (0 to 1) is remapped to with a soft clamp. When price is above the upper band, the score approaches +1. Below the lower band, it approaches -1.
CCI: The Commodity Channel Index is divided by 200 and clamped. CCI values beyond +/-200 saturate at +/-1, while values near zero produce scores near zero.
ROC: Rate of Change is normalized using adaptive scaling — it divides by twice its own standard deviation over 50 bars. This means the normalization adapts to the instrument's typical momentum range.
RSI: Remapped from the standard 0-100 range to by subtracting 50 and dividing by 50. RSI 70 becomes +0.4, RSI 30 becomes -0.4.
Each oscillator can be individually toggled on or off, and the composite averages only the active ones.
Stage 2: Volume-Weighted Displacement
The oscillator composite is blended with a volume displacement component:
float vol_displacement = disp_direction * body_ratio * vol_intensity
float raw_signal = osc_composite * (1.0 - vol_weight) + vol_displacement * vol_weight
Where:
disp_direction is +1 for bullish candles, -1 for bearish
body_ratio is the candle body size divided by the full range (high-low) — institutional candles have ratios above 0.7
vol_intensity is current volume relative to the 20-bar average, clamped to
vol_weight (default 0.3) controls how much volume influences the final score
This means a strong oscillator reading on a small-bodied, low-volume candle gets dampened, while a moderate oscillator reading on a large-bodied, high-volume candle gets amplified.
Stage 3: Smoothing and Thresholds
The raw signal is smoothed with an EMA (default period 5), and adaptive threshold bands are calculated as the signal's own standard deviation multiplied by a configurable factor (default 1.5x over 100 bars). This creates bands that widen in volatile markets and tighten in calm markets — far more reliable than fixed thresholds.
Institutional Features
1. Displacement Impulse Signals
When the signal crosses above the upper threshold for the first time (with volume and body confirmation), a bullish impulse label appears. Similarly for bearish. These mark the exact moment institutional displacement begins — not after it has already played out.
2. Momentum Divergence Engine
The indicator detects four types of divergence between price pivots and signal pivots:
Regular Bearish: Price makes a higher high, but the displacement signal makes a lower high — momentum is weakening despite price advance
Regular Bullish: Price makes a lower low, but the signal makes a higher low — selling pressure is fading
Hidden Bearish: Price makes a lower high, but the signal makes a higher high — continuation of downtrend likely
Hidden Bullish: Price makes a higher low, but the signal makes a lower low — continuation of uptrend likely
Divergences are detected using configurable pivot lengths and drawn as labeled markers directly on the histogram.
3. Displacement Decay Zones
When the signal was above the upper threshold but starts declining (still positive, but fading), the indicator marks a "decay zone" — a dotted box on the histogram showing where institutional momentum is waning. This is a unique concept: it identifies the transition from impulse to drift before the signal crosses zero. Bear decay zones work identically on the downside.
4. Accumulation Phase Detector
When both the signal and signal line are near zero (below half the standard deviation) for a minimum number of bars, the indicator draws a dashed "accumulation" box. These low-displacement consolidation phases often precede the next major impulse move. The concept is borrowed from Wyckoff methodology but applied to displacement scoring rather than price.
5. Institutional Candle Grading
Every bar receives a grade from D to A+ based on three factors:
Body ratio (how much of the candle is body vs wick) — 33.3% weight
Volume intensity (current volume vs 20-bar average) — 33.3% weight
Displacement alignment (how far the signal is from the threshold) — 33.4% weight
A+ candles (score >= 80) with body ratio > 0.7 and volume > 1.5x average are flagged as true institutional candles. The grade is shown in the dashboard.
6. Velocity Channel
The rate of change of the displacement signal itself is plotted as a velocity line with standard deviation bands. When velocity is expanding (accelerating), the displacement move has conviction. When velocity contracts, the move is losing steam. Optional glow effects make the velocity channel visually distinct.
7. Exhaustion Detection
Bullish exhaustion fires when the signal was above the threshold for 3 consecutive bars and then declines for 3 consecutive bars. Bearish exhaustion is the mirror. These are rare, high-conviction reversal signals that mark the exact point where institutional displacement has peaked and is reversing.
8. HTF Displacement Bias
The indicator calculates the same displacement composite on a higher timeframe (default 4H) using request.security(). When the current timeframe signal aligns with the HTF bias, conviction is higher. The dashboard shows whether HTF is BULLISH, BEARISH, or NEUTRAL and whether it is aligned with the current signal.
9. Displacement Streak Counter
Tracks how many consecutive bars the signal has been above the upper threshold (bull streak) or below the lower threshold (bear streak). Longer streaks indicate sustained institutional pressure.
Visual Elements
Gradient Histogram: The main displacement signal plotted as columns with gradient coloring — bullish bars transition from muted teal to bright teal as strength increases, bearish bars from muted rose to hot rose. Volume spike bars are highlighted in amber.
Signal Line: A further-smoothed version of the signal (3x the smoothing period) plotted as a bright lavender line. Crossovers between the signal and signal line generate diamond markers.
Adaptive Threshold Bands: Upper and lower threshold lines that expand and contract with signal volatility.
Decay Zones: Dotted boxes marking fading institutional momentum.
Accumulation Zones: Dashed boxes marking low-displacement consolidation.
Velocity Channel: Rate-of-change line with glow bands showing displacement acceleration.
15-Row Dashboard: Comprehensive command center showing Signal value, Phase classification, Candle Grade, HTF Bias, Streak, Velocity, Divergence status, and more.
Input Parameters
Oscillator Components:
BB Length (default 20), BB Multiplier (default 2.0)
CCI Length (default 23), ROC Length (default 50), RSI Length (default 14)
Individual toggles for each oscillator
Displacement Engine:
Signal Smoothing (default 5) — EMA period for the final signal
Volume Weight (default 0.3) — how much volume influences the score
Threshold Lookback (default 100) — period for adaptive threshold calculation
Threshold Multiplier (default 1.5) — sensitivity of threshold bands
Institutional Features:
Toggles for Impulse Signals, Divergences, Decay Zones, Accumulation Phases, Signal Crossovers, Velocity Channel, Exhaustion Markers, HTF Bias
HTF Timeframe (default 240 / 4H)
Accumulation Min Bars (default 8), Decay Min Bars (default 5)
Max Boxes (default 30), Divergence Pivot Length (default 5)
How to Use This Indicator
Step 1: Read the Phase
The dashboard shows the current displacement phase: IMPULSE BULL, IMPULSE BEAR, DRIFT BULL, DRIFT BEAR, DECAY, ACCUMULATION, or FLAT. This tells you the market's current displacement state at a glance.
Step 2: Watch for Impulse Signals
When the signal crosses the threshold with volume confirmation, an impulse label appears. These are the highest-conviction displacement events — institutional money is moving price.
Step 3: Monitor Decay and Exhaustion
After an impulse, watch for decay zones forming. If the signal was strong and starts declining, the move is losing institutional backing. Exhaustion markers confirm the reversal point.
Step 4: Confirm with HTF Bias
Check whether the HTF displacement aligns with the current timeframe. Aligned signals have higher follow-through probability.
Step 5: Use Divergences for Reversals
Regular divergences warn of potential reversals. Hidden divergences confirm trend continuation. Both are detected automatically.
Step 6: Identify Accumulation for Breakout Setups
When the indicator marks an accumulation phase (low displacement for extended bars), prepare for the next impulse. The breakout direction is often confirmed by the first impulse signal after accumulation ends.
Limitations
The indicator measures displacement intensity, not price direction prediction. Strong displacement can occur in both breakouts and fakeouts.
Volume data quality varies by instrument and exchange. Forex volume on PulseWire represents tick volume, not true volume.
HTF bias uses request.security() which may produce different results on different chart types.
Divergence detection requires sufficient pivot history — it will not fire on the first few hundred bars of a chart.
Exhaustion signals are intentionally rare (require 3 bars above threshold + 3 bars declining). They may not fire in fast-moving markets.
The indicator works best on liquid instruments with consistent volume patterns.
Past displacement patterns do not guarantee future price movement.
Originality Statement
This indicator is original in its unified displacement measurement approach. While individual oscillators (BB %B, CCI, ROC, RSI) are well-known, this indicator is justified because:
It normalizes four oscillators to a common scale using methods appropriate to each (adaptive scaling for ROC, division-based for CCI, remapping for RSI and BB %B) — not simply averaging raw values
The volume-weighted displacement component integrates candle body analysis with volume intensity, creating a measure that distinguishes institutional candles from retail noise
Adaptive threshold bands based on the signal's own standard deviation replace unreliable fixed thresholds
The Displacement Decay Zone concept — identifying the transition from impulse to drift before the signal crosses zero — is not available in standard oscillators
The Accumulation Phase Detector applies Wyckoff-inspired consolidation detection to a composite momentum score rather than price
The Institutional Candle Grading system scores every bar on three dimensions simultaneously (body, volume, displacement alignment)
The Velocity Channel measures the rate of change of displacement itself — a second derivative that reveals acceleration and deceleration of institutional activity
The combination of all these features with a comprehensive dashboard creates a unified displacement analysis system not available in any single existing indicator
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.
The displacement signal measures momentum intensity based on mathematical calculations of current and historical market data. It does not predict future price movement. High displacement does not guarantee profitable trades. Past displacement patterns do not guarantee future patterns.
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.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions.
-Made with passion by officialjackofalltrades
Indicator
