STRX - Multi MA [Touch Detect]STRX - Multi MA is an overlay indicator that plots up to five independently configurable moving averages on the chart. Each moving average can use the chart timeframe or a selected custom timeframe through the Time Frame input, making it possible to combine local and higher-timeframe dynamic levels in a single view.
How it works
The script calculates up to five moving averages, each with its own visibility, length, type, color, touch marker setting, and timeframe selection. When the candle range intersects a moving average value, the script prints a small marker directly on that level to highlight the touch event without adding excessive visual noise to the chart.
Touch detection concept
A touch is detected when the candle’s high-low range crosses the moving average value. This marker is intended as a visual reference only: it helps identify moments when price interacts with a dynamic level, which can be useful for monitoring reactions, retests, confluence areas, or contextual confirmation.
Multi-timeframe structure
Each moving average can remain on the chart timeframe by leaving the Time Frame input empty, or it can be calculated from a custom timeframe. This allows traders to display, for example, higher-timeframe moving averages directly on lower-timeframe charts while keeping all selected averages inside the same overlay.
Inputs
Show MA: enables or disables each moving average.
Show Touch Marks: displays or hides touch markers for the selected moving average.
Length: defines the moving average period.
Type: selects the moving average method, including SMA, EMA, WMA, RMA, and VWMA.
Time Frame: uses the chart timeframe when empty, or a custom timeframe when specified.
Color: sets the display color of the moving average and its touch marker.
Use cases
This indicator can be used to monitor multiple moving averages at once, compare reactions across different dynamic levels, and keep higher-timeframe moving averages visible on lower-timeframe charts. It is designed to support chart reading and market context analysis rather than to function as a standalone entry or exit system.
Notes
Higher-timeframe values requested through the Time Frame input may update according to the source timeframe structure, so their behavior can differ from averages calculated directly on the chart timeframe. As with any analytical tool, this script should be used together with broader market structure analysis and risk management. Indicator

AssetCorrelationUtilsAssetCorrelationUtils
Auto-detection library for correlated asset pairings across futures, CFD, and crypto markets. Given any chart, returns the correct secondary and tertiary (and optionally quaternary) tickers for multi-asset divergence analysis, along with inversion flags and asset-category metadata.
Designed to eliminate the boilerplate of hardcoded ticker lists and manual "if EURUSD then GBPUSD" branching in every indicator that needs correlated data.
What it does
Consumer scripts call one function — resolveCurrentChart() — and receive a fully resolved AssetConfig object describing the current chart's correlated pair or triad. The library handles:
Symbol root extraction from full ticker IDs (with expiry suffixes, exchange prefixes, micro variants)
Asset category routing (futures / CFD / crypto branches)
Family-specific triad or dyad selection
Inversion detection (e.g. 6C inverse of USDCAD, DXY inverse of EUR/GBP)
Futures session and back-adjustment modifiers
Optional GXT mode for metals (currency-cross triads on Gold/Silver)
Optional Quad mode for metals (four-leg configurations)
Micro contracts always resolve to their higher-volume full-size correlated partners — MNQ correlates against ES/YM, not MES/MYM — matching the "trade the micros, read the majors" convention.
Supported asset classes
Futures
Indices: NQ, ES, YM, RTY + micros (MNQ, MES, MYM, M2K)
Metals: GC, SI, HG + micros (MGC, SIL, MHG)
Forex: 6E, 6B, 6A, 6N, 6C + micros (M6E, M6B, M6A, M6C)
Energy: CL, RB, HO + micros (MCL, MRB, MHO)
Treasury: ZB, ZF, ZN
Crypto: BTC, ETH + micros (MBT, MET)
CFD / Spot
Forex: EURUSD, GBPUSD, DXY, USDJPY, USDCHF, USDCAD
Metals: XAUUSD, XAGUSD, COPPER + cross-pairs (XAUEUR, XAUGBP, XAGEUR, XAGGBP)
Indices: NAS100, SP500, DJ30
EU Stocks: GER40, EU50 (dyad only)
Crypto (spot / perp)
Major: BTC, ETH, SOL, XRP
Alt: ZEC, DOGE, ADA, BNB, TAO
All routed via BINANCE perpetual (.P) pairs for consistent OHLC quality
Core functions
resolveCurrentChart(gxtMode = false, quadMode = false)
The one-liner entry point for most consumers. Wraps resolveAssets() with sensible defaults (uses syminfo.ticker, syminfo.tickerid, syminfo.type, syminfo.session, back-adjustment on).
resolveAssets(ticker, tickerId, assetType, session, useBackadjust, gxtMode, quadMode)
The full-control entry point. Same detection logic, but with explicit control over back-adjustment and session modification — useful for indicators with a strategy toggle (e.g. RTH vs ETH sessions).
Category detectors
detectIndicesFutures(ticker)
detectMetalsFutures(ticker) / detectMetalsFuturesGxt(ticker) / detectMetalsFuturesQuad(ticker)
detectForexFutures(ticker) / detectCADFutures(ticker)
detectEnergyFutures(ticker)
detectTreasuryFutures(ticker)
detectCryptoFutures(ticker)
detectForexCFD(ticker, tickerId)
detectCrypto(ticker, tickerId)
detectMetalsCFD(ticker, tickerId) / detectMetalsCFDGxt(ticker, tickerId) / detectMetalsCFDQuad(ticker, tickerId)
detectIndicesCFD(ticker, tickerId)
detectEUStocks(ticker, tickerId)
Each returns an AssetPairing — usable directly if you want to bypass the automatic category routing.
Resolution helpers
resolveTriad(chartTickerId, pairing) — returns primary + secondary + tertiary with inversion flags
resolveDyad(chartTickerId, pairing) — returns primary + secondary for two-asset configs
resolveQuad(chartTickerId, pairing) — returns four-asset config with inversion flags
Utility functions
applySessionModifierWithBackadjust(ticker, session) / applySessionModifierNoBackadjust(ticker, session) — apply ticker.modify with back-adjustment on or off
isTriadMode(pairing) — check whether a pairing has a valid tertiary
getAssetTicker(tickerId) — extract the clean ticker string from a full ticker ID
Fallback
getDefaultFallback(tickerId) — returns a pairing with the chart ticker as primary and empty secondaries. Used automatically when no category matches.
Return types
AssetConfig
detected (bool) — true if the chart asset was recognized
isTriadMode (bool) — true if 3 assets resolved, false for dyad
isQuadMode (bool) — true if 4 assets resolved
primary (string) — resolved primary ticker ID
secondary (string) — resolved secondary ticker ID
tertiary (string) — resolved tertiary ticker ID (empty for dyad)
quaternary (string) — resolved quaternary ticker ID (empty unless quad mode)
invertSecondary (bool)
invertTertiary (bool)
invertQuaternary (bool)
assetCategory (string) — category tag (e.g. "index_futures", "metal_cfd_gxt")
AssetPairing
Internal pairing structure used by detector functions. Consumers rarely construct this directly, but resolveTriad / resolveDyad / resolveQuad accept it if you're bypassing the auto-routing.
Quick start
import I_quacker_I/AssetCorrelationUtils/7 as AC
AC.AssetConfig config = AC.resolveCurrentChart()
string secondary = config.secondary
string tertiary = config.tertiary
bool inv2 = config.invertSecondary
bool inv3 = config.invertTertiary
bool detected = config.detected
For metals with currency-cross triads:
AC.AssetConfig config = AC.resolveCurrentChart(true)
// On Gold: secondary = "FOREXCOM:XAUEUR", tertiary = "FOREXCOM:XAUGBP"
// On Copper or non-metals: identical to resolveCurrentChart(false)
Full integration patterns (Off / Auto / Manual tri-state, explicit back-adjust control, and manual pairing) are documented inline in the library source.
Design notes
Robust ticker matching. All detectors use str.contains() on the root symbol, so any ticker format is recognized — bare (NQ), continuous (NQ1!), or dated with expiry (NQZ2025). Exchange prefixes are ignored during detection.
Consistent inversion semantics. DXY as the third leg of USD-base forex triads is marked inverted (rises when the pair falls). 6C as USDCAD's futures counterpart is fully inverted. Micros carry their parent's inversion flags unchanged.
Category tags. Every resolved AssetConfig carries an assetCategory string ("index_futures", "metal_cfd_gxt", "crypto", "fallback", etc.). Useful for consumer scripts that want to conditionally enable features per category (e.g. "only compute GXT confluence on metals").
Fallback safety. When no category matches, the library returns the chart ticker as primary with empty secondary / tertiary, detected = false, and assetCategory = "fallback". Consumer scripts should check detected before assuming correlated data is available.
Credits
Original library concept — @fstarcapital
Modifications and extensions — @I_quacker_I
Crypto remapped to BINANCE .P perpetuals
Micro contracts always correlate against higher-volume mini/full contracts
AUD/NZD forex futures family (6A, M6A, 6N)
GXT mode for metals (currency-cross triads)
Quad mode for four-leg metal configurations
Crypto tertiary swapped from TOTAL3 (market-cap index, no clean OHLC) to XRP (tradeable asset with proper sweep behavior)
License: Mozilla Public License 2.0 Library

Adaptive Divergence Core [JOAT]Adaptive Divergence Core is an open-source Pine Script v6 oscillator that combines HMA-smoothed RSI behavior, adaptive percentile bands, confirmed divergence lines, and regime fills. It is designed to make oscillator extremes relative to the current chart sample instead of relying only on fixed overbought and oversold levels.
The script is useful when standard oscillator thresholds are too rigid. A market can stay strong or weak for long periods. Adaptive Divergence Core recalculates upper and lower fields from recent oscillator distribution, then plots confirmed divergence only after both price and oscillator pivots are confirmed.
Core Concepts
1. HMA-RSI Core
The oscillator blends RSI on raw price, RSI on HMA-smoothed price, and an HMA-smoothed RSI value. It is centered around zero for easier bullish and bearish reading.
hmaSource = ta.hma(src, hmaLen)
rawRsi = ta.rsi(src, rsiLen)
rsiOnHma = ta.rsi(hmaSource, rsiLen)
smoothedRsi = ta.hma(rawRsi, smoothLen)
core = (rsiOnHma * 0.58 + smoothedRsi * 0.42) - 50.0
2. Adaptive Percentile Bands
The upper and lower bands are calculated from rolling percentiles of the oscillator. This lets the bands adapt to the recent distribution of momentum.
upperRaw = ta.percentile_nearest_rank(core, percentileLength, upperPercentile)
lowerRaw = ta.percentile_nearest_rank(core, percentileLength, lowerPercentile)
3. Extreme Fields
Additional 95th and 5th percentile fields help show deeper oscillator stretch zones beyond the primary adaptive bands.
4. Confirmed Divergence Detection
Bearish divergence requires price to form a higher confirmed pivot high while the oscillator forms a lower confirmed pivot high. Bullish divergence requires price to form a lower confirmed pivot low while the oscillator forms a higher confirmed pivot low.
5. Regime Fill
The script fills the oscillator against zero and against its guide line, making positive and negative regimes easy to read without large markers.
Features
HMA-RSI oscillator: Blends raw RSI, RSI on HMA, and smoothed RSI
Adaptive percentile bands: Upper and lower thresholds adjust to recent oscillator behavior
Extreme bands: Additional outer fields for deeper stretch readings
Confirmed divergence lines: Divergences plot only after price and oscillator pivots confirm
Divergence labels: Small S Div and B Div labels are placed near confirmed divergence lines
Divergence line cap: Old lines are deleted to respect object limits
Optional candle tint: Can color chart candles from the oscillator pane setting
Dashboard: Shows core value, bands, divergence counts, and current field
Alerts: Divergence, band entry, and band release conditions
Input Parameters
Core:
Source: Price source
RSI Length: Base RSI period
HMA Price Length: HMA source smoothing
HMA RSI Smooth: Smoothing for the raw RSI component
Adaptive Bands:
Percentile Length: Lookback used for adaptive thresholds
Upper Percentile: Upper adaptive threshold percentile
Lower Percentile: Lower adaptive threshold percentile
Divergence:
Divergence Left Bars / Right Bars: Pivot confirmation settings
Maximum Divergence Lines: Object cap for plotted divergence lines
Divergence Labels: Shows or hides compact divergence labels
Visuals:
Tint Candles: Optional candle tint from the oscillator state
Show Dashboard: Shows or hides the compact top-right pane dashboard
Palette: Selects the local JOAT color preset
How to Use This Indicator
Step 1: Read the Core Relative to Zero
Values above zero show positive oscillator regime. Values below zero show negative oscillator regime.
Step 2: Use Adaptive Bands
When core enters the upper or lower adaptive band, momentum is stretched relative to its recent sample.
Step 3: Evaluate Divergence After Confirmation
Divergence lines are delayed by pivot confirmation. This is intentional and avoids projecting unconfirmed pivots into the past.
Indicator Limitations
Divergences confirm late because pivots need right-side bars
Adaptive bands depend on the selected lookback and can shift over time
Divergence is context, not a complete trade plan
During strong trends, oscillator stretch can persist for many bars
Originality Statement
Adaptive Divergence Core is original in its HMA-RSI blend, rolling percentile threshold system, confirmed pivot divergence logic, and compact dashboard. It uses public Pine v6 functions to build a distinct oscillator workflow.
Disclaimer
This script is provided for educational and informational use only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Oscillator divergences can fail or remain early for extended periods. Always use independent analysis and proper risk management.
-Made with passion by jackofalltrades
Indicator

Adaptive Momentum Strength Score (AMSS)There is a specific kind of frustration that every serious trader knows.
The setup looks right. The candle closes with conviction. The oscillator confirms. You enter and the move immediately stalls, reverses, or dissolves into noise. Later you realize the volume was weak, volatility never truly expanded, or directional pressure had already started fading before the entry.
That frustration is not a discipline problem. It is an information problem.
Most momentum indicators measure one piece of the puzzle. RSI measures price velocity. Volume indicators measure participation. Bollinger Bands measure volatility state. Each tells part of the story. The Adaptive Momentum Strength Score was built on the conviction that momentum quality can only be evaluated meaningfully when several complementary market forces are read together, not after the fact, but simultaneously, on every bar.
The Core Framework
The purpose of the composite score is straightforward: to answer not just whether price is moving, but whether the move is supported by the conditions that tend to give momentum its staying power.
The score is normalized between 0 and 100 and built from three independent components. The first measures candle impulse relative to ATR not raw candle size, but how decisive the current bar is in the context of what normal looks like for this asset right now. The second measures volume participation by comparing current volume against its moving average, distinguishing genuine momentum expansion from the kind of low-participation drift that precedes failed breakouts far more often than it precedes continuation. The third measures volatility expansion through Bollinger Band width relative to its own average, detecting the transition from compression into expansion as a market begins releasing stored energy.
Each component is independently normalized before combining. By default, volume participation carries the greatest weight of the three — a deliberate choice reflecting the observation that genuine participation tends to be the most reliable differentiator between momentum that follows through and momentum that fades. Candle impulse and volatility expansion carry equal secondary weight, acknowledging that decisive price movement and volatility expansion both contribute meaningfully to momentum quality without either being treated as a primary condition on its own. All weights remain fully adjustable for traders who prefer a different emphasis across different assets or timeframes.
What separates this framework from most traditional oscillators is that momentum strength, directional pressure, market regime, momentum acceleration, and signal confirmation are kept as independent layers that work together while remaining individually interpretable. The goal is not to compress everything into a single binary output but to provide a structured view of how momentum is developing and whether broader conditions are genuinely supportive.
Adaptive Thresholds
A composite score is only as useful as the threshold that determines when it becomes meaningful.
The indicator supports two threshold modes. Fixed mode works cleanly in stable trending environments where volatility expression is consistent. Adaptive mode the recommended default calculates the threshold dynamically using rolling score averages and standard deviation scaling, then clamps it within a defined range. As market character shifts, the threshold recalibrates automatically rather than forcing traders to manually adjust a static level every time volatility conditions change.
The practical consequence is worth understanding directly. In a static-threshold oscillator, a compression phase floods the chart with false crossovers while a genuine expansion phase can produce delayed or missed signals. The adaptive threshold adjusts to both conditions without intervention. The active level is always displayed as the orange reference line, there is never ambiguity about where the signal boundary sits.
The score is additionally classified into Weak, Moderate, and Strong states relative to the active threshold, allowing momentum quality to be evaluated quickly without relying on raw numerical values alone.
Directional Pressure
The score measures momentum magnitude. Direction is handled through a completely separate layer.
Directional bias is established through a two-part confirmation test on every bar. Price must sit on the correct side of a short-period directional EMA, and the average ATR-normalized candle direction over the recent lookback must clear a pressure threshold, meaning a single extended wick or isolated candle cannot flip the directional label on its own. The result is a three-state classification that updates in real time: Bullish, Bearish, or Neutral. This label colors the score line and feeds directly into the signal confirmation logic.
Regime Classification
Not all momentum signals carry equal weight. A score crossover during an expanding market is a categorically different event from the same crossover inside a compressed, coiling environment and treating them identically is one of the more common ways momentum-based approaches produce inconsistent results.
The indicator measures the range of the score over a lookback window and classifies conditions into three states. Compressed means the score has been operating within a narrow band, the market is coiling, energy may be building, and momentum signals in this state generally exhibit lower follow-through and greater variability, although strong expansions can emerge from prolonged compression. Balanced reflects normal trending or ranging conditions. Expanding means the score range has broken above the expansion threshold the market is releasing energy, and momentum signals carry stronger continuation characteristics during this state.
Regime classification can be applied as a filter to triangle signals or used purely as context within the dashboard.
Momentum Velocity
Knowing where the score is tells you the current momentum level. Knowing how fast it is changing tells you something more useful, where momentum is likely heading before price makes it obvious.
The velocity engine calculates the rate of change of the score relative to its own standard deviation, producing a normalized reading that classifies momentum as Accelerating, Decelerating, or Flat. When the score is rising rapidly against its recent volatility baseline, conditions are classified as Accelerating. When the score is fading even if it remains above the threshold the label shifts to Decelerating, and the score line renders at reduced opacity as a visual signal that underlying momentum may be exhausting before price visibly reacts.
For traders who have held into momentum reversals that showed no obvious price-level warning, this layer provides an early internal warning signal within the indicator's architecture that conditions are beginning to shift.
Two Signal Tiers
The indicator produces signals on two distinct levels, and the distinction between them is worth understanding precisely.
Threshold dots appear whenever the score crosses the active threshold while directional pressure is already aligned. They are intentionally sensitive as early directional momentum awareness signals indicating that conditions are beginning to strengthen, even though the broader filter stack may not yet be confirmed. Experienced traders use them to shift attention and begin evaluating whether a fuller setup is developing.
Triangle signals are the fully confirmed output. A triangle only appears when the score crosses the threshold, directional pressure agrees, and every enabled filter in the active gate stack also confirms simultaneously. This is not a smoothed version of the dot signal. It is a categorically different signal type representing the convergence of multiple independent conditions at the same moment.
The separation is deliberate. Dots keep traders informed of developing momentum. Triangles reserve the strongest visual output for the moments that genuinely earn it.
The Signal Gate Stack
Before any triangle reaches the chart it passes through up to four independent gates, stackable in any combination.
The current-timeframe EMA filter blocks signals running counter to local trend structure. The higher-timeframe EMA filter adds a structural second opinion from a broader timeframe, 4-hour by default with an option to use only confirmed closed bars to avoid incomplete higher-timeframe calculations. The regime filter restricts signals during compressed conditions or limits them to expanding phases only. The cooldown gate enforces a minimum bar gap between consecutive signals, suppressing the cluster of repeat triggers that commonly fire around a single momentum event and dilute signal quality.
The dashboard always displays exactly which gates are active. Traders never need to guess why a triangle did or did not appear, the filter logic is visible at all times.
Reading the Indicator: A Practical Workflow
1. Assess market regime first . Check the Info Table before anything else. Compressed conditions mean the score has been coiling in a tight range crossovers here often require greater selectivity, as follow-through tends to be less reliable until expansion begins, and participation should be approached more selectively. Expanding conditions deserve closer attention, as momentum signals generally carry stronger continuation characteristics during these phases.
2. Verify directional alignment. Confirm that the score line color and the Direction label in the dashboard match your intended trade direction. A technically valid score crossover against prevailing directional pressure is a lower-quality setup by design.
3. Watch for the threshold dot on the score pane . A small circle plots on the score line the moment momentum crosses the active threshold while directional pressure is already aligned. This is your early awareness signal. It means conditions are beginning to strengthen, but the broader confirmation stack may not yet be complete. Use it to shift attention to the price chart, not necessarily to trigger execution.
4. Wait for the triangle on the price chart . The triangle is the confirmed execution signal. It only appears when the score has crossed the threshold, directional pressure agrees, and every enabled gate in your active filter stack has confirmed simultaneously. Depending on your settings, this may include EMA alignment, regime validation, and cooldown logic. No triangle means at least one required condition has not been met, regardless of how the score looks in the pane below.
5. Check momentum velocity before entry. An Accelerating label at the point of the triangle adds meaningful weight to the setup. A Decelerating label on an otherwise valid triangle is a caution not necessarily a reason to avoid the trade, but a reminder that momentum quality may be less aggressive, follow-through may develop more gradually, or reversal risk may be beginning to increase.
6. Manage the trade with velocity as context, not as a standalone exit signal . If the score remains above or near the threshold but the line has dimmed signaling Decelerating momentum the move may be losing force even while price continues in the same direction. This does not automatically invalidate the trade or imply immediate exit. Instead, use velocity as an additional layer of context alongside price structure, trend conditions, and your existing risk-management framework.
What This Indicator Is Designed For
The Adaptive Momentum Strength Score is not a standalone trading system and does not attempt to be one. It is a momentum context engine — a structured framework for evaluating whether the conditions behind a price move reflect genuine strength and participation or whether they represent the kind of isolated, low-quality momentum that tends to produce less reliable continuation.
Every design decision in this script traces back to a single conviction: durable edge in trading does not come from reacting faster to a single signal. It comes from reading multiple independent market forces simultaneously and acting only when they converge. That is what this indicator was built to do and that is the only thing it claims to do well.
My Scripts/Indicators/Systems are for educational purposes only! Indicator

Wedge Reversal Detector [AGPro Series]Wedge Reversal Detector
🔷 Overview
Wedge Reversal Detector is a focused chart-pattern engine built for one specific structure: the rising wedge and falling wedge. Instead of scanning every possible reversal pattern, drawing broad support and resistance, or behaving like a generic breakout dashboard, this script studies the geometry of a wedge itself: confirmed pivot boundaries, slope convergence, pattern maturity, reversal break quality, projected reaction zone, and invalidation context.
The goal is to make wedge analysis cleaner and more objective on a live chart. A valid wedge is not treated as just two random trendlines. The script requires a confirmed pivot structure, a meaningful initial width, a narrowing final width, and the correct slope relationship for either a rising wedge or a falling wedge. Once a qualified structure is active, it draws the converging boundaries directly on the chart and waits for a reversal-side break.
The detector also includes two visual preparation layers. The developing-wedge preview layer can draw dashed boundaries before the structure is fully armed. The Wedge Radar layer keeps the latest compression window visible when no confirmed candidate is active. Radar projection is capped so higher-timeframe charts stay clean, and low-compression radar states can remain boundary-only until the structure becomes visually meaningful. Break labels, reaction zones, and invalidation guides remain reserved for stricter confirmed candidates. This keeps the chart visually informative without weakening the actual confirmation logic.
The visual layer includes compact boundary tags that label the upper and lower rails directly on the right side of the structure. These tags are designed as chart annotations, not signal spam: they identify whether the rail is acting as a rejection rail, compression rail, reclaim rail, break rail, or invalidation rail. A single optional compression tag can also summarize the current radar or wedge state.
🔶 Why This Is Different
Many wedge indicators stop at pattern drawing. Others become broad pattern scanners that mix wedges with channels, double tops, double bottoms, triangles, support and resistance zones, and unrelated reversal signals. Wedge Reversal Detector intentionally stays narrower.
Its edge is the sequence:
1. Detect a qualified rising or falling wedge from confirmed pivots.
2. Measure whether the boundaries are genuinely converging.
3. Grade wedge maturity before any break occurs.
4. Confirm the reversal-side break with an optional close-based rule and ATR buffer.
5. Score break quality using maturity, boundary expansion, candle structure, close location, and volume participation.
6. Project a concept-native reaction zone from the wedge width.
7. Display a clean invalidation guide so the structure remains readable after the break.
This makes the script a wedge lifecycle tool, not a general reversal scanner.
💎 Unique Edge
The most important difference is that the script treats a wedge as a living geometric compression structure. It does not simply connect the latest two highs and lows and call the pattern complete. A candidate must pass span, width, convergence, and slope requirements before it becomes active.
For rising wedges, the script looks for rising pivot highs and rising pivot lows where the lower boundary is climbing faster than the upper boundary. This creates upward compression, which is the core geometry behind a rising wedge. For falling wedges, it looks for falling pivot highs and falling pivot lows where the upper boundary is falling faster than the lower boundary. This creates downward compression, which is the core geometry behind a falling wedge.
That difference matters because many weak wedge tools confuse ordinary channels with wedge compression. This script separates those structures by requiring the final width to be materially smaller than the starting width.
🔹 Methodology
The engine begins with confirmed pivot highs and pivot lows. The user controls the pivot confirmation length, which allows the detector to be tuned for intraday, swing, or higher-timeframe charts.
From the latest confirmed swing pair, the script builds two boundary lines:
- Upper boundary from confirmed pivot highs
- Lower boundary from confirmed pivot lows
The detector then evaluates:
- Pattern span in bars
- Initial boundary width measured against ATR
- Final boundary width relative to the starting width
- Upper boundary slope
- Lower boundary slope
- Correct rising-wedge or falling-wedge geometry
Only when those requirements align does the pattern become an active wedge.
🔸 Break Quality Model
A wedge break is scored only after the reversal-side boundary is broken. The break quality score is built from multiple factors:
- Wedge maturity
- Distance beyond the broken boundary
- Candle body participation
- Close location inside the break candle
- Volume ratio versus recent average volume
The score is translated into a simple grade so the chart stays easy to read. This does not claim that a break must continue. It gives the user a structured read of how strong the confirmed break appears under the script's own rules.
🎯 Projected Reaction Zone
After a confirmed wedge reversal break, the script projects a reaction zone using the initial wedge width. This zone is not a generic support/resistance box. It is tied directly to the wedge geometry and appears only after the structure confirms. The goal is to show the next area where price may naturally react after escaping the compression.
The zone width and projection length are configurable, so users can keep the chart compact or allow more forward context depending on timeframe and style.
🧭 Invalidation Context
The script also draws an invalidation guide after a confirmed break. For a bullish falling-wedge break, invalidation is tracked below the opposite wedge boundary with an ATR buffer. For a bearish rising-wedge break, invalidation is tracked above the opposite wedge boundary with an ATR buffer.
This keeps the post-break structure organized without adding trade instructions or turning the script into a strategy.
📊 Panel
The compact AGPro panel summarizes the current wedge lifecycle:
- Wedge Type
- Maturity
- Break Quality
- Target Zone
Panel location, panel theme, and panel font size are adjustable from settings. The first panel row uses the AGPro standard: one merged blue header row containing only the panel title.
⚙️ Key Settings
- Pivot Confirmation Length controls how strict the swing structure is.
- Minimum Wedge Span filters out tiny patterns.
- Maximum Final Width Ratio controls how much convergence is required.
- Developing Wedge Preview Ratio controls how early dashed formation boundaries can appear.
- Wedge Radar controls the latest-window visual radar that prevents panel-only charts while waiting for confirmed wedge geometry.
- Radar Projection Bars limits how far radar boundaries extend into future bars.
- Radar Fill Threshold keeps low-compression radar structures from creating oversized filled areas.
- Boundary Tags add compact right-side rail annotations so the structure is easier to read without covering candles.
- Compression Tag shows one status label for radar compression or armed-wedge maturity.
- Boundary Break Buffer ATR adds confirmation distance beyond the wedge boundary.
- Volume Confirmation Ratio contributes to break quality scoring.
- Projection Length Bars controls how long the reaction zone extends forward.
- Label Font Size and Label Offset ATR help maintain a clean chart presentation.
🧩 How It Differs From Other AGPro Tools
This script is intentionally separate from AGPro channel, breakout, liquidity, and broad reversal tools.
It is not a channel map. Channel tools organize parallel or multi-family structure. Wedge Reversal Detector only studies converging wedge geometry.
It is not a double top or double bottom detector. Those patterns are based on repeated horizontal rejection and neckline behavior. This script is based on converging diagonal boundaries.
It is not a broad reversal scanner. It does not combine every reversal pattern into one dashboard. It stays focused on wedge compression, wedge maturity, reversal break, projected reaction zone, and invalidation.
It is not a generic breakout quality tool. Break quality is evaluated only after a valid rising or falling wedge exists.
🔔 Alerts
The script includes alerts for:
- Bullish falling wedge break
- Bearish rising wedge break
- High quality wedge break
- Wedge invalidation
These alerts are event notifications for the detected structure, not automated trading instructions.
✨ Best Use Case
Wedge Reversal Detector is best suited for traders who already watch chart patterns, market structure, compression, and failed trend continuation. It helps reduce manual drawing by highlighting qualified wedge structures, then keeping the chart organized through the confirmation, projection, and invalidation phases.
The result is a clean, premium, wedge-specific workflow designed for public chart reading: fewer random lines, fewer noisy labels, and a clearer view of whether the wedge structure is still forming, breaking, projecting, or invalidating.
Indicator

Parabolic Move Detector [AGPro Series]🚀 Parabolic Move Detector
A dedicated framework for identifying, measuring, and classifying parabolic price acceleration across any asset and any timeframe. Built on a single transparent metric — Parabolic Pace — the tool objectively detects the start bar of a parabolic move, tracks its age, scores its intensity on a 0-100 scale, classifies its lifecycle phase, and contextualizes each move against the asset's own historical parabolic events.
🔹 OVERVIEW
Parabolic moves are notoriously difficult to recognize in real time. By the time they look obvious, the move is already late-stage. Conventional momentum tools (RSI, MACD, standard ROC) measure speed, not the underlying structural character of a parabolic move. They fire constantly on ordinary trends and miss what makes a parabolic move structurally different: the rate at which price is covering ATR-sized distance per bar.
Parabolic Move Detector closes that gap with a single, transparent metric. It measures how many ATRs price has moved per bar over a configurable lookback window. That is the literal mathematical definition of a parabolic move: sustained directional travel at an unusual speed relative to recent volatility. The framework auto-calibrates per timeframe and per asset, so a 15m memecoin pump and a 1D large-cap rally are measured with the same structural definition.
🔹 UNIQUE EDGE
Most acceleration or momentum indicators in the public space fall into two buckets: oscillators with hardcoded thresholds that need retuning per symbol, or composite "trend strength" meters that blur acceleration into raw trend direction. This tool is different in four concrete ways:
1. Single-metric detection engine. The entire detection pipeline is driven by one transparent number: Parabolic Pace = cumulative price move divided by cumulative ATR over the lookback. No percentiles, no hidden regressions, no black-box composite. This makes the tool easy to audit, fast to calibrate, and consistent across assets.
2. ATR-normalized by design. Because pace is expressed in ATRs per bar, it is inherently timeframe-adaptive and asset-adaptive. No need to retune for BTC vs a thin-volume altcoin, or for 15m vs 1W.
3. Four-phase state machine. Each move is classified through a deterministic lifecycle — Accelerating → Peaking → Decelerating → Exhaustion — with explicit transition conditions rather than heuristic labels. This turns a vague concept ("it looks parabolic") into a reproducible state with measurable transitions.
4. Per-asset historical statistics. The tool logs every completed parabolic cycle on the current chart, filters out micro-events, and reports the average duration and average drawdown from peak. That gives structural context no oscillator provides: what has this specific asset actually done the last N times it went parabolic.
🔹 METHODOLOGY
Core detection pipeline:
• Pace is computed as (close − close ) divided by (ATR14 × N), where N is the lookback window. The result is the number of ATRs traveled per bar.
• Pace is lightly smoothed with a short SMA to reduce single-bar noise.
• Detection triggers when smoothed pace exceeds the Pace Threshold and the move is directionally up.
• A minimum-duration filter requires the pace condition to persist for N consecutive bars before confirming the start, eliminating single-bar spikes.
• A post-move cooldown prevents the same move being re-detected as multiple events.
State machine transitions:
• Idle → Accelerating : pace sustained above threshold for the minimum duration.
• Accelerating → Peaking : Acceleration Score drops >20% from its cycle peak while still elevated.
• Any phase → Decelerating : score drops below 40% of cycle peak.
• Decelerating → Exhaustion : pace rolls over below half-threshold, and the move has lived at least 6 bars.
• Exhaustion → Idle : cooldown bars elapsed and score collapsed.
Acceleration Score (0-100) is a direct function of pace: score rises linearly with pace and receives a small persistence bonus for sustained upward momentum, capped at 100.
Historical statistics:
Each time a full cycle closes on the chart, the tool checks whether the move traveled at least the minimum ATRs from start to peak. If it qualifies, duration (start bar to peak bar) and drawdown from move high to subsequent low are averaged into rolling per-asset statistics.
🔹 STATES AND VISUALS
• Parabolic Zone : gradient background across the active move. Color reflects phase (brand blue in Accelerating, indigo in Peaking, amber in Decelerating). Intensity scales with Acceleration Score.
• Parabolic Start label : marks the confirmed start bar of a new move.
• Peaking / Decelerating labels : mark phase transitions. Labels are automatically suppressed within a confluence window to prevent stacking.
• Exhaustion label : marks the bar where the move has structurally collapsed.
• Duration Projection : dotted forward line sized to the asset's historical average parabolic duration, shown only while a move is active.
🔹 KEY INPUTS
Detection group:
• Pace Lookback — window over which parabolic pace is measured.
• Pace Threshold — minimum ATRs-per-bar required to qualify as parabolic.
• Minimum Move Duration — bars of sustained pace required before confirming a start.
• Minimum Event Size — minimum ATR-normalized move size required to log an event in historical statistics.
• Post-Move Cooldown — minimum bars after a completed move before a new one can start.
Historical Stats group:
• Show Duration Projection — toggle the forward projection line.
• Projection Length — forward projection cap in bars.
Visuals group:
• Parabolic Zone Background, Ambient Score Tint, Parabolic Start Label, Exhaustion Warning Label, Phase Transition Labels — all independently toggleable.
Style group:
• Label Size, Panel Size, Help Text Size — default Normal.
• Panel Location — six anchor positions.
• Panel Theme — Dark or Light.
Alerts group:
• Parabolic Start, Peaking Phase Reached, Exhaustion Detected — individually toggleable alerts.
🔹 HOW TO USE
• On any asset and any timeframe, wait for a confirmed Accelerating phase. The Parabolic Start label marks the reference bar.
• Track the Acceleration Score as the move develops. A score climbing toward 60-100 indicates a textbook parabolic.
• Compare Move Age against the panel's Avg Duration statistic. Moves significantly older than the asset's historical average are in late-cycle territory.
• Compare Move Change % against the Avg Reversal statistic for post-move drawdown context.
• Watch for the Peaking transition — this is the first structural deceleration, not a reversal call.
• The Exhaustion state marks where pace has decisively collapsed and the move is structurally over.
• Combine with your existing trend, structure, or volume framework. This tool is designed to complement directional analysis, not replace it.
🔹 LIMITATIONS AND TRANSPARENCY
• The tool detects and classifies acceleration structure. It does not predict reversals, tops, or bottoms. Avg Reversal is a post-cycle statistic computed from completed events on the current chart, not a forward-looking forecast.
• Historical statistics require completed cycles on the chart. Newly loaded symbols with few prior parabolic events will show low sample sizes until more cycles complete.
• The tool confirms a move only after pace has been sustained for the minimum duration. The start label is therefore plotted retroactively on its true start bar, which is the correct academic behavior for a sustained-condition detector.
• All computations are on confirmed bar close logic. No repainting of historical signals once a bar closes.
• The Pace metric requires a valid ATR reading, so at least 14+ bars of history are needed before the tool becomes active on a fresh chart.
🔹 RISK DISCLOSURE
This script is an analytical tool provided for educational and research purposes only. It is not a trading strategy, not financial advice, and does not generate buy or sell recommendations. Trading any market involves substantial risk of loss. All decisions and their consequences are the sole responsibility of the user. Past behavior of parabolic cycles on any asset does not guarantee future behavior.
Indicator

Trend Quality [AGPro Series]Trend Quality
Trend Quality fuses three independent regime dimensions — ADX directional strength, Kaufman Efficiency Ratio, and ATR-normalized EMA slope — into a single 0–100 composite Trend Quality Score. A hysteresis + confirmation + cooldown gate turns that score into a stable TREND / CHOP regime, enhanced with HTF confirmation, lifecycle phases, score velocity, breakout grading, directional dominance, and a full adaptive on-chart quality window. The goal is simple: replace noisy "is this a trend?" guessing with a transparent, multi-dimensional, low-lag quality reading you can read in one glance.
🎯 OVERVIEW
Most trend filters fail at the same thing — they tell you a trend exists, but not whether that trend is clean, accelerating, fading, or already exhausted. Trend Quality answers the harder question. Every bar is scored on three independent dimensions that each measure a different physical property of price movement:
• ADX — directional strength (how strongly one side dominates)
• Kaufman Efficiency Ratio (ER) — path efficiency (how little wasted motion)
• ATR-normalized EMA slope — normalized trend velocity (how fast, relative to volatility)
These three signals are combined into one 0–100 Trend Quality Score. A hysteresis band + confirmation bars + cooldown filter convert that score into a stable TREND / CHOP regime — no single-bar flipping, no false recovery wicks. On top of the core regime, the indicator layers Score Velocity, Lifecycle phases (Emerging → Confirmed → Exhausting), Breakout Quality grading (A / B / C), directional dominance, and a visual Quality Window that tracks the active trend zone and projects it forward.
💎 UNIQUE EDGE
What separates Trend Quality from a standard ADX filter, an EMA slope indicator, or a generic regime meter:
• Tri-factor fusion (not a single metric) — ADX alone misses path quality; ER alone misses direction; slope alone misses choppy-but-strong moves. Weighted fusion (45% ADX, 35% ER, 20% Slope) neutralizes each component's blind spot.
• Stable regime, not a flickering line — the TREND / CHOP state passes through a 3-layer filter: hysteresis band around the threshold, N confirmation bars, and a cooldown window after every transition. The result is a regime reading that holds through pullbacks without flipping.
• Score Velocity Engine — a second-derivative layer that watches how fast the score itself is changing. Surges flag momentum ignition; collapses flag quality breakdown before price confirms it. A bearish divergence detector fires when price makes new highs while quality is fading.
• Lifecycle phases — inside every TREND regime, the script distinguishes Emerging (young, fresh, accelerating), Confirmed (mature, stable, above buffer), and Exhausting (score rolling over from a peak). This lets you see whether you are entering early, running mid-trend, or catching the end.
• Breakout Quality Badge (A / B / C) — every CHOP → TREND transition receives a graded badge based on composite score plus velocity bonus. Grade A breakouts are rare and have an optional dedicated alert.
• HTF confirmation with Auto-HTF mapping — the same engine runs on a higher timeframe. When LTF is trending but HTF is not, the regime is marked BLOCKED (not forced to CHOP) so you retain full transparency about why the regime is gated.
• Adaptive Quality Window — a live rectangular zone that tracks the full trend's high/low from its start bar, projects forward, shows ceiling/floor projection labels, and preserves historical windows with directional color coding (green for up-trends, pink for down-trends, amber for HTF-blocked trends).
🧪 METHODOLOGY
Core composite score (every bar, LTF):
Score = 100 × (0.45 × ADX_norm + 0.35 × ER_norm + 0.20 × Slope_norm)
• ADX_norm = min(ADX / 50, 1)
• ER_norm = |close − close | / (SMA(|Δclose|, N) × N)
• Slope_norm = min(|EMA − EMA | / ATR × 10, 1)
Regime gating:
• Hysteresis: +3 above threshold to enter TREND, −3 below to enter CHOP
• Confirmation: N consecutive bars above/below the hysteresis band
• Cooldown: N bars after every regime flip where no new flip is allowed
MTF confirmation (optional, default ON):
The same core function is called via request.security on the HTF (Auto: 30m→4H, 4H→Daily, Daily→Weekly, Weekly→Monthly in Strict mode). When LTF=TREND but HTF=CHOP, the regime is tagged BLOCKED — a transparent third state that is neither forced-CHOP nor accepted-TREND.
Lifecycle logic:
• Emerging: TREND is young (bars since start ≤ Emerging Bars) OR score slope ≥ 0 and score below buffer
• Confirmed: score ≥ threshold + Confirmed Buffer AND HTF passes (optional)
• Exhausting: score slope < 0 AND pullback from peak ≥ Exhaustion Pullback
Score velocity:
velocity = score − score (default 5-bar look-back)
Breakout quality grading:
bqScore = score + velocity_bonus (bonus: +15 if vel>15, +7 if vel>5, else 0)
A ≥ 82, B ≥ 67, C < 67
🔔 SIGNALS & ALERTS
The script exposes 12 alert conditions — all moderator-safe, educational, non-solicitating:
• CHOP → TREND / TREND → CHOP regime flips with LTF+HTF context
• Strong Trend composite conviction threshold
• HTF Blocked / HTF Unblocked third-state transparency events
• Emerging / Confirmed / Exhausting Trend lifecycle phase changes
• Velocity Surge / Velocity Collapse second-derivative extremes
• Grade-A Breakout rare high-conviction breakouts
• Bearish Divergence price up, quality down warning
On-chart visual events (also filterable via inputs):
• Breakout Quality badge (A / B / C) at every CHOP → TREND
• Bearish divergence ⚠ marker at trend peaks where quality fades
• State tag near backbone: EMERGING / CONFIRMED / EXHAUSTING / HTF BLOCKED
• Quality Window label: ACTIVE + phase
• Projection labels on the right edge: QUALITY CEILING / TREND FLOOR
All badge and warning labels are gated with an 8-bar cooldown so the chart stays clean even on repeated intra-swing triggers.
⚙️ KEY INPUTS
Core engine:
• ADX Length (14) — directional strength look-back
• Efficiency Length (20) — ER path-efficiency window
• Slope EMA Length (50) — trend backbone reference
• ATR Length (14) — volatility normalization
• TREND Threshold (55) — composite score level to enter TREND
• Confirmation Bars (1) — bars of persistence before flipping
• Strong Trend Offset (15) — extra score above threshold for STRONG tag
MTF:
• HTF Confirmation (ON) — enable/disable HTF gate
• Auto HTF (ON, Strict) — smart HTF mapping per chart TF
• Manual HTF (240) — override timeframe
Stability:
• Change Cooldown Bars (2) — lock-out window after any regime flip
Lifecycle:
• Emerging Phase Bars (4) — max trend age to stay Emerging
• Confirmed Buffer (8.0) — score must clear threshold+buffer
• Exhaustion Pullback (4.0) — peak-to-current drop to flag Exhausting
Visual Overlay:
• Backbone + Glow + Zone + State Candles + Quality Window + Historical Windows + Projection Box + Guides + Midline (all toggleable)
Panel, Theme, Layout, Help rows, Alerts, Score Velocity Engine, Breakout Quality Badge, Divergence Detector — every layer has its own input group and can be shown/hidden independently.
📘 HOW TO USE
Read-in-one-glance panel (standard AGPro format):
• Blue header row: script title
• Line 2: REGIME / LIFECYCLE · Score N/100 · Velocity state
• Line 3: LTF regime · Direction · Directional Dominance
• Line 4: HTF regime · MTF PASS/BLOCKED · Active Window state · Streak
Quick playbook:
1. CHOP on LTF → wait. No setup, no commitment.
2. CHOP → TREND transition with Grade A badge + HTF PASS → highest-conviction regime start.
3. CONFIRMED phase with DOM HIGH and rising score → the middle of the trend, usually the cleanest section.
4. Velocity COLLAPSE or EXHAUSTING phase with bearish divergence ⚠ → quality is deteriorating; reduce exposure or tighten stops.
5. HTF BLOCKED amber window → LTF trend exists but higher timeframe disagrees; treat as lower-conviction and be aware of mean-reversion risk.
The indicator does NOT issue buy/sell signals, does NOT define entry/exit prices, and is NOT a strategy. It is a regime-quality reading — a context layer you pair with your own trade management.
⚠️ LIMITATIONS & TRANSPARENCY
• Trend-quality indicators are inherently trend-following. In low-volatility ranges the score can stay above threshold on minor moves; in very fast markets the score can lag by 1–3 bars while the filters stabilize.
• HTF confirmation introduces a natural HTF delay. This is intentional (it removes noise) but means the HTF gate may lift several LTF bars after price has already moved.
• All composite signals rely on look-backs (ADX 14, ER 20, Slope EMA 50, ATR 14). On very short intraday timeframes with low bar counts these need calibration.
• Lifecycle phases are structural readings, not predictions. EXHAUSTING means the score is rolling over — not that price must reverse.
• Past performance of any visual regime does not imply future performance. Charts showing clean historical windows are illustrative of the indicator's logic, not trading results.
• No repainting on historical bars. The HTF call uses lookahead_off and barmerge.gaps_off. Score and regime values on closed bars are final.
🛡️ RISK DISCLOSURE
This script is published as an educational and analytical tool. It does not provide financial advice, does not generate trade signals of any kind, and must not be used as a standalone decision system. Markets involve substantial risk of loss. Past behavior of any market regime, indicator output, or historical visual window is no guarantee of future results. Always combine any indicator with independent risk management, position sizing, a tested plan, and — where appropriate — the guidance of a licensed professional. You are solely responsible for any trading decisions you make. Indicator

Failed Break Quality [AGPro Series]Failed Break Quality
🔹 OVERVIEW
Failed Break Quality is a reversal-focused structure tool that detects failed breakouts (bull traps and bear traps) around confirmed horizontal support and resistance, then grades each reclaim with a transparent 0-100 quality score. Instead of signaling every price wick through a level, it waits for the full sequence — level confirmation, break below or above, decisive reclaim, rejection candle and follow-through — and only prints a label when the event passes a weighted score threshold.
The goal is to give a single-pane view of where the market trapped participants, how clean the reversal was, and whether the reaction carried any real conviction. All components are plotted on the price chart in an event map style: reclaim pockets, focus bands, connector rails, structure tags and a compact summary panel.
🔷 UNIQUE EDGE
What separates Failed Break Quality from generic support-resistance or bull-trap detectors:
• Five-component weighted score (0-100) — each reclaim is rated on Level Integrity, Break Weakness, Reclaim Speed, Rejection Strength and Follow-Through, with user-adjustable weights. No black-box output.
• Auto timeframe profiles — Intraday, H4 and Swing profiles adapt tolerance, break depth, reclaim window, adverse-move limits and family-reset band automatically so the same inputs behave sensibly across timeframes.
• Reclaim Pockets — the actual zone between the break extreme and the reclaim level is drawn as a shaded rectangle, making it easy to see where the trap formed and where the invalidation sits.
• Focus Bands + Event Rails — the latest bull and bear events are highlighted with a forward-extended focus band at the level and a dashed rail connecting break extreme to reclaim point. Older events fade, so the current structural map stays readable.
• Family lock system — once a level produces a graded signal, it will not re-fire on the same level family until a new family forms beyond the configured reset band, preventing signal stacking on the same structure.
• Auto-clean stale event visuals — focus bands, reclaim pockets and event rails are automatically removed when their anchor level drifts, disappears or ages out, so the chart stays clean across regime shifts.
• This script differs from Break-Retest Quality (continuation after a confirmed breakout) by focusing on the opposite case: breakouts that fail and reverse back through the level.
🔸 METHODOLOGY
1. Level Building — Pivot highs and lows are clustered inside an ATR-scaled tolerance band. A level is confirmed only after reaching the required minimum touches and is retired when it exceeds the maximum age in bars. Each confirmed level carries a family ID so nearby re-confirmations do not create duplicate signals.
2. Failed Break Detection — A break is registered when price penetrates a confirmed level by at least the minimum break depth (ATR-based). The script then monitors the reclaim window (capped in bars) and records the break extreme and outside-closes count.
3. Reclaim Confirmation — A reclaim requires close back across the level plus a small ATR buffer. The bar that reclaims is graded for rejection strength using wick, body and close position.
4. Follow-Through Gate — After reclaim, price must extend at least the follow-through ATR in the favorable direction and must not exceed the maximum adverse ATR against the reclaim. Failing either gate cancels the signal.
5. Quality Score — Five sub-scores are combined with user weights to produce the final 0-100 score. Only reclaims at or above the minimum print threshold produce a labeled signal and a reclaim pocket.
🔶 SIGNALS AND ALERTS
• Bullish Reclaim — printed below the reclaim bar with a teal label showing the quality score. Indicates a failed breakdown of support.
• Bearish Reclaim — printed above the reclaim bar with a pink label showing the quality score. Indicates a failed breakout of resistance.
• Panel States — Bull Trap Watch, Bull Reclaim Pending, Bear Trap Watch, Bear Reclaim Pending, Scanning Levels, Building Levels.
• Alert Conditions — Bullish Reclaim and Bearish Reclaim, suitable for standard PulseWire alert creation.
🔹 KEY INPUTS
• Levels — Pivot length, ATR length, level match tolerance (ATR), minimum touches, maximum level age.
• Profiles — Toggle for automatic timeframe calibration.
• Failed Break Logic — Minimum break depth, reclaim window, follow-through bars, reclaim buffer, minimum follow-through, maximum adverse move, re-arm distance, family reset band.
• Score — Minimum score to print and individual weights for Level, Break, Speed, Reject and Follow components.
• Visuals — Toggles for confirmed levels, level zones, inner core bands, structure tags, active-zone emphasis, tag connector rails, zone and core half-widths, signal offset, label and tag sizes.
• Event Map — Reclaim pockets, focus bands, event rails, non-focus fade, auto-clean stale event visuals, stale event max bars, pad and extend settings.
• Panel — Visibility, position (Top Right / Top Left / Bottom Right / Bottom Left) and font size.
🔷 HOW TO USE
• Start on the timeframe where the levels look most respected (H1, H4 or Daily). Auto profiles will adjust internal thresholds automatically.
• Treat every signal as contextual evidence, not as a standalone entry. Higher scores indicate cleaner events — a shallow break, a fast reclaim, a strong rejection bar and a clean follow-through all lift the score.
• Use the reclaim pocket as the structural zone: the level marks the invalidation side, and the break extreme marks the maximum trap depth. Both are visible on the chart.
• Combine with your own bias, trend filters, higher-timeframe levels, volume or session structure. The script is designed to sit on top of an existing framework, not replace it.
🔸 LIMITATIONS AND TRANSPARENCY
• This is an indicator, not a strategy. It does not place orders, size positions or calculate profit and loss.
• Signals are evaluated on bar close. Intrabar wicks can temporarily enter trap states without producing a graded event.
• Score thresholds and weights are tunable. Different markets and timeframes benefit from different configurations — the default values are a reasonable starting point, not a universal setting.
• All level, reclaim and pocket logic is purely structural and does not include volume, order flow or derivatives data.
• Repainting note — level confirmation uses pivots with a fixed lookback. The last pivot is locked once the required forward bars have elapsed; earlier plotted structure does not repaint after that point.
🔶 RISK DISCLOSURE
Trading involves substantial risk. This script is a technical analysis tool provided for educational and research purposes only and does not constitute financial advice, investment recommendations or a solicitation to trade. Past performance does not guarantee future results. Always do your own research and apply strict risk management. The author assumes no responsibility for trading decisions made using this script.
Published under Mozilla Public License 2.0 — source is open and available for study, review and non-commercial derivative work under the terms of the license. Indicator

Value Migration Bands [AGPro Series]Value Migration Bands
Value Migration Bands is a chart-first value migration engine that visualizes where the market's accepted-value region has been drifting over time. Instead of a single moving average, it builds a three-layer band (upper / middle / lower) from a rolling percentile window of typical price, then classifies the current environment as Rising, Flat, or Falling Value using an ATR-normalized slope of the migration midline. The result is a scale-invariant, regime-aware view of how "fair value" migrates across trending and ranging conditions — on crypto, equities, indices, forex and futures alike.
🔷 OVERVIEW
Most band-style indicators build their envelope from volatility (Bollinger, Keltner, Donchian). Value Migration Bands is built from acceptance — the region where price has actually spent its time during the lookback, captured as a percentile window of typical price (hlc3). The outer bands mark the edges of that accepted-value region. The midline marks its core. When the whole region drifts upward, the market is accepting higher prices (Rising Value). When it drifts downward, lower prices are being accepted (Falling Value). When it stays level, participants are agreeing on a stable range (Flat Value).
This reframes the classic "trend vs range" question in terms of value migration, which is a cleaner structural signal than price slope alone. You see not just where price is going, but where the market's center of gravity is going.
🔶 UNIQUE EDGE
Value Migration Bands is distinct from moving-average envelopes, volatility bands and standard channels in several structural ways:
• Percentile-based construction — the band is a percentile window of typical price, not a standard deviation or ATR multiple. This directly captures acceptance, not dispersion.
• Three-state migration classification — Rising / Flat / Falling Value, driven by an ATR-normalized slope of the midline. The classification is scale-invariant, so the same sensitivity works across BTC, SPX, EURUSD, gold and small-cap equities without retuning.
• Regime-aware event markers — Reclaim and Lost markers are filtered by the current regime. Reclaim events are suppressed when the market is in Falling Value; Lost events are suppressed in Rising Value. You only see the events that matter for the active regime.
• Strict Value Filter — during extreme compression, the indicator refuses to classify a regime until the band is meaningfully wide relative to ATR. This prevents false regime flags in low-volatility micro-bands.
• Distance + cooldown gating — new event markers require a minimum ATR distance from the previous event and a minimum bar spacing, producing a clean chart even on long histories.
🔷 METHODOLOGY
Band construction:
1. Typical price (hlc3) is sampled across a configurable lookback window (Band Length).
2. Two percentiles are computed — a lower percentile and an upper percentile, selected by the Band Width Mode (Tight, Balanced, Wide).
3. The midline is the mean of those two percentiles.
4. Light EMA smoothing (adaptive to Band Length) stabilizes the visual without adding structural lag.
Regime classification:
1. The midline slope is measured over a rolling window (adaptive to Band Length).
2. The slope is normalized by ATR(14) to make the threshold scale-invariant.
3. A user-controlled Migration Slope Sensitivity divides the normalized slope into Rising / Flat / Falling bands.
4. A 2-bar confirmation layer prevents rapid regime flipping during transitions.
Event detection:
• Reclaim — price re-enters the band from below after previously being lost.
• Lost — price falls out of the band after previously being inside.
Both pass a regime gate, an ATR-distance gate and a bar-cooldown gate before being plotted or alerted.
🔶 SIGNALS & ALERTS
Four built-in alert conditions:
• Value Band Shifted Up — fires when the confirmed regime transitions into Rising Value.
• Value Band Shifted Down — fires when the confirmed regime transitions into Falling Value.
• Band Reclaimed — fires when price re-enters the accepted-value region (regime-gated).
• Band Lost — fires when price falls out of the accepted-value region (regime-gated).
Alerts and on-chart markers share identical gating, so the alert log and the chart stay in sync.
🔷 KEY INPUTS
Band Engine:
• Band Length (default 100) — lookback for the percentile window.
• Band Width Mode — Tight, Balanced, Wide. Selects the percentile pair.
• Strict Value Filter — requires a minimum band width vs ATR before classifying a regime.
• Migration Slope Sensitivity (default 0.5) — threshold between Rising / Flat / Falling.
Visuals:
• Show Midline, Show Band Fill, Active State Label, Show Reclaim / Lost Markers, Show Info Panel.
• Panel Location — six options (Top / Middle / Bottom × Right / Left).
• Panel Font Size and Label Font Size — default Normal.
Colors:
• Rising Value Color, Falling Value Color, Flat Value Color.
• Band Fill Opacity.
Alerts:
• Individual toggles for the four alert conditions above.
🔶 HOW TO USE
Structural reading:
• Rising Value — treat Reclaim events as continuation confirmations, not counter-trend signals. Expect pullbacks to the midline to be bought.
• Falling Value — treat Lost events as continuation confirmations. Expect rallies back to the midline to be sold.
• Flat Value — neither regime is active. The band can be used as a range reference; directional events are suppressed because they do not carry regime confirmation.
Location reading:
• Inside Band — price is trading within the accepted-value region. This is the default state.
• Above Band — price is trading above accepted value. In Rising Value, this is constructive; in Falling Value, it is a rally to be evaluated.
• Below Band — price is trading below accepted value. In Falling Value, this is the dominant state; in Rising Value, it is a dip.
Timeframe guidance:
• 1H–4H — best balance for swing use with the default Band Length of 100.
• 15m–1H — reduce Band Length to 40–60 for intraday use.
• Daily — Band Length 100 gives a structural multi-month migration view.
Pairing suggestions:
• Higher-timeframe VMB for bias, lower-timeframe execution tools for entry.
• Combining with volume-based or anchored-VWAP tools can confirm whether value migration is participation-backed.
🔷 LIMITATIONS & TRANSPARENCY
• This is an analytical visualization tool, not a strategy. It does not backtest, does not place orders and does not generate buy / sell recommendations.
• Regime classification is based on historical midline slope. Like all rolling measures, it is a lagging read of structure — it describes what has been happening, not what will happen.
• During abrupt regime changes, the 2-bar confirmation layer introduces a small delay by design, trading reactivity for stability.
• Percentile bands are descriptive of past acceptance. Future acceptance may differ, especially around news events, regime breaks and illiquid sessions.
• The Strict Value Filter can force a Flat reading during extreme compression even when a visual direction appears present; this is intentional and protects against false regime flags.
🔶 RISK DISCLOSURE
This indicator is published for educational and analytical purposes. It is not financial advice, not a trading recommendation and not a guarantee of performance. Trading and investing involve substantial risk, including the risk of total loss. Past behaviour of any instrument does not guarantee future results. Users are solely responsible for their own decisions and should perform their own due diligence, including independent risk management and position sizing.
Published as open-source under the Mozilla Public License 2.0. Feedback, questions and discussion are welcome in the comments.
Indicator

Delivery Regime Map [AGPro Series]Delivery Regime Map
🔹 Overview
Delivery Regime Map classifies the market's delivery character into four distinct regimes — Balanced, Directional, Fragmented, and Exhausted — giving traders instant context on whether the tape is trending with conviction, consolidating, breaking into volatile chop, or fading after an extended move. Rather than asking "is this bullish or bearish?", DRM answers a more useful question: "what kind of market am I in, and what kind of setup is appropriate here?"
The indicator overlays a soft state ribbon across the chart, prints confirmed regime shift labels at the moment of transition, and maintains a compact status panel with the active regime, a composite conviction score, regime duration, and time since the last shift. All outputs are confirmed on bar close with dwell-based hysteresis to suppress noise.
🎯 Unique Edge
Most regime or trend-strength tools collapse the market into a single linear axis (strong ↔ weak, bullish ↔ bearish). Delivery Regime Map is categorical, not linear — it identifies the qualitative character of price delivery by fusing four independent dimensions:
• Displacement quality (how much of each bar's range is body vs. wick)
• Directional persistence (close-to-close consistency + EMA slope alignment)
• Continuity (same-side runs penalized by gap noise)
• Range expansion (current range normalized by ATR baseline)
These dimensions combine into a composite score, but the regime classification uses banded thresholds with hysteresis — meaning a Directional tape must decisively lose its edge before flipping to Fragmented or Exhausted. This produces sparse, high-conviction transitions rather than the constant flipping typical of single-value strength meters.
⚙️ Methodology
The engine computes five rolling metrics across a user-defined window (default 20 bars):
1. Displacement Quality — |close − open| / range, smoothed. High values mean strong, decisive bars with minimal wick rejection.
2. Directional Persistence — average signed close direction plus an EMA slope-alignment check. Rewards tapes that move one way without reversing.
3. Continuity — the proportion of consecutive same-side candles, penalized by an average gap-size term (opens far from prior closes indicate fractured delivery).
4. Range Expansion — current range vs. ATR baseline, clipped to . High expansion combined with low continuity flags Fragmented tapes.
5. Exhaustion Proxy — the decay rate of displacement quality after a period of high persistence. Triggers near trend terminations where bars shrink while direction lingers.
A classifier selects the active regime by priority (Directional → Exhausted → Fragmented → Balanced), and a dwell-bar confirmation (default 5 bars, or 8 under Strict mode) plus a minimum-gap filter (default 10 bars) prevent whipsaw transitions.
🚦 Signals & Alerts
Four alert conditions are built in, each firing only on a confirmed regime shift:
• Regime shifted to Directional — conviction is rising; the tape is trending
• Regime shifted to Fragmented — wide, disconnected bars; chop risk elevated
• Regime shifted to Exhausted — prior trend is losing steam; mean-reversion risk
• Regime shifted to Balanced — low-conviction state; breakout potential building
All alerts include the ticker and interval in the message payload.
🎛️ Key Inputs
• Regime Window (8–60) — length of the measurement window
• Regime Sensitivity (Low / Normal / High) — hysteresis band width
• Strict Classifier — extends dwell requirement from 5 to 8 bars
• Minimum Bars Between Shifts — anti-chop spacing filter
• Show State Ribbon / Regime Shift Labels — visual toggles
• Panel Position + Font Size — 6 anchor positions, 5 size options
• Label Font Size — matches user's chart density preference
Every input carries an inline tooltip explaining its behavior and tradeoffs.
📚 How to Use
• Use Directional regimes to favor trend-following entries and trailing stops
• Use Balanced regimes to prepare for breakouts; volatility compression often precedes expansion
• Use Fragmented regimes as a caution flag — reduce size, widen stops, or stand aside
• Use Exhausted regimes to tighten trailing stops on open trend positions; the edge may be fading
DRM is designed to be asset-agnostic and timeframe-agnostic. On lower timeframes (1m–15m), consider Strict mode and a larger minimum-gap value. On daily charts, defaults typically work well. Combine with any entry framework — order blocks, breakout levels, VWAP reclaims — as a regime filter that answers "should I even be looking for a setup here?"
⚠️ Limitations & Transparency
• The classifier is reactive, not predictive — it confirms regime changes on close, so a Directional label appears a few bars after the trend has begun. This is by design: dwell confirmation is the primary noise filter.
• Regime definitions are categorical interpretations of price statistics. They are not forecasts.
• The composite score reflects regime conviction, not directional bias. A high score in Fragmented means "confidently choppy", not "confidently bullish".
• This indicator is not a strategy. It produces no entry signals, no take-profit targets, and no stop-loss levels. It is a market-context tool intended to be combined with a trader's existing framework.
• Past regime behavior does not guarantee future regime behavior. Market character can change abruptly on news or macro events.
📜 Risk Disclosure
This indicator is published for educational and analytical purposes only. It does not constitute financial advice, a trading recommendation, or an offer to buy or sell any instrument. Trading and investing carry risk of loss, and past performance does not guarantee future results. Users are solely responsible for their own decisions and should consult qualified professionals before committing capital. Indicator

Setup Quality Scorecard [AGPro Series]Setup Quality Scorecard
Setup Quality Scorecard grades every bar on a transparent 0-100 scale across ten independent confluence dimensions. Instead of another signal generator, it is a quality filter: it tells you how strong the current setup is, which factors are firing, and how often similar past setups have followed through. Works on any symbol, any timeframe.
🔹 OVERVIEW
Every trader has the same question before pulling the trigger: "Is this setup actually good, or am I forcing it?" Setup Quality Scorecard answers that question with a single auditable number. The composite score blends ten orthogonal factors — trend, momentum, volume, volatility, structure, S/R proximity, divergence, candle quality, session context, and higher-timeframe alignment — into a weighted 0-100 quality rating. Bars scoring above the A-Tier threshold are marked with support/resistance-style zones on the chart, so high-quality setup regions stay visible even as the market moves on.
🔹 UNIQUE EDGE
Most quality indicators hide their internals behind a black-box algorithm. This one is fully transparent. Every factor exposes its own 0-10 score in the panel, every factor weight is user-adjustable, and every historical signal is evaluated against a forward-looking hit-rate test. There are no secret filters, no proprietary confidence bands, and no cherry-picked backtest. If a setup scores 87, you can see exactly which factors contributed and which did not.
🔹 METHODOLOGY
Each of the ten factors is computed independently on the current bar and normalized to a 0-10 scale:
1. Trend Alignment — EMA 20/50/200 stack plus slope confirmation
2. Momentum — RSI zone position combined with 3-bar RSI delta
3. Volume Context — relative volume versus 20-period SMA, calibrated for real-world distribution
4. Volatility Regime — ATR percentile over the last 100 bars, favoring mid-range regimes
5. Structure — HH/HL or LH/LL confirmation via recent pivots
6. S/R Proximity — ATR-normalized distance to the nearest pivot level
7. Divergence — price-versus-RSI regular divergence captured at pivot time
8. Candle Quality — body-to-range ratio and wick balance
9. Session Context — active trading session weighting (London/NY overlap prioritized)
10. HTF Agreement — graduated higher-timeframe alignment scoring (full stack, partial stack, opposed regimes)
The ten factor scores are weighted by user-adjustable coefficients, summed, and normalized to produce the final 0-100 composite. Tier labels (S / A / B / C / D) are assigned against user-configurable thresholds.
🔹 SIGNALS AND ALERTS
When a bar crosses into A-Tier or higher, a zone is drawn using support/resistance-style geometry (body plus a small ATR cushion). Zones merge automatically when adjacent qualifying setups share the same directional bias, preventing chart clutter. Each zone is labeled with its tier and score in compact A·83 format, with a dotted leader line connecting the label to the zone edge.
Four built-in alert conditions are exposed:
- S-Tier Setup Detected (score crosses the S-Tier threshold)
- A-Tier Setup Detected (score crosses the A-Tier threshold)
- New Bullish Quality Setup (first A-tier bullish bar in a run)
- New Bearish Quality Setup (first A-tier bearish bar in a run)
🔹 KEY INPUTS
- General: Higher timeframe reference, rolling history window, forward evaluation bars
- Thresholds: S / A / B / C tier cutoffs, fully adjustable
- Factor Weights: ten independent sliders, 0.0 to 2.0, tune the scorer to your style
- Zones: adaptive extend (auto or manual), merge window, max height cap in ATR units, maximum age
- Labels: on-chart label mode (A-Tier only, S-Tier only, off), size presets
- Panel: position, size, factor breakdown toggle
🔹 HOW TO USE
Start with defaults and observe for a full session on your chart. Trend traders should raise the Trend and HTF Align weights. Reversal traders should raise Divergence, Structure, and S/R Proximity. Use the Active count in the panel as a quick filter: fewer than three factors above seven generally means a weak setup regardless of composite score. Use the hit-rate number to sanity-check whether your current configuration is performing on this asset and timeframe — if it is below 50 percent on a large sample, revisit your weight assignments.
🔹 LIMITATIONS AND TRANSPARENCY
The hit-rate metric is backward-looking. It measures how often past A-tier signals produced a one-ATR directional move within the next N bars. It is not a forecast of future performance. A hit rate with fewer than twenty signals is flagged with an info marker because the sample size is not yet statistically meaningful. Factor definitions are static — they do not adapt to regime changes automatically. Session weighting assumes standard crypto and equity session times in UTC; adjust if you are trading exotic hours. The script uses pivot-based structure, which lags by the pivot length on the right edge of the chart (a standard trade-off for noise suppression).
🔹 RISK DISCLOSURE
This indicator is an analytical tool, not financial advice. It does not predict future price movements. A high quality score does not guarantee a winning trade. Past performance of any displayed signal does not indicate future results. Always use proper risk management and position sizing. Never trade with capital you cannot afford to lose. Indicator

Head & Shoulders Auto Detector [AGPro Series]Head & Shoulders Auto Detector
🎯 **Overview**
Head & Shoulders Auto Detector is a precision pattern recognition tool that automatically identifies classic Head & Shoulders (bearish) and Inverse Head & Shoulders (bullish) reversal formations across any market and timeframe. Built from the ground up for traders who want the full lifecycle of a pattern tracked on-chart — not just a label and a line, but forming → confirmation → target/stop outcome — with a transparent, quality-scored framework that filters low-probability setups before they clutter the chart.
Every pattern carries a composite quality score, a symmetry percentage, an ATR-adaptive neckline, two projection targets, and a live status label that evolves through the pattern's lifespan.
🔹 **Unique Edge**
Most H&S indicators stop at detection. This one goes further:
• **Full lifecycle state machine** — every pattern moves through four explicit states (Forming → Confirmed → Target Hit / Stopped / Invalidated / Expired), and the visuals update in real time at each transition.
• **Dead pattern hygiene** — once a pattern fails or hits target, orphan TP and stop lines are removed, the neckline freezes at the decision bar, and the status label grays out. The chart never accumulates stale clutter.
• **Quality-driven visual hierarchy** — high-quality patterns (Q≥75) are rendered with a star marker and full saturation, mid-tier patterns get standard treatment, and low-tier patterns (Q<60) fade into the background so the trader's eye is guided to what matters.
• **Dual-target projection with R:R** — every confirmation displays both a classic measured-move TP1 and an extended 1.618× TP2, each labeled with the exact reward-to-risk ratio calculated at entry.
• **ATR-adaptive everything** — shoulder tolerance, neckline flatness, head prominence, stop buffer, and label offsets all scale with volatility, so the same settings work across BTC 4H, gold daily, or small-cap stocks.
🔹 **Methodology**
Patterns are detected from confirmed pivot highs and lows using a configurable pivot length. For a valid Head & Shoulders, three same-side pivots (Left Shoulder → Head → Right Shoulder) must satisfy:
• Head extends beyond both shoulders by at least the configured ATR multiple (prominence test).
• Shoulder heights differ by less than the shoulder tolerance in ATR units (symmetry test).
• Two opposite-side pivots between LS-Head and Head-RS define the neckline; their vertical distance must be within the neckline tolerance.
• Composite symmetry score (50% time symmetry, 50% price symmetry) must exceed the minimum threshold.
Quality score combines four weighted components:
• Symmetry (45%) — time + price balance between shoulders
• Neckline flatness (25%) — how horizontal the neckline is
• Volume profile (15%) — head-bar volume relative to shoulder average
• Head prominence (15%) — how clearly the head dominates
Confirmation triggers when price closes beyond the neckline level (interpolated for sloped necklines). Stop is placed at the head level plus an ATR buffer to avoid wick stop-outs. TP1 uses the standard head-to-neckline measured move; TP2 extends to 1.618× that projection.
🔹 **Signals & Alerts**
Four alert events available:
• **Pattern Forming** — a valid H&S or Inverse H&S structure has been detected but not yet confirmed.
• **Pattern Confirmed** — close has broken the neckline; entry is live with TP/Stop drawn.
• **Target Hit** — TP1 has been reached on a confirmed pattern.
• **Neckline Retest** — after confirmation, price has returned to touch the neckline (common high-probability re-entry zone).
🔹 **Key Inputs**
• **Pivot Length** — controls swing-point sensitivity
• **Min Symmetry Score** — minimum shoulder symmetry percentage to accept a pattern (default 60, balanced)
• **Neckline Tolerance (ATR)** — how sloped a neckline is allowed to be
• **Shoulder Height Tolerance (ATR)** — how different the two shoulders can be
• **Head Prominence (ATR)** — minimum head extension beyond shoulders
• **Volume Soft Confirmation** — toggle volume influence on quality score
• **TP1 Method** — Classic (horizontal neckline reference) or Measured Move (slope-aware)
• **Stop Buffer (ATR)** — extra room beyond the head level (default 0.35)
• **Max Pattern Lifetime** — bars after which an unconfirmed pattern expires
• Full visual controls: font size, panel position, theme, zone display, label offset, color palette
🔹 **How to Use**
1. Apply the indicator to any liquid market and timeframe. 4H and higher tend to produce the most reliable formations; intraday works but expects more noise.
2. Watch for patterns labeled with a ⭐ and bright color (Q≥75) — these are the highest-confidence setups.
3. Wait for the ✓ Confirmed status to appear before entering; the ⚡ breakout marker pinpoints the exact confirmation bar.
4. Use the TP1 / TP2 R:R labels to size the trade. Stop is pre-calculated at head level + ATR buffer.
5. Monitor the panel stats over time to understand the indicator's behavior on your specific market — Win Rate, Avg Quality, and Last Signal all update live.
6. Consider combining with trend context (a bearish H&S is far more powerful at resistance in a downtrend than in the middle of a strong uptrend).
🔹 **Limitations & Transparency**
• Pattern detection uses confirmed pivots, so signals appear with a natural delay equal to the Pivot Length setting. This is intrinsic to pivot-based logic, not a flaw.
• Quality score and historical win rate are chart-native calculations based on the loaded history; they are descriptive, not predictive.
• The script does not include multi-timeframe confluence or trend filters — these are deliberate design choices to keep the tool focused and composable with other indicators.
• Volume confirmation is a soft scoring input, not a hard filter, since many crypto pairs and indices have volume data of variable reliability.
• Pattern state transitions use close-based confirmation; intrabar wicks do not trigger state changes except for stop/target hits, which are high/low based as expected.
🔹 **Risk Disclosure**
This indicator is an analytical tool, not a trading recommendation or financial advice. Pattern recognition describes what has formed on a chart; it does not predict future price movement with certainty. Always use proper risk management, position sizing, and confirm signals with your own analysis. Past pattern statistics shown on the panel are descriptive of the visible history and do not guarantee future performance. Trading involves substantial risk of loss. Indicator

Multi-Oscillator Consensus Engine [AGPro Series]Multi-Oscillator Consensus Engine
🔹 Overview
Multi-Oscillator Consensus Engine aggregates ten independent momentum
oscillators into a single regime classifier with overlay Consensus Zones,
flip event labels, and agreement persistence tracking. Instead of watching
ten charts separately, traders see one unified answer: are the oscillators
in agreement, and what is the consensus saying right now?
The script monitors RSI, Stochastic, CCI, MFI, Williams %R, ROC, Ultimate
Oscillator, MACD, DMI balance, and Aroon balance. Each oscillator is
normalized to a 0–100 scale and votes bullish, bearish, or neutral against
configurable thresholds. The aggregated vote determines the market regime
and drives everything else on the chart.
🔹 Unique Edge
Most multi-oscillator tools stop at a dashboard or a simple agreement
percentage. This engine goes further:
- Regime Classification — four distinct states (Consensus Bull, Consensus
Bear, Divergent, Transition) instead of a binary signal.
- Consensus Zones — a horizontal price zone is born at every regime flip
and stays alive while the regime holds. When the regime ends, the zone
becomes historical structure.
- Flip Event Labels — regime transitions are marked directly on price
with merged flip + extreme agreement tags.
- Persistence Tracking — streak bars, last flip distance, and historical
extreme rate tell you how trustworthy the current consensus is.
- Label Discipline — cooldown, horizontal stagger, and flip+extreme merge
logic keep the chart readable even in choppy regimes.
🔹 Methodology
Step 1. Ten oscillators are computed with their classic defaults and
normalized to a 0–100 range. Indicators with native 0–100 output (RSI,
Stochastic, MFI, Ultimate) pass through directly. Others (CCI, ROC, MACD
histogram) are rescaled against their own recent range. Williams %R is
flipped from its native -100..0 scale.
Step 2. Each normalized oscillator casts a vote. Values above the bullish
threshold vote +1, values below the bearish threshold vote -1, everything
else is neutral. Vote counts and agreement percentage are computed bar by bar.
Step 3. Regime is assigned from the vote distribution. Seven or more votes
in one direction triggers Consensus Bull or Consensus Bear. A tight spread
(bull-bear difference ≤ 2) triggers Divergent. Everything else is a
Transition state.
Step 4. On every bull↔bear regime entry, a new Consensus Zone is born at
the current close ± a configurable ATR multiple. The zone extends forward
while the regime is active and locks in place when the regime ends. A
maximum of five active zones keeps the chart clean.
Step 5. Labels are rendered only when cooldown and merge rules allow.
Extreme agreement events (80%+ by default) are either merged into the flip
label or drawn separately with larger offset.
🔹 Signals & Alerts
Seven alert conditions ship with the script:
- Consensus Bull Entry — regime has just entered Consensus Bull
- Consensus Bear Entry — regime has just entered Consensus Bear
- Consensus Bull Flip — direct Bear → Bull transition
- Consensus Bear Flip — direct Bull → Bear transition
- Extreme Bullish Agreement — agreement crosses the extreme threshold up
- Extreme Bearish Agreement — same, on the bearish side
- Consensus Streak 20+ — current regime has held for twenty bars
🔹 Key Inputs
- Oscillator Periods — individual length settings for all ten oscillators
- Bullish / Bearish Thresholds — the normalized levels that define a vote
- Consensus Threshold — how many oscillators must agree for a regime (default 7/10)
- Extreme Agreement — agreement percentage for extreme events (default 80%)
- Consensus Zones — show/hide, ATR length and multiplier, max active count,
closed zone trail
- Label Cooldown — minimum bars between flip labels, prevents clutter
- Merge Flip + Extreme — combine same-bar events into one label
- Panel — six location options, Dark/Light theme, font sizes
🔹 How to Use
Trend traders: wait for a Consensus Bull or Consensus Bear regime to
establish (streak > 5 bars), then use pullbacks into the active Consensus
Zone as entries in the regime direction. Exit on opposite regime flip.
Reversion traders: Extreme Agreement events mark moments where all
oscillators are stretched in the same direction. These are classic mean
reversion setups. Wait for a regime flip against the extreme, confirmed on
the next bar.
Regime filter: overlay the panel on any chart and use the Regime and
Agreement readings as a binary filter for your primary system. Only take
longs when regime is Bull, only take shorts when regime is Bear.
Works on all timeframes from 1m to 1W. Higher timeframes produce fewer
but higher-conviction signals.
🔹 Limitations & Transparency
- The oscillator votes use normalized thresholds. On extremely narrow
ranges, the normalization may produce unstable votes. Raising the
Bullish/Bearish Thresholds reduces this sensitivity.
- Consensus Zones are drawn from close price at the flip bar. Large wick
bars may place the zone slightly away from the visual pivot.
- The script is not a standalone trading system. It is a confluence and
regime tool to combine with your own structure, volume, or price action
analysis.
- All signals repaint only within the current forming bar. Once a bar
closes and barstate.isconfirmed is true, flip labels and zones are final.
🔹 Risk Disclosure
This indicator is provided for educational and analytical purposes only.
It is not financial advice. Trading involves substantial risk. Past
behavior of regime transitions does not guarantee future performance.
Always use proper risk management and never risk more than you can afford
to lose. Indicator

Kaufman Efficiency Ratio Gate [NovaLens]Kaufman Efficiency Ratio Gate is a regime classifier that separates trending markets from choppy ones. Instead of plotting a raw ratio and leaving you to interpret thresholds, it ranks the current Kaufman Efficiency Ratio within its own recent history and outputs a binary gate: trend-favorable or chop-dominant. Five timeframe-specific presets ship ready to use - pick the one matching your chart.
◉ HOW IT WORKS
The Efficiency Ratio measures how much of price's total movement was directional over N bars:
ER = |Close - Close(N)| / Σ|Close(i) - Close(i-1)|
A value near 1.0 means price moved in a straight line - maximum efficiency. A value near 0 means price covered distance but went nowhere net - noise. Perry Kaufman introduced this in "Trading Systems and Methods" (1995) as the foundation for his Adaptive Moving Average.
Raw ER values are hard to threshold because what counts as "efficient" varies by asset and timeframe. This gate solves that with a three-stage pipeline:
• Light EMA smoothing - removes single-bar noise from the raw ER without adding meaningful lag (Smoothing = 2 for most presets).
• Percentile rank - ranks the smoothed ER within its own rolling window. A reading at the 70th percentile means the current efficiency is higher than 70% of recent history. This is what makes the gate self-normalizing. A "trending" efficiency ratio for Gold might sit at 0.45, while for a volatile altcoin it might be 0.25 - the gate adjusts automatically to each asset's own baseline, so you never need to guess at fixed thresholds.
• Symmetric hysteresis - the gate opens when rank crosses above the median + Stability/2, and closes when rank drops below the median - Stability/2. This prevents flicker at the boundary. A small buffer (Stability = 2) is enough because KER is already a clean ratio.
Other regime tools approach this differently. ADX measures trend strength through smoothed directional movement - it tells you how strong a trend is, but its fixed scale means a reading of 25 carries different weight on different instruments. The Choppiness Index compresses ATR relative to the window's price range into a 0-100 scale - useful, but sensitive to window length and not inherently normalized. The Efficiency Ratio takes a more direct route: what fraction of total movement was net directional? And the percentile-rank layer on top makes that reading self-normalizing across any asset or timeframe - no manual threshold tuning required.
The result is a binary state: trend-favorable (gate open) or chop-dominant (gate closed).
◈ HOW TO READ IT
• Teal background / teal hero line - Gate open. The market's directional efficiency is above its recent median. Trend-following setups tend to perform better in this environment.
• Amber background / amber hero line - Gate closed. Efficiency is below the median - price is moving but not going anywhere. Trend-following setups historically tend to underperform in this environment.
• Bright teal (strong trend) - Smoothed KER is in the top 25% of its recent rank window. The trend is unusually clean - continuation setups tend to be cleaner in this state.
• Bright amber (strong chop) - Smoothed KER is in the bottom 25%. Noise is dominant - even range-bound strategies may find fewer clean entries. Generally a low-opportunity environment.
The info panel (top-right) shows the current gate state, smoothed KER value, percentile rank, and a momentum readout (strengthening / weakening / stable) based on how the rank has moved over the last few bars.
✦ HOW WE USE IT - REGIME FILTER
In systematic trading, the Efficiency Ratio often serves as one of the regime filters applied before a trend-following signal gets capital allocation. The idea is to confirm that the market is actually trending efficiently, not just moving.
When the gate is open (teal), directional efficiency is elevated. Pullback entries, breakout continuations, trend-following MA crosses - these setups tend to perform better because price is converting movement into net progress. When the gate closes (amber), the same setups historically tend to underperform. Price is volatile but going nowhere. In choppy regimes, trend-following systems generally struggle, and while mean reversion may be more favorable, it remains a harder environment to trade overall. Many systematic traders use this kind of regime awareness to reduce exposure or adjust position sizing rather than forcing directional bets.
The gate works well as a context overlay alongside other entry signals. It doesn't indicate which direction to trade, but it helps characterize whether the current environment is rewarding directional movement at all.
What the gate is NOT: a forward predictor. It classifies the recent past. A gate-open reading means efficiency has been high - it doesn't guarantee the next bar will trend. It's a filter, not a crystal ball.
◆ OTHER APPLICATIONS
• Entry filter - pair with any trend-following signal (MA cross, breakout, RSI) and add a gate-open condition. Filtering out chop regimes can help reduce whipsaw entries.
• Multi-timeframe confirmation - checking the gate on a higher timeframe before entering on a lower one can add confidence. For example, a Daily gate-open reading alongside a 4H trend entry.
• Regime-aware sizing - some traders scale position size with regime state, increasing exposure during gate-open periods and reducing it when the gate closes.
• Alert-driven workflow - set alerts on gate open/close transitions and check your trend setups only when the gate fires.
⚙ SETTINGS
Preset (default: Daily) - Timeframe-specific parameter bundles. Select the one matching your chart resolution:
• Weekly - KER 10, Smoothing 2, Rank Window 100, Stability 2. Long context window for position traders.
• Daily - KER 8, Smoothing 2, Rank Window 50, Stability 2. The default. Works well on most daily charts.
• 8H - KER 8, Smoothing 2, Rank Window 50, Stability 2. Starting point same as Daily - validate on your own 8H charts.
• 4H - KER 14, Smoothing 2, Rank Window 30, Stability 2. Wider KER period compensates for noisier intraday data.
• 30m - KER 5, Smoothing 5, Rank Window 30, Stability 2. Short KER period with heavier smoothing for fast charts.
• Custom - Drive the gate from the four inputs below.
KER Period - Lookback for the raw Efficiency Ratio. Shorter (5-8) reacts faster to regime changes. Longer (14-20) gives more stable readings but lags transitions.
Smoothing - EMA applied to the raw KER. Set to 1 for no smoothing. KER is self-normalizing by construction, so low values (1-5) are usually enough.
Rank Window - Rolling window for the percentile rank. Controls how much recent history defines "typical." Shorter windows adapt faster; longer windows give more stable context.
Stability - Hysteresis half-width around the 50th percentile. At 0, the gate flips the instant rank crosses the median. At higher values, the gate requires a stronger signal to switch state. Low values (2-5) work well since KER is already a clean signal.
Display toggles:
• Show Raw KER - thin white line showing the unsmoothed ratio
• Show Median - 50th-percentile reference line on the smoothed KER
• Show Background - teal/amber background wash (turn off if your workspace already signals the regime elsewhere)
• Show Info Panel - gate state, KER, rank, and momentum readout
• Light Theme - flips panel colours for light chart backgrounds
△ LIMITATIONS
• Backward-looking - the gate classifies recent efficiency, not future direction. Regimes can shift faster than the rank window catches, especially around news events.
• Directionless - both strong uptrends and strong downtrends produce gate-open readings. A separate directional indicator is needed to determine which side to trade.
• Noise on thin instruments - short KER periods on low-volume assets can produce noisy readings even with smoothing.
• History requirement - percentile rank needs sufficient data to be meaningful. The first ~50-100 bars on any chart (depending on preset) will have unstable rankings.
⌁ NOTES
• Based on Perry Kaufman's Efficiency Ratio from "Trading Systems and Methods" (1995)
• Cross-validated against our PyneCore Python reference implementation.
• Parameters were tuned on gold (XAUUSD) via the NovaLens research pipeline. The same presets generalize reasonably to other assets - though testing on your own instruments is always recommended.
• Regime palette: teal = trend-favorable, amber = chop-dominant. Not green/red - this is a state classifier, not a directional signal.
If you find a Custom parameter set that works well on a different instrument, the comments are a good place to share it. Indicator

AG Pro Inducement & Trap Quality [AGPro Series]AG Pro Inducement & Trap Quality
OVERVIEW / WHAT IT DOES
AG Pro Inducement & Trap Quality is an overlay tool built to map short-lived trap behavior around smaller inducement levels rather than broad market structure alone. The script focuses on moments where price appears to invite participation through a nearby internal level, briefly pushes beyond that level, and then reclaims it quickly enough to suggest failed continuation pressure.
In practical terms, this tool is designed to highlight a very specific type of behavior: local liquidity engineering around minor swing references. Instead of treating every sweep as equally meaningful, it evaluates whether the move shows the characteristics of a more deliberate trap sequence. This helps separate routine noise from cleaner rejection events that may deserve closer attention.
The script identifies compact inducement references, monitors whether those levels are exceeded, and then evaluates the quality of the reclaim using a rules-based scoring model. The output is intentionally visual and compact: trap labels, score readouts, engineered-liquidity context, and a lightweight status panel that keeps the chart readable while still surfacing the most important state information.
This is not a broad “smart money everything” overlay, and it is not a general market-structure engine. Its role is narrower and more specific: to help users study micro trap behavior around inducement levels with a structured, visual framework.
UNIQUE EDGE
Many trap-style overlays simply mark local sweeps or label wick rejections without distinguishing between low-quality noise and more organized rejection behavior. This script takes a narrower path.
Its core distinction is that it is built around inducement-first logic. The process begins with smaller internal swing references that may function as local liquidity magnets. From there, the script evaluates whether price briefly runs that level and reclaims it with enough quality to qualify as a more meaningful trap event.
This makes the script materially different from tools that primarily map:
- full structure breaks,
- broad liquidity sweeps across larger swing highs and lows,
- order blocks or fair value gaps,
- or generic reversal candles.
The objective here is not to classify the whole market. The objective is to organize one specific event class: short-lived inducement failure and trap quality around internal levels.
METHODOLOGY
1) Inducement level detection
The script scans for smaller swing references that can function as local inducement levels. These are not intended to replace major support or resistance logic. They serve as nearby internal references around which short-term trap behavior may form.
2) Sweep and reclaim logic
After an inducement level is identified, the script monitors whether price briefly trades beyond that level. A trap candidate is only considered when the move fails to sustain beyond the level and price reclaims the reference within a limited confirmation window.
3) Quality model
Each trap candidate is scored using a rules-based quality framework. The score is not arbitrary. It is derived from components such as:
- reclaim speed,
- relative volume behavior,
- wick proportion,
- and overshoot control.
The purpose of the score is not prediction. It is prioritization. A higher score suggests that the rejection characteristics were cleaner according to the script’s internal rules.
4) Engineered liquidity context
When inducement logic becomes active, the script can visualize engineered-liquidity context so users can see where price is interacting with a recently relevant internal level. This is meant to improve readability and sequencing, not to imply certainty.
5) Visual decluttering and presentation controls
To keep the overlay usable, the script includes compact labeling, importance filtering, label spacing controls, and a small status panel. These features are presentation tools designed to reduce clutter without changing the underlying trap logic.
SIGNALS & ALERTS
The script can visualize bull and bear trap events after inducement-level interaction and reclaim confirmation.
Typical readouts include:
- TRAP labels,
- quality score values,
- inducement / engineered-liquidity context,
- and panel status information such as recent trap state and current watch state.
Alert conditions are designed around deterministic script events rather than discretionary interpretation. As with any alert-based study, users should confirm how they want to use those events inside their own workflow before relying on them in live conditions.
KEY INPUTS
Important controls typically include:
- inducement swing sensitivity,
- confirmation window / reclaim timing,
- volume and wick weighting inputs,
- overshoot tolerance,
- compact label display,
- importance filtering,
- panel visibility and position,
- and vertical label offset controls.
These settings allow the user to decide whether they want broader coverage or a stricter, more selective readout.
HOW THIS DIFFERS FROM OTHER AG PRO TOOLS
This script is intentionally specialized.
It is not a BOS / CHoCH engine and does not attempt to label full structural transitions.
It is not an order block tool and does not frame the chart through block logic.
It is not a fair value gap map and does not organize imbalance zones as its primary lens.
It is not a broad liquidity sweep tool built around larger external swing raids.
Instead, this script concentrates on micro inducement behavior: smaller internal references, brief level violations, fast reclaim structure, and the relative quality of the resulting trap.
That narrower scope is the point. The script is designed to help users study one recurring behavior class in a more disciplined and readable way.
LIMITATIONS & TRANSPARENCY
This script is a visual and analytical aid. It does not know intent, news context, execution conditions, or participant positioning.
A trap label does not guarantee reversal.
A higher quality score does not guarantee continuation.
A low-quality score does not mean the area is irrelevant.
Internal inducement levels can vary in significance depending on volatility regime, instrument behavior, and timeframe selection.
Like any rules-based overlay, this script is sensitive to parameter choices. More permissive settings may surface more events but also more noise. Stricter settings may improve selectivity while naturally reducing signal frequency.
Users should also understand that inducement and trap concepts are interpretive by nature. This script translates those ideas into a deterministic ruleset for chart study. That conversion is useful, but it is still a model.
RISK DISCLOSURE
This script is for chart analysis and educational use. It is not financial advice, not a trade signal service, and not a promise of outcome.
All trading and investing involve risk. Market conditions can change quickly, and no indicator or overlay can eliminate uncertainty. Users should evaluate signals in context, apply their own risk management, and avoid treating any single chart tool as a complete decision system.
WHAT THIS SCRIPT IS NOT
To make the scope clear, this script is not:
- a guaranteed reversal detector,
- a one-click trade system,
- a full market-structure replacement,
- or a standalone execution model.
It is a focused overlay for studying inducement-driven trap behavior with a cleaner visual framework.
NOTES
Best use cases typically come from combining this script with context that the user already trusts, such as trend structure, higher-timeframe location, or broader execution rules. The tool is intended to improve organization and observation around inducement and trap sequences, not to replace judgment.
If you prefer a cleaner chart, use the compact display and importance filter settings. If you prefer a more exploratory workflow, relax the filter and study how the scoring reacts across different conditions.
Indicator

AlphaX Consolidation Engine Squeeze Detection Breakout SignalsAlphaX Consolidation Engine — Squeeze Detection, Breakout Signals & Range Intelligence
AlphaX Consolidation Engine is a professional-grade volatility and range analysis system built on a proprietary 5-Factor Consolidation Scoring engine. It identifies low-volatility compression zones, tracks range boundaries in real-time, and delivers high-probability breakout signals governed by institutional-grade confluence filters. Designed for traders who want to capture explosive moves after periods of market calm on instruments like XAUUSD, indices, and forex majors.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📸 Visual Overview
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 The Consolidation Engine — How It Works
At the core of AlphaX Consolidation Engine is the 5-Factor Consolidation Score — a proprietary composite metric calculated on every bar to determine if the market is truly compressing or just moving sideways. It evaluates five independent volatility and trend factors:
ATR Percentile — Measures if current volatility is historically low compared to recent price action
Bollinger Band Width — Detects price compression via narrowing band width percentiles
TTM Squeeze — Confirms energy building when Bollinger Bands sit inside Keltner Channels
Linear Regression Slope — Mathematically confirms flat price movement (lack of directional bias)
ADX Filter — Validates the absence of a strong trend (ranging market confirmation)
Each factor contributes to a score from 0 to 100. When the score exceeds the threshold (default 50), the market is marked as Consolidating .
The system then tracks the Active Range — the high and low boundaries established during the consolidation period. This range is visually displayed as a shaded box with dotted boundary lines.
Consolidation Zone expanding as price compresses — darker shading indicates higher confidence
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Four Signal Layers
AlphaX Consolidation Engine produces four distinct types of signals, each with a specific role in the trade lifecycle:
1 ─ Consolidation Zones (Shaded Boxes)
Shaded boxes with dashed borders marking confirmed consolidation areas
These are not entry signals but context markers . When a box appears, it tells you the market is building energy. The box expands dynamically as the range widens during compression. When the box border changes color (Green for Bull, Red for Bear), it indicates a breakout has occurred.
Green Box — Bullish consolidation context
Red Box — Bearish consolidation context
Gray/Neutral — Forming or weak consolidation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2 ─ Breakout Labels ( ▲ / ▼ )
www.pulsewire.com
Primary breakout labels appearing when price escapes the consolidation range with confidence
These are the primary entry signals . A label appears when price closes beyond the range boundary with sufficient momentum and volume.
How the breakout is detected:
Price closes beyond Range High/Low + ATR Threshold
Candle body is strong (no weak wicks)
Volume confirms the move (optional filter)
Confidence Score meets minimum threshold
Once a breakout label fires, it sets the directional bias . The system then switches from "Range Tracking" mode to "Trend Follow" mode for that specific setup.
▲ Green Label (Bull Breakout) — Dark text on bright green background for maximum readability
▼ Red Label (Bear Breakout) — White text on deep red background for maximum readability
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3 ─ Retest Entries ( ▲ RETEST / ▼ RETEST )
Secondary entry signals appearing when price pulls back to the breakout level and holds
Breakouts often fake out before continuing. The Retest Engine monitors for price returning to the breakout level (old range high/low) within a configurable window.
▲ RETEST (Teal) — Price pulled back to bull breakout level, held support, and confirmed with bullish candle
▼ RETEST (Light Red) — Price rallied back to bear breakout level, rejected resistance, and confirmed with bearish candle
Retest signals often offer better risk-to-reward than the initial breakout because the stop loss can be placed tighter around the retest candle.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4 ─ Exit Markers ( ✕ )
Small X marks indicating where the system detects trend exhaustion or reversal — time to consider taking profit
Exit signals appear as small marks and fire only after an entry has occurred. This prevents premature exit markers from cluttering the chart during strong trends.
TRAIL — Price hit the dynamic ATR trailing stop
FAILED — Price re-entered the original consolidation range (failed breakout)
FLIP — Opposite breakout signal fired (trend reversal)
Exit markers indicate that the trade thesis is no longer valid . Use them to close positions or tighten stops manually.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 Multi-Confluence Confidence Scoring
Every breakout signal is scored by a real-time confidence engine that evaluates multiple independent factors and produces a score from 0 to 100. Only signals meeting your configured Min Breakout Confidence % threshold are displayed.
The scoring factors include:
Squeeze Quality (up to 20 points)
Was the TTM Squeeze active immediately before breakout?
Higher scores for breaks occurring after prolonged squeeze conditions
Consolidation Quality (up to 15 points)
How high was the 5-Factor Consolidation Score during the range?
Scores higher for "Extreme" or "Strong" consolidation zones vs "Weak" ones
Duration Bonus (up to 10 points)
Longer consolidation periods typically yield stronger breakouts
Scores increase for ranges lasting >15 bars
Volume Confirmation (up to 15 points)
Volume on the breakout bar relative to the 20-bar average
Volume bias during consolidation (Accumulation vs Distribution) adds/subtracts points
Momentum Alignment (up to 17 points)
MACD Histogram direction and strength
EMA Alignment (Fast vs Slow)
RSI position (not overextended)
Candle Quality (up to 5 points)
Body-to-range ratio of the breakout candle
Strong bodies score higher than wicky candles
Penalty Deductions
RSI overextension (already too high/low) — up to -8 points
Contradicting Volume Bias — up to -12 points
EMA against trend — up to -5 points
The default minimum confidence is set to 35% — optimized to filter noise while capturing valid setups. Increase to 50–60% for higher probability but fewer signals.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡 Range Intelligence & Volume Bias
Understanding what happened inside the range is key to predicting the breakout direction. AlphaX Consolidation Engine tracks volume flow during consolidation:
Accumulation — More bullish volume during consolidation suggests upward breakout probability
Distribution — More bearish volume during consolidation suggests downward breakout probability
Neutral — Balanced volume suggests a wait-and-see approach
This bias is factored into the Confidence Score. A bullish breakout with bearish accumulation bias receives a penalty, reducing the likelihood of a false signal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Choppy / Ranging Markets — When NOT to Trade
Knowing when to stay out is just as important as knowing when to enter. AlphaX Consolidation Engine is designed to help you identify the chop so you can trade the break.
How to identify low-probability conditions:
No Consolidation Box — If the 5-Factor Score never reaches threshold, the market is too noisy. No box = no edge.
Low Confidence Scores — If breakout labels rarely appear, the market lacks directional conviction.
Frequent "FAILED" Exits — If multiple breakouts immediately re-enter the range, the market is still ranging despite brief spikes.
Dashboard Shows "NEUTRAL" — If Vol Bias and Momentum are conflicting, wait for clarity.
What to do during low-confidence periods:
Do not force entries — wait for the Consolidation Score to rise
Wait for the Confidence Score on the breakout label to exceed 50%
Look for the Retest signal instead of the initial breakout for better confirmation
Consider switching to a higher timeframe to find the broader range structure
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Dashboard Intelligence
A comprehensive dashboard provides real-time metrics at a glance:
Consol Score — Current 5-Factor score (0-100) and intensity (Weak/Mod/Strong/Extreme)
State — Active, Forming, or None
TTM Squeeze — Status and bar count
Range Info — High/Low levels, Width in ATR, Price Position %
Vol Bias — Accumulation vs Distribution percentage
Momentum — RSI, MACD, EMA Trend status
Breakout Conf — Current Bull/Bear confidence scores and tiers (S/A/B)
Trade Status — Position direction and Open P&L
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX Consolidation Engine — Step by Step
Step 1 — Identify Consolidation
Wait for a shaded Consolidation Box to appear
Check the Dashboard: Is Consol Score > 50? Is Squeeze ON?
If no box → do not trade. Wait for compression.
Step 2 — Wait for Breakout Label
A Green ▲ or Red ▼ label appears when price escapes the box
Check the Confidence % on the label (e.g., "A 65%")
If confidence is below your minimum → wait.
www.pulsewire.com
Complete trade flow: Consolidation Box → Breakout Label → Retest → Exit
Step 3 — Enter on Breakout or Retest
Aggressive: Enter on the Breakout Label close
Conservative: Wait for the RETEST label after the breakout
Place stop loss below the breakout candle or opposite side of the range
Step 4 — Manage with Trailing Stop
The system plots a dynamic trailing stop line (stepped line)
Stay in the trade as long as price does not cross the line
Add to position on additional Retest signals if trend is strong
Step 5 — Exit on Signal
When a ✕ mark appears, the system detects exhaustion or reversal
Close position or tighten stop manually
Wait for the next Consolidation Box to form for the next cycle
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🔬 Proprietary 5-Factor Consolidation Scoring (ATR, BB, KC, LR, ADX)
☁ Dynamic shaded consolidation zones with auto-expanding boundaries
🏷 Confidence-scored breakout labels (S/A/B Tier) with readable text colors
▲▼ High-probability retest entries after breakout confirmation
✕ Smart exit markers (Trail/Failed/Flip) to protect profits
🧠 Multi-factor confidence scoring — squeeze, volume, momentum, candle quality
📊 Volume Bias Analysis — tracks accumulation vs distribution inside ranges
📈 Comprehensive Dashboard — real-time range, momentum, and trade stats
🎨 Cohesive dual-tone color theme — Green for bull, Red for bear, Gray for neutral
🔔 15+ alert conditions — consolidation, squeeze, breakouts, retests, and exits
⚙ Fully configurable — all scoring weights, thresholds, and visuals adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Consolidation Detection
ATR / BB / KC Periods — Core volatility calculation lengths
Squeeze Percentile — Threshold for defining "low volatility"
Min Consolidation Bars — Minimum bars required to confirm a range
LR Slope Threshold — Sensitivity for detecting flat price action
Breakout Settings
Breakout ATR Threshold — How far price must close beyond range
Breakout Volume Ratio — Minimum volume required on breakout bar
Min Breakout Confidence % — Filter for signal quality (Default 35%)
Require Close Beyond Range — Prevents wick fake-outs
Momentum Confirmation
RSI / MACD / EMA Periods — Used for confidence scoring
RSI Levels — Overbought/Oversold thresholds for scoring penalties
Exits
Trailing Stop ATR Multiple — Distance for dynamic stop loss
Exit on Re-Enter Range — Close trade if price falls back into consolidation
Exit on Opposite Breakout — Close trade if reverse breakout occurs
Appearance & Dashboard
Show Consolidation Zones / Lines / Dots — Toggle visual elements
Label Size / Dashboard Text — Adjust readability
Colors — Fully customizable bull/bear/neutral palette
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions
Consolidation Detected — Fires when a new range is confirmed
Squeeze Activated / Released — TTM Squeeze state changes
Extreme Squeeze — Consolidation Score > 80
S/A/B-Tier Bull/Bear Breakout — Confidence-based breakout alerts
Bull/Bear Retest Entry — Pullback entry signals
Any Exit — Trail, Failed, or Flip exit signals
All alert messages include {{ticker}} and {{interval}} placeholders for clean webhook integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Default Settings — Optimized For
The default configuration is specifically tuned for XAUUSD (Gold) and Major Indices on the 5-minute timeframe :
Confidence threshold at 35% filters out low-quality noise while keeping valid setups
ATR and BB periods calibrated for intraday volatility profiles
Volume filters enabled to prevent low-liquidity fakeouts
Trailing stop set to 2.0 ATR for breathable trend following
For other instruments or timeframes, adjust:
Higher timeframes (1H, 4H) — Increase Min Confidence to 45–55%, increase ATR periods
Forex majors — Reduce Min Confidence to 25–30%, enable Strict Volume Filters
Crypto — Increase ATR Thresholds (higher volatility), increase Trailing Stop multiple
Less noise — Increase Min Confidence %, Increase Min Consolidation Bars
More signals — Decrease Min Confidence %, Disable Volume Filters
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🥇 Breakout Traders — Specifically designed to capture volatility expansions after compression
📉 Range Traders — Visual boxes help identify support/resistance boundaries clearly
📊 Index & Gold Traders — Tuned for assets with distinct consolidation/expansion cycles
🧠 Systematic Traders — Confidence scoring provides a quantitative framework for entry selection
📈 Traders who value clean charts — No indicator soup. Boxes, labels, and a dashboard.
⚠ Traders who struggle with choppy markets — The 5-Factor Score physically prevents signals during low-quality ranges
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All calculations are non-repainting — signals are confirmed on bar close
Dashboard updates on the last bar only for performance optimization
Maximum 500 labels and 500 bars lookback are used — on very low timeframes, oldest labels may be automatically removed by PulseWire's rendering limits
Volume Bias requires volume data — may be less accurate on forex pairs without tick volume
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who demand clarity, confidence, and precision from their charts. Indicator

ADXVMA Multi-TF Overlay & Alerts [HYPR-run]DESCRIPTION:
ADXVMA across three lookback periods on one chart. A moving average that
uses the ADX (Average Directional Index) as its smoothing factor; fast in
trends, flat in chop. Price crossing above or below a selected ADXVMA
fires a webhook-ready alert for automated execution.
Based on Linnsoft's ADXvma implementation, combining Chande's Variable
Moving Average (VIDYA) with Wilder's ADX as the volatility measure. When
ADX is high (strong trend), the MA tracks price closely. When ADX is low
(choppy), the MA barely moves. This makes it naturally adaptive without
manual adjustment.
DISCOVERING EDGE
Adaptive MAs are popular (KAMA, VIDYA, DEMA), but most still treat
every directional change as a trend signal, producing false signals. This indicator adds a fuzzy factor dead zone that creates a third state, "fuzzy flat" that must exceed a noise threshold
before registering a directional change. We found the fuzzy flat signal to be a powerful signal for confirming consolidation within a trend on shorter look back periods and with the longer period for identifying ranging distribution/accumulation regimes.
Fuzzy ADXVMA vs ADXVMA
The fuzzy dead zone forces a consolidation state (yellow
flat) where a pivot or trend change would present otherwise. When the MA finally turns green or
red, it exceeds the noise floor and considered a more reliable directional
commitment, not a minor fluctuation.
- Flat duration before the cross determines signal quality; XO after
15+ bars flat = base resolved (high conviction), XO after 3 bars
flat = noise (low conviction).
- 7-tier regime gradient (D Trend at score 5 down to Potential Chop
at 0) shows the trend proving itself bar by bar across multiple
lookbacks.
- Two alert systems with multi-layer filtering (not vanilla crossovers).
Regime-confirmed fires only at early pivots. Volatility-confirmed
fires only when bar participation validates the MA shift.
FEATURES
- Three lookbacks: short, long, weekly
- Fuzzy flat detection (dead zone prevents false trend changes in chop)
- Optional ATR volatility scaling (shorter period in high-vol regimes)
- Dashboard with 7-tier regime gradient and event badge
- Two alert systems with multi-layer filtering (not vanilla crossovers)
- Regime-confirmed: price vs ADXVMA, only at early pivots (score 1-2)
- Volatility-confirmed: ADXVMA momentum shift + ATR bar expansion
- Select which lookback triggers regime-confirmed alerts
- Color-coded: green (up), red (down), yellow (flat)
- Dashboard dark/light theme toggle for any chart background
HOW IT WORKS
ADX measures trend strength on a 0-1 scale and feeds it directly into
the MA smoothing factor. High ADX = MA tracks price. Low ADX = MA holds
still. The fuzzy factor adds a dead zone so tiny movements register as
flat instead of false trend changes. Three simultaneous lookbacks give
you short-term, medium-term, and weekly context without switching charts.
DASHBOARD
Regime state at a glance. The header row shows a badge that flags
conflicting events; the second row shows the current regime label with
a 7-tier color gradient; the third row shows direction pivot events.
ALERTS
Two independent alert systems, both multi-layer filtered. Regime-confirmed:
the regime pivot is the signal; price crossing the selected ADXVMA is just
the trigger. Only fires at early pivots (score 1-2), ignoring mid-trend
crosses entirely. Volatility-confirmed: the ATR bar expansion is the
signal; the ADXVMA momentum shift is the trigger. Only fires when the bar
shows real participation (high/low extends beyond open +/- ATR), ignoring
low-range bars. Both fire JSON payloads; works with any webhook receiver.
CREDITS
ADXVMA: Linnsoft
ADX: J. Welles Wilder (1978)
VIDYA: Tushar S. Chande, TASC March 1992 Indicator

Indicator

Candle DNA Strand█ CANDLE DNA STRAND
A unique lower-panel indicator that visualizes candle structure as a stylized double-helix pattern. One strand represents body dominance (open-close range) while the other represents wick proportion (shadow-to-body ratio). The strands twist around a center axis with color encoding for bullish/bearish bias, revealing candle character patterns over time in an intuitive DNA-inspired format.
█ CONCEPT
Traditional candlestick analysis focuses on individual candle patterns. The Candle DNA Strand takes a different approach by decomposing every candle into two core metrics and plotting them as intertwined waves:
• Body Strand — Measures how much of each candle is "body" (the filled portion between open and close). High body ratios indicate conviction and directional commitment.
• Wick Strand — Measures how much of each candle is "shadow" (upper and lower wicks combined). High wick ratios indicate rejection, indecision, or failed attempts at direction.
These two strands are phase-offset by 180° to create the classic double-helix DNA appearance. As you scroll through the chart, you can visually identify periods of conviction (body-dominant) versus indecision (wick-dominant), and how candle character evolves over time.
█ HOW IT WORKS
The indicator calculates two normalized ratios for each candle:
Body Ratio = |Close - Open| / (High - Low)
Wick Ratio = (Upper Wick + Lower Wick) / (High - Low)
These ratios are smoothed and then modulated onto sine waves that twist around a center axis at the 50 level. The amplitude of each strand reflects the strength of that metric — larger bodies push the body strand further from center, and larger wicks push the wick strand further out.
The strands are color-coded by the current candle's bias:
• Bullish candles (close ≥ open) → Neon green tones
• Bearish candles (close < open) → Neon red tones
█ TRADE ZONES
The indicator includes an optional Trade Zone detection system based on candle character analysis:
◉ LONG ZONE (Green Background)
Triggers when:
• Average body ratio exceeds the Body Dominance Threshold (default 65%)
• Bullish momentum score > 40% (more bulls than bears in lookback period)
• Average wick ratio below the Wick Rejection Threshold (default 55%)
This identifies periods where price is moving up with conviction — strong bullish bodies with minimal rejection wicks.
◉ SHORT ZONE (Red Background)
Triggers when:
• Average body ratio exceeds the Body Dominance Threshold
• Bearish momentum score > 40% (more bears than bulls in lookback period)
• Average wick ratio below the Wick Rejection Threshold
This identifies periods where price is moving down with conviction — strong bearish bodies with minimal rejection wicks.
◉ CHOP/INDECISION
When the average wick ratio exceeds 60%, the market is showing high rejection and indecision. The DNA strands will show wick dominance during these periods.
Triangle markers appear at zone entry points:
• ▲ Green triangle below the helix = Long zone entry
• ▼ Red triangle above the helix = Short zone entry
█ VISUAL ELEMENTS
DNA Strands
Two intertwined lines representing body and wick ratios, twisting around the center axis with a configurable wavelength.
Base Pair Connectors
Vertical lines connecting the two strands at regular intervals, mimicking the "rungs" of a DNA ladder. These help visualize the spread between body and wick metrics.
Nucleotide Nodes
Small circular markers along each strand showing individual data points.
Fill Zone
Subtle gradient fill between the strands for visual depth. The fill color matches whichever strand is currently on top.
Info Label
Displays current values at the right edge of the chart:
• Current bias (BULL/BEAR)
• Body and Wick percentages
• Active trade zone (if any)
█ PATTERN DETECTION
The indicator automatically detects significant candle patterns based on DNA metrics:
DOJI — Body ratio < 15%
Very small body relative to total range. Indicates indecision.
MARUBOZU — Body ratio > 85%
Almost no wicks. Strong conviction candle with price closing near the high (bullish) or low (bearish).
HAMMER — Wick ratio > 60% with lower wick > 2× upper wick
Long lower shadow showing rejection of lower prices.
SHOOTING STAR — Wick ratio > 60% with upper wick > 2× lower wick
Long upper shadow showing rejection of higher prices.
█ SETTINGS
DNA Helix Settings
• Helix Wavelength — Number of bars for one complete DNA twist cycle (default: 20)
• Helix Amplitude — Vertical spread of the strands from center (default: 35)
• Show Base Pair Connectors — Toggle the connecting rungs (default: On)
• Connector Frequency — Draw a connector every N bars (default: 2)
• Data Smoothing — SMA length for smoothing ratios (default: 3)
• Strand Thickness — Line width for the DNA strands (default: 2)
Trade Zone Settings
• Show Trade Zones — Toggle background highlighting and entry signals (default: On)
• Zone Lookback — Bars to analyze for zone detection (default: 5)
• Body Dominance Threshold — Minimum avg body ratio for zone trigger (default: 0.65)
• Wick Rejection Threshold — Maximum avg wick ratio for zone trigger (default: 0.55)
Fluorescent Colors
• Bullish colors — Neon green and electric green variants
• Bearish colors — Neon red and hot pink variants
• Axis, connector, and zone colors are all customizable
Visual Settings
• Show Nucleotide Nodes — Toggle the small circles on strands (default: On)
• Show Info Labels — Toggle the right-side information label (default: On)
• Show DNA Analysis Table — Toggle detailed analysis table (default: Off)
█ ALERTS
Four alert conditions are available:
1. Long Zone Entry
"Entered LONG zone - strong bullish momentum with conviction candles"
2. Short Zone Entry
"Entered SHORT zone - strong bearish momentum with conviction candles"
3. Doji Pattern
"Doji detected - indecision"
4. Marubozu Pattern
"Marubozu detected - strong conviction"
█ INTERPRETATION GUIDE
Reading the DNA:
When body strand dominates (further from center):
• Market is moving with conviction
• Candles have strong bodies, minimal wicks
• Trend is likely to continue
When wick strand dominates (further from center):
• Market is showing rejection/indecision
• Candles have long shadows relative to bodies
• Potential reversal or consolidation
Strand crossovers:
• When strands cross, character is shifting
• Body crossing above wick → increasing conviction
• Wick crossing above body → increasing indecision
Color consistency:
• Long stretches of green → sustained bullish pressure
• Long stretches of red → sustained bearish pressure
• Alternating colors → choppy, mixed market
█ BEST PRACTICES
1. Use with price context — The DNA strand shows candle character, not direction. Combine with price action on the main chart.
2. Adjust wavelength to timeframe — Shorter wavelengths (10-15) for scalping, longer wavelengths (25-40) for swing trading.
3. Trade zones are filters, not signals — Use zone entries as confirmation for your existing strategy, not as standalone signals.
4. Watch for character shifts — When the dominant strand changes, market behavior is changing. This often precedes reversals.
5. Multiple timeframe analysis — Check DNA character on higher timeframes to understand the broader context.
█ CREDITS
Developed by Hash Capital Research
Pine Script™ v6
This indicator is provided for educational and informational purposes. Always conduct your own analysis and manage risk appropriately. Indicator

Luminous Volume Delta [Pineify]Luminous Volume Delta — Volume Polarity Oscillator with Surge Detection & Momentum Cloud
The Luminous Volume Delta is a volume-based momentum oscillator that decomposes total volume into buying and selling pressure, calculates the net delta, and overlays a smoothed oscillator with signal line crossovers and intelligent volume surge detection. Unlike standard volume indicators that simply display bar-by-bar volume, this indicator estimates the directional intent behind each bar's volume by classifying it as buyer- or seller-dominated based on candlestick polarity. The result is a MACD-style oscillator built entirely on volume data, giving traders a clear, actionable view of when buying or selling pressure is genuinely shifting — and when a volume surge makes that shift especially significant.
Key Features
Intrabar volume polarity estimation that splits each bar's volume into buy volume and sell volume based on candlestick direction
Raw volume delta histogram with adaptive transparency — surge bars appear vivid while normal bars remain faded for instant visual prioritization
EMA-smoothed delta line paired with an SMA signal line for MACD-style crossover detection
Volume surge detection using a configurable threshold (default: 1.618× the 50-bar average volume) to highlight bars with unusually high market participation
Momentum Cloud fill between the smoothed delta and signal line that visually encodes whether buyers or sellers currently hold the momentum advantage
Filtered buy and sell signals that only trigger when crossovers occur in optimal territory — oversold for buys, overbought for sells
How It Works
The indicator follows a three-stage calculation pipeline that transforms raw volume into a normalized momentum oscillator:
Stage 1: Volume Polarity Classification
Each bar's total volume is classified based on the relationship between its open and close prices. Bullish bars (close > open) assign 100% of volume to buyers. Bearish bars (close < open) assign 100% to sellers. Doji bars (close = open) split volume equally between buyers and sellers, reflecting market indecision. This simple yet effective heuristic provides a practical approximation of order flow without requiring tick-level data.
Stage 2: Delta Calculation and Smoothing
The raw volume delta (buy volume minus sell volume) is calculated for each bar. A positive delta indicates net buying pressure; a negative delta indicates net selling pressure. This raw delta is then smoothed using an Exponential Moving Average (EMA) with the user-defined "Delta Smoothing Length" (default: 14 periods) to reveal the underlying trend in volume flow. A Simple Moving Average (SMA) signal line is computed over the smoothed delta using the "Signal Line Length" (default: 9 periods), creating a slower reference for crossover analysis.
Stage 3: Surge Detection
A 50-period SMA of total volume establishes the baseline average volume. When the current bar's volume exceeds this average multiplied by the surge threshold (default: 1.618, inspired by the golden ratio), the bar is flagged as a volume surge. Surge bars receive vivid histogram coloring (low transparency) while normal bars remain faded (high transparency), instantly drawing the trader's attention to moments of exceptional market participation.
Trading Ideas and Insights
Accumulation and Distribution Detection — Sustained positive raw delta (green histogram bars) indicates accumulation by buyers, while sustained negative delta (red bars) reveals distribution by sellers. The smoothed delta line confirms whether this pressure is building or fading.
Momentum Crossover Entries — When the smoothed delta crosses above the signal line, buying momentum is accelerating relative to its recent average. When it crosses below, selling momentum is taking over. These crossovers function identically to MACD signal crossovers but are driven purely by volume dynamics.
Surge-Confirmed Moves — Volume surges that coincide with a delta crossover carry significantly more weight than crossovers on normal volume. A vivid green surge bar appearing alongside a bullish crossover suggests strong institutional participation behind the move.
Divergence Analysis — When price makes new highs but the smoothed delta fails to confirm with new highs of its own, it signals weakening buying conviction — a classic bearish divergence. The inverse applies for bullish divergences at price lows.
Zero-Line Context — The zero line represents equilibrium between buying and selling pressure. Crossovers of the smoothed delta above zero confirm a shift to net buyer dominance; crossovers below zero confirm net seller dominance.
How Multiple Indicators Work Together
The Luminous Volume Delta integrates three complementary analytical techniques into a unified volume analysis system:
The volume polarity estimation provides the raw directional data, the dual moving average system (EMA + SMA) creates a momentum oscillator framework, and the surge detection layer adds a volatility filter — together forming a complete volume-momentum analysis toolkit.
The raw delta histogram gives bar-by-bar granularity, showing the immediate balance of buying versus selling pressure. However, raw data is inherently noisy, which is why the EMA-smoothed delta line is overlaid to extract the trend from the noise. The EMA was chosen over an SMA for the delta line because it front-weights recent data, keeping the oscillator responsive to sudden shifts in volume flow.
The SMA signal line intentionally uses a different averaging method (SMA rather than EMA) to create a smoother, more stable reference. This deliberate mismatch between EMA and SMA produces more meaningful crossover events — the faster EMA reacts to changes in volume pressure while the slower SMA confirms that the shift is sustained rather than transient.
The surge detection system operates independently from the oscillator but provides critical context. A crossover signal on normal volume may represent routine market fluctuation, while the same crossover accompanied by a volume surge (highlighted by vivid histogram coloring) suggests genuine conviction behind the move. The golden ratio threshold (1.618×) provides a mathematically balanced sensitivity that captures meaningful volume spikes without flagging every minor uptick.
The Momentum Cloud fill between the delta and signal lines synthesizes the relationship between these two components into a single visual element — green when the delta leads (bullish momentum advantage) and red when the signal leads (bearish momentum advantage).
Unique Aspects
Volume-native oscillator — While most oscillators are price-derived (RSI, Stochastic, MACD), this indicator builds its entire oscillator framework from volume data, providing a fundamentally different perspective on market momentum.
Adaptive transparency histogram — The dual-transparency system (15% for surges, 75% for normal bars) creates an automatic visual hierarchy that highlights the most important volume events without requiring the trader to scan for them manually.
Golden ratio surge threshold — The default 1.618× multiplier is rooted in the golden ratio, providing a naturally balanced detection sensitivity that has been observed to align well with significant volume expansion events across various markets and timeframes.
Zone-filtered signals — Buy signals require the crossover to occur in negative territory (oversold accumulation), and sell signals require it in positive territory (overbought distribution). This filtering eliminates low-conviction signals that occur in neutral mid-range territory.
Mixed MA crossover design — Using an EMA for the delta line and an SMA for the signal line is a deliberate design choice that balances responsiveness with stability, producing higher-quality crossover signals than same-type MA pairs.
How to Use
Add the Luminous Volume Delta indicator to your chart. It will appear in a separate panel below the price chart.
Observe the histogram bars for immediate volume delta context — green bars indicate net buying pressure, red bars indicate net selling pressure. Vivid (bright) bars signal a volume surge event.
Monitor the blue smoothed delta line and orange signal line for crossover signals. A bullish crossover (delta crossing above signal) in negative territory suggests accumulation is beginning. A bearish crossover in positive territory suggests distribution is starting.
Use the Momentum Cloud color to confirm the prevailing volume momentum direction — green cloud means buyers are in control, red cloud means sellers dominate.
Pay special attention when surge bars coincide with crossover signals — these high-volume crossovers carry significantly more conviction than normal-volume crossovers.
Watch for divergences between price and the smoothed delta line to identify potential trend exhaustion before it becomes visible in price action.
Combine with price action analysis, support/resistance levels, or trend-following indicators for additional confirmation before executing trades.
Customization
Delta Smoothing Length (default: 14) — Controls the EMA period applied to the raw volume delta. Increase for smoother, longer-term volume trend analysis (20-30); decrease for more responsive, shorter-term signals (7-10).
Signal Line Length (default: 9) — Controls the SMA period applied to the smoothed delta. Higher values produce fewer but more reliable crossover signals; lower values increase signal frequency at the cost of more noise.
Volume Surge Threshold (default: 1.618) — The multiplier of the 50-bar average volume that triggers surge highlighting. Increase to only flag extreme volume events (2.0-3.0); decrease for more sensitive surge detection (1.2-1.5).
Bullish / Bearish Colors — Customize the histogram and cloud fill colors to match your chart theme.
Delta Line / Signal Line Colors — Adjust the oscillator line colors for optimal visibility against your chart background.
Conclusion
The Luminous Volume Delta offers a methodologically distinct approach to momentum analysis by building its oscillator framework entirely from volume polarity data rather than price. By combining intrabar volume classification, dual moving average smoothing, and adaptive surge detection into a single cohesive system, it provides traders with insights that pure price-based indicators cannot deliver — specifically, who is in control (buyers or sellers), how strongly they are in control (surge vs. normal volume), and when that control is shifting (crossover signals filtered by momentum zone). Whether you are a day trader looking for volume-confirmed entries, a swing trader seeking accumulation and distribution patterns, or a position trader monitoring institutional participation, this indicator provides a structured, visually intuitive framework for understanding the volume dynamics that drive price movement.
Indicator

Market Force Oscillator Elite ProMarket Force Oscillator Elite Pro is a single-pane oscillator that combines acceleration, volume-weighted force, trend alignment, divergence logic, and multi-method cycle diagnostics.
How components work together:
- Force engine estimates buy/sell pressure from candle position, relative volume weighting, and optional momentum factor.
- Oscillator core combines acceleration with force and normalizes using robust scale logic (stdev with MAD fallback when stdev is unstable).
- Dynamic levels compute adaptive OB/OS using ATR percent with timeframe-aware auto calibration and a soft-cap transform.
- Trend filter compares LTF and HTF EMA direction before allowing directional signals.
- Signal quality gate combines oscillator magnitude, relative volume, and optional alignment weighting.
- Divergence module uses confirmed pivots with one-shot/cooldown modes.
- Cycle module computes Original Ehlers, Zero-Crossing, Peak-to-Peak, Autocorrelation, and Composite estimates.
What is new/original in this version (from current code):
- Multi-method cycle detector with Composite mode.
- Timeframe-aware ATR auto calibration for dynamic OB/OS behavior.
- ATR soft-cap compression to avoid overly wide bands on higher timeframes.
- Robust oscillator normalization with MAD fallback when stdev becomes outlier-like.
- Oscillator-pane marker anchoring (`location.absolute`) to prevent autoscale distortion from price-anchored shapes.
How to Use quickstart
1. Add the script to chart and start with `Preset = Balanced`.
2. Set `Cycle Detector Mode = Composite` for combined cycle diagnostics.
3. Enable `Show Detected Cycle (data window)` to inspect cycle outputs.
4. Enable advanced settings only if you need to tune quality gates, trend filter, and cooldowns.
5. Configure alerts from the 5 built-in alert conditions after threshold tuning.
Indicator

MERV: Market Entropy & Rhythm Visualizer [BullByte]The MERV (Market Entropy & Rhythm Visualizer) indicator analyzes market conditions by measuring entropy (randomness vs. trend), tradeability (volatility/momentum), and cyclical rhythm. It provides traders with an easy-to-read dashboard and oscillator to understand when markets are structured or choppy, and when trading conditions are optimal.
Purpose of the Indicator
MERV’s goal is to help traders identify different market regimes. It quantifies how structured or random recent price action is (entropy), how strong and volatile the movement is (tradeability), and whether a repeating cycle exists. By visualizing these together, MERV highlights trending vs. choppy environments and flags when conditions are favorable for entering trades. For example, a low entropy value means prices are following a clear trend line, whereas high entropy indicates a lot of noise or sideways action. The indicator’s combination of measures is original: it fuses statistical trend-fit (entropy), volatility trends (ATR and slope), and cycle analysis to give a comprehensive view of market behavior.
Why a Trader Should Use It
Traders often need to know when a market trend is reliable vs. when it is just noise. MERV helps in several ways: it shows when the market has a strong direction (low entropy, high tradeability) and when it’s ranging (high entropy). This can prevent entering trend-following strategies during choppy periods, or help catch breakouts early. The “Optimal Regime” marker (a star) highlights moments when entropy is very low and tradeability is very high, typically the best conditions for trend trades. By using MERV, a trader gains an empirical “go/no-go” signal based on price history, rather than guessing from price alone. It’s also adaptable: you can apply it to stocks, forex, crypto, etc., on any timeframe. For example, during a bullish phase of a stock, MERV will turn green (Trending Mode) and often show a star, signaling good follow-through. If the market later grinds sideways, MERV will shift to magenta (Choppy Mode), warning you that trend-following is now risky.
Why These Components Were Chosen
Market Entropy (via R²) : This measures how well recent prices fit a straight line. We compute a linear regression on the last len_entropy bars and calculate R². Entropy = 1 - R², so entropy is low when prices follow a trend (R² near 1) and high when price action is erratic (R² near 0). This single number captures trend strength vs noise.
Tradeability (ATR + Slope) : We combine two familiar measures: the Average True Range (ATR) (normalized by price) and the absolute slope of the regression line (scaled by ATR). Together they reflect how active and directional the market is. A high ATR or strong slope means big moves, making a trend more “tradeable.” We take a simple average of the normalized ATR and slope to get tradeability_raw. Then we convert it to a percentile rank over the lookback window so it’s stable between 0 and 1.
Percentile Ranks : To make entropy and tradeability values easy to interpret, we convert each to a 0–100 rank based on the past len_entropy periods. This turns raw metrics into a consistent scale. (For example, an entropy rank of 90 means current entropy is higher than 90% of recent values.) We then divide by 100 to plot them on a 0–1 scale.
Market Mode (Regime) : Based on those ranks, MERV classifies the market:
Trending (Green) : Low entropy rank (<40%) and high tradeability rank (>60%). This means the market is structurally trending with high activity.
Choppy (Magenta) : High entropy rank (>60%) and low tradeability rank (<40%). This is a mostly random, low-momentum market.
Neutral (Cyan) : All other cases. This covers mixed regimes not strongly trending or choppy.
The mode is shown as a colored bar at the bottom: green for trending, magenta for choppy, cyan for neutral.
Optimal Regime Signal : Separately, we mark an “optimal” condition when entropy_norm < 0.3 and tradeability > 0.7 (both normalized 0–1). When this is true, a ★ star appears on the bottom line. This star is colored white when truly optimal, gold when only tradeability is high (but entropy not quite low enough), and black when neither condition holds. This gives a quick visual cue for very favorable conditions.
What Makes MERV Stand Out
Holistic View : Unlike a single-oscillator, MERV combines trend, volatility, and cycle analysis in one tool. This multi-faceted approach is unique.
Visual Dashboard : The fixed on-chart dashboard (shown at your chosen corner) summarizes all metrics in bar/gauge form. Even a non-technical user can glance at it: more “█” blocks = a higher value, colors match the plots. This is more intuitive than raw numbers.
Adaptive Thresholds : Using percentile ranks means MERV auto-adjusts to each market’s character, rather than requiring fixed thresholds.
Cycle Insight : The rhythm plot adds information rarely found in indicators – it shows if there’s a repeating cycle (and its period in bars) and how strong it is. This can hint at natural bounce or reversal intervals.
Modern Look : The neon color scheme and glow effects make the lines easy to distinguish (blue/pink for entropy, green/orange for tradeability, etc.) and the filled area between them highlights when one dominates the other.
Recommended Timeframes
MERV can be applied to any timeframe, but it will be more reliable on higher timeframes. The default len_entropy = 50 and len_rhythm = 30 mean we use 30–50 bars of history, so on a daily chart that’s ~2–3 months of data; on a 1-hour chart it’s about 2–3 days. In practice:
Swing/Position traders might prefer Daily or 4H charts, where the calculations smooth out small noise. Entropy and cycles are more meaningful on longer trends.
Day trader s could use 15m or 1H charts if they adjust the inputs (e.g. shorter windows). This provides more sensitivity to intraday cycles.
Scalpers might find MERV too “slow” unless input lengths are set very low.
In summary, the indicator works anywhere, but the defaults are tuned for capturing medium-term trends. Users can adjust len_entropy and len_rhythm to match their chart’s volatility. The dashboard position can also be moved (top-left, bottom-right, etc.) so it doesn’t cover important chart areas.
How the Scoring/Logic Works (Step-by-Step)
Compute Entropy : A linear regression line is fit to the last len_entropy closes. We compute R² (goodness of fit). Entropy = 1 – R². So a strong straight-line trend gives low entropy; a flat/noisy set of points gives high entropy.
Compute Tradeability : We get ATR over len_entropy bars, normalize it by price (so it’s a fraction of price). We also calculate the regression slope (difference between the predicted close and last close). We scale |slope| by ATR to get a dimensionless measure. We average these (ATR% and slope%) to get tradeability_raw. This represents how big and directional price moves are.
Convert to Percentiles : Each new entropy and tradeability value is inserted into a rolling array of the last 50 values. We then compute the percentile rank of the current value in that array (0–100%) using a simple loop. This tells us where the current bar stands relative to history. We then divide by 100 to plot on .
Determine Modes and Signal : Based on these normalized metrics: if entropy < 0.4 and tradeability > 0.6 (40% and 60% thresholds), we set mode = Trending (1). If entropy > 0.6 and tradeability < 0.4, mode = Choppy (-1). Otherwise mode = Neutral (0). Separately, if entropy_norm < 0.3 and tradeability > 0.7, we set an optimal flag. These conditions trigger the colored mode bars and the star line.
Rhythm Detection : Every bar, if we have enough data, we take the last len_rhythm closes and compute the mean and standard deviation. Then for lags from 5 up to len_rhythm, we calculate a normalized autocorrelation coefficient. We track the lag that gives the maximum correlation (best match). This “best lag” divided by len_rhythm is plotted (a value between 0 and 1). Its color changes with the correlation strength. We also smooth the best correlation value over 5 bars to plot as “Cycle Strength” (also 0 to 1). This shows if there is a consistent cycle length in recent price action.
Heatmap (Optional) : The background color behind the oscillator panel can change with entropy. If “Neon Rainbow” style is on, low entropy is blue and high entropy is pink (via a custom color function), otherwise a classic green-to-red gradient can be used. This visually reinforces the entropy value.
Volume Regime (Dashboard Only) : We compute vol_norm = volume / sma(volume, len_entropy). If this is above 1.5, it’s considered high volume (neon orange); below 0.7 is low (blue); otherwise normal (green). The dashboard shows this as a bar gauge and percentage. This is for context only.
Oscillator Plot – How to Read It
The main panel (oscillator) has multiple colored lines on a 0–1 vertical scale, with horizontal markers at 0.2 (Low), 0.5 (Mid), and 0.8 (High). Here’s each element:
Entropy Line (Blue→Pink) : This line (and its glow) shows normalized entropy (0 = very low, 1 = very high). It is blue/green when entropy is low (strong trend) and pink/purple when entropy is high (choppy). A value near 0.0 (below 0.2 line) indicates a very well-defined trend. A value near 1.0 (above 0.8 line) means the market is very random. Watch for it dipping near 0: that suggests a strong trend has formed.
Tradeability Line (Green→Yellow) : This represents normalized tradeability. It is colored bright green when tradeability is low, transitioning to yellow as tradeability increases. Higher values (approaching 1) mean big moves and strong slopes. Typically in a market rally or crash, this line will rise. A crossing above ~0.7 often coincides with good trend strength.
Filled Area (Orange Shade) : The orange-ish fill between the entropy and tradeability lines highlights when one dominates the other. If the area is large, the two metrics diverge; if small, they are similar. This is mostly aesthetic but can catch the eye when the lines cross over or remain close.
Rhythm (Cycle) Line : This is plotted as (best_lag / len_rhythm). It indicates the relative period of the strongest cycle. For example, a value of 0.5 means the strongest cycle was about half the window length. The line’s color (green, orange, or pink) reflects how strong that cycle is (green = strong). If no clear cycle is found, this line may be flat or near zero.
Cycle Strength Line : Plotted on the same scale, this shows the autocorrelation strength (0–1). A high value (e.g. above 0.7, shown in green) means the cycle is very pronounced. Low values (pink) mean any cycle is weak and unreliable.
Mode Bars (Bottom) : Below the main oscillator, thick colored bars appear: a green bar means Trending Mode, magenta means Choppy Mode, and cyan means Neutral. These bars all have a fixed height (–0.1) and make it very easy to see the current regime.
Optimal Regime Line (Bottom) : Just below the mode bars is a thick horizontal line at –0.18. Its color indicates regime quality: White (★) means “Optimal Regime” (very low entropy and high tradeability). Gold (★) means not quite optimal (high tradeability but entropy not low enough). Black means neither condition. This star line quickly tells you when conditions are ideal (white star) or simply good (gold star).
Horizontal Guides : The dotted lines at 0.2 (Low), 0.5 (Mid), and 0.8 (High) serve as reference lines. For example, an entropy or tradeability reading above 0.8 is “High,” and below 0.2 is “Low,” as labeled on the chart. These help you gauge values at a glance.
Dashboard (Fixed Corner Panel)
MERV also includes a compact table (dashboard) that can be positioned in any corner. It summarizes key values each bar. Here is how to read its rows:
Entropy : Shows a bar of blocks (█ and ░). More █ blocks = higher entropy. It also gives a percentage (rounded). A full bar (10 blocks) with a high % means very chaotic market. The text is colored similarly (blue-green for low, pink for high).
Rhythm : Shows the best cycle period in bars (e.g. “15 bars”). If no calculation yet, it shows “n/a.” The text color matches the rhythm line.
Cycle Strength : Gives the cycle correlation as a percentage (smoothed, as shown on chart). Higher % (green) means a strong cycle.
Tradeability : Displays a 10-block gauge for tradeability. More blocks = more tradeable market. It also shows “gauge” text colored green→yellow accordingly.
Market Mode : Simply shows “Trending”, “Choppy”, or “Neutral” (cyan text) to match the mode bar color.
Volume Regime : Similar to tradeability, shows blocks for current volume vs. average. Above-average volume gives orange blocks, below-average gives blue blocks. A % value indicates current volume relative to average. This row helps see if volume is abnormally high or low.
Optimal Status (Large Row) : In bold, either “★ Optimal Regime” (white text) if the star condition is met, “★ High Tradeability” (gold text) if tradeability alone is high, or “— Not Optimal” (gray text) otherwise. This large row catches your eye when conditions are ripe.
In short, the dashboard turns the numeric state into an easy read: filled bars, colors, and text let you see current conditions without reading the plot. For instance, five blue blocks under Entropy and “25%” tells you entropy is low (good), and a row showing “Trending” in green confirms a trend state.
Real-Life Example
Example : Consider a daily chart of a trending stock (e.g. “AAPL, 1D”). During a strong uptrend, recent prices fit a clear upward line, so Entropy would be low (blue line near bottom, perhaps below the 0.2 line). Volatility and slope are high, so Tradeability is high (green-yellow line near top). In the dashboard, Entropy might show only 1–2 blocks (e.g. 10%) and Tradeability nearly full (e.g. 90%). The Market Mode bar turns green (Trending), and you might see a white ★ on the optimal line if conditions are very good. The Volume row might light orange if volume is above average during the rally. In contrast, imagine the same stock later in a tight range: Entropy will rise (pink line up, more blocks in dashboard), Tradeability falls (fewer blocks), and the Mode bar turns magenta (Choppy). No star appears in that case.
Consolidated Use Case : Suppose on XYZ stock the dashboard reads “Entropy: █░░░░░░░░ 20%”, “Tradeability: ██████████ 80%”, Mode = Trending (green), and “★ Optimal Regime.” This tells the trader that the market is in a strong, low-noise trend, and it might be a good time to follow the trend (with appropriate risk controls). If instead it reads “Entropy: ████████░░ 80%”, “Tradeability: ███▒▒▒▒▒▒ 30%”, Mode = Choppy (magenta), the trader knows the market is random and low-momentum—likely best to sit out until conditions improve.
Example: How It Looks in Action
Screenshot 1: Trending Market with High Tradeability (SOLUSD, 30m)
What it means:
The market is in a clear, strong trend with excellent conditions for trading. Both trend-following and active strategies are favored, supported by high tradeability and strong volume.
Screenshot 2: Optimal Regime, Strong Trend (ETHUSD, 1h)
What it means:
This is an ideal environment for trend trading. The market is highly organized, tradeability is excellent, and volume supports the move. This is when the indicator signals the highest probability for success.
Screenshot 3: Choppy Market with High Volume (BTC Perpetual, 5m)
What it means:
The market is highly random and choppy, despite a surge in volume. This is a high-risk, low-reward environment, avoid trend strategies, and be cautious even with mean-reversion or scalping.
Settings and Inputs
The script is fully open-source; here are key inputs the user can adjust:
Entropy Window (len_entropy) : Number of bars used for entropy and tradeability (default 50). Larger = smoother, more lag; smaller = more sensitivity.
Rhythm Window (len_rhythm ): Bars used for cycle detection (default 30). This limits the longest cycle we detect.
Dashboard Position : Choose any corner (Top Right default) so it doesn’t cover chart action.
Show Heatmap : Toggles the entropy background coloring on/off.
Heatmap Style : “Neon Rainbow” (colorful) or “Classic” (green→red).
Show Mode Bar : Turn the bottom mode bar on/off.
Show Dashboard : Turn the fixed table panel on/off.
Each setting has a tooltip explaining its effect. In the description we will mention typical settings (e.g. default window sizes) and that the user can move the dashboard corner as desired.
Oscillator Interpretation (Recap)
Lines : Blue/Pink = Entropy (low=trend, high=chop); Green/Yellow = Tradeability (low=quiet, high=volatile).
Fill : Orange tinted area between them (for visual emphasis).
Bars : Green=Trending, Magenta=Choppy, Cyan=Neutral (at bottom).
Star Line : White star = ideal conditions, Gold = good but not ideal.
Horizontal Guides : 0.2 and 0.8 lines mark low/high thresholds for each metric.
Using the chart, a coder or trader can see exactly what each output represents and make decisions accordingly.
Disclaimer
This indicator is provided as-is for educational and analytical purposes only. It does not guarantee any particular trading outcome. Past market patterns may not repeat in the future. Users should apply their own judgment and risk management; do not rely solely on this tool for trading decisions. Remember, PulseWire scripts are tools for market analysis, not personalized financial advice. We encourage users to test and combine MERV with other analysis and to trade responsibly.
-BullByte Indicator

FvgCalculations█ OVERVIEW
This library provides the core calculation engine for identifying Fair Value Gaps (FVGs) across different timeframes and for processing their interaction with price. It includes functions to detect FVGs on both the current chart and higher timeframes, as well as to check for their full or partial mitigation.
█ CONCEPTS
The library's primary functions revolve around the concept of Fair Value Gaps and their lifecycle.
Fair Value Gap (FVG) Identification
An FVG, or imbalance, represents a price range where buying or selling pressure was significant enough to cause a rapid price movement, leaving an "inefficiency" in the market. This library identifies FVGs based on three-bar patterns:
Bullish FVG: Forms when the low of the current bar (bar 3) is higher than the high of the bar two periods prior (bar 1). The FVG is the space between the high of bar 1 and the low of bar 3.
Bearish FVG: Forms when the high of the current bar (bar 3) is lower than the low of the bar two periods prior (bar 1). The FVG is the space between the low of bar 1 and the high of bar 3.
The library provides distinct functions for detecting FVGs on the current (Low Timeframe - LTF) and specified higher timeframes (Medium Timeframe - MTF / High Timeframe - HTF).
FVG Mitigation
Mitigation refers to price revisiting an FVG.
Full Mitigation: An FVG is considered fully mitigated when price completely closes the gap. For a bullish FVG, this occurs if the current low price moves below or touches the FVG's bottom. For a bearish FVG, it occurs if the current high price moves above or touches the FVG's top.
Partial Mitigation (Entry/Fill): An FVG is partially mitigated when price enters the FVG's range but does not fully close it. The library tracks the extent of this fill. For a bullish FVG, if the current low price enters the FVG from above, that low becomes the new effective top of the remaining FVG. For a bearish FVG, if the current high price enters the FVG from below, that high becomes the new effective bottom of the remaining FVG.
FVG Interaction
This refers to any instance where the current bar's price range (high to low) touches or crosses into the currently unfilled portion of an active (visible and not fully mitigated) FVG.
Multi-Timeframe Data Acquisition
To detect FVGs on higher timeframes, specific historical bar data (high, low, and time of bars at indices and relative to the higher timeframe's last completed bar) is required. The requestMultiTFBarData function is designed to fetch this data efficiently.
█ CALCULATIONS AND USE
The functions in this library are typically used in a sequence to manage FVGs:
1. Data Retrieval (for MTF/HTF FVGs):
Call requestMultiTFBarData() with the desired higher timeframe string (e.g., "60", "D").
This returns a tuple of htfHigh1, htfLow1, htfTime1, htfHigh3, htfLow3, htfTime3.
2. FVG Detection:
For LTF FVGs: Call detectFvg() on each confirmed bar. It uses high , low, low , and high along with barstate.isconfirmed.
For MTF/HTF FVGs: Call detectMultiTFFvg() using the data obtained from requestMultiTFBarData().
Both detection functions return an fvgObject (defined in FvgTypes) if an FVG is found, otherwise na. They also can classify FVGs as "Large Volume" (LV) if classifyLV is true and the FVG size (top - bottom) relative to the tfAtr (Average True Range of the respective timeframe) meets the lvAtrMultiplier.
3. FVG State Updates (on each new bar for existing FVGs):
First, check for overall price interaction using fvgInteractionCheck(). This function determines if the current bar's high/low has touched or entered the FVG's currentTop or currentBottom.
If interaction occurs and the FVG is not already mitigated:
Call checkMitigation() to determine if the FVG has been fully mitigated by the current bar's currentHigh and currentLow. If true, the FVG's isMitigated status is updated.
If not fully mitigated, call checkPartialMitigation() to see if the price has further entered the FVG. This function returns the newLevel to which the FVG has been filled (e.g., currentLow for a bullish FVG, currentHigh for bearish). This newLevel is then used to update the FVG's currentTop or currentBottom.
The calling script (e.g., fvgMain.c) is responsible for storing and managing the array of fvgObject instances and passing them to these update functions.
█ NOTES
Bar State for LTF Detection: The detectFvg() function relies on barstate.isconfirmed to ensure FVG detection is based on closed bars, preventing FVGs from being detected prematurely on the currently forming bar.
Higher Timeframe Data (lookahead): The requestMultiTFBarData() function uses lookahead = barmerge.lookahead_on. This means it can access historical data from the higher timeframe that corresponds to the current bar on the chart, even if the higher timeframe bar has not officially closed. This is standard for multi-timeframe analysis aiming to plot historical HTF data accurately on a lower timeframe chart.
Parameter Typing: Functions like detectMultiTFFvg and detectFvg infer the type for boolean (classifyLV) and numeric (lvAtrMultiplier) parameters passed from the main script, while explicitly typed series parameters (like htfHigh1, currentAtr) expect series data.
fvgObject Dependency: The FVG detection functions return fvgObject instances, and fvgInteractionCheck takes an fvgObject as a parameter. This UDT is defined in the FvgTypes library, making it a dependency for using FvgCalculations.
ATR for LV Classification: The tfAtr (for MTF/HTF) and currentAtr (for LTF) parameters are expected to be the Average True Range values for the respective timeframes. These are used, if classifyLV is enabled, to determine if an FVG's size qualifies it as a "Large Volume" FVG based on the lvAtrMultiplier.
MTF/HTF FVG Appearance Timing: When displaying FVGs from a higher timeframe (MTF/HTF) on a lower timeframe (LTF) chart, users might observe that the most recent MTF/HTF FVG appears one LTF bar later compared to its appearance on a native MTF/HTF chart. This is an expected behavior due to the detection mechanism in `detectMultiTFFvg`. This function uses historical bar data from the MTF/HTF (specifically, data equivalent to `HTF_bar ` and `HTF_bar `) to identify an FVG. Therefore, all three bars forming the FVG on the MTF/HTF must be fully closed and have shifted into these historical index positions relative to the `request.security` call from the LTF chart before the FVG can be detected and displayed on the LTF. This ensures that the MTF/HTF FVG is identified based on confirmed, closed bars from the higher timeframe.
█ EXPORTED FUNCTIONS
requestMultiTFBarData(timeframe)
Requests historical bar data for specific previous bars from a specified higher timeframe.
It fetches H , L , T (for the bar before last) and H , L , T (for the bar three periods prior)
from the requested timeframe.
This is typically used to identify FVG patterns on MTF/HTF.
Parameters:
timeframe (simple string) : The higher timeframe to request data from (e.g., "60" for 1-hour, "D" for Daily).
Returns: A tuple containing: .
- htfHigh1 (series float): High of the bar at index 1 (one bar before the last completed bar on timeframe).
- htfLow1 (series float): Low of the bar at index 1.
- htfTime1 (series int) : Time of the bar at index 1.
- htfHigh3 (series float): High of the bar at index 3 (three bars before the last completed bar on timeframe).
- htfLow3 (series float): Low of the bar at index 3.
- htfTime3 (series int) : Time of the bar at index 3.
detectMultiTFFvg(htfHigh1, htfLow1, htfTime1, htfHigh3, htfLow3, htfTime3, tfAtr, classifyLV, lvAtrMultiplier, tfType)
Detects a Fair Value Gap (FVG) on a higher timeframe (MTF/HTF) using pre-fetched bar data.
Parameters:
htfHigh1 (float) : High of the first relevant bar (typically high ) from the higher timeframe.
htfLow1 (float) : Low of the first relevant bar (typically low ) from the higher timeframe.
htfTime1 (int) : Time of the first relevant bar (typically time ) from the higher timeframe.
htfHigh3 (float) : High of the third relevant bar (typically high ) from the higher timeframe.
htfLow3 (float) : Low of the third relevant bar (typically low ) from the higher timeframe.
htfTime3 (int) : Time of the third relevant bar (typically time ) from the higher timeframe.
tfAtr (float) : ATR value for the higher timeframe, used for Large Volume (LV) FVG classification.
classifyLV (bool) : If true, FVGs will be assessed to see if they qualify as Large Volume.
lvAtrMultiplier (float) : The ATR multiplier used to define if an FVG is Large Volume.
tfType (series tfType enum from no1x/FvgTypes/1) : The timeframe type (e.g., types.tfType.MTF, types.tfType.HTF) of the FVG being detected.
Returns: An fvgObject instance if an FVG is detected, otherwise na.
detectFvg(classifyLV, lvAtrMultiplier, currentAtr)
Detects a Fair Value Gap (FVG) on the current (LTF - Low Timeframe) chart.
Parameters:
classifyLV (bool) : If true, FVGs will be assessed to see if they qualify as Large Volume.
lvAtrMultiplier (float) : The ATR multiplier used to define if an FVG is Large Volume.
currentAtr (float) : ATR value for the current timeframe, used for LV FVG classification.
Returns: An fvgObject instance if an FVG is detected, otherwise na.
checkMitigation(isBullish, fvgTop, fvgBottom, currentHigh, currentLow)
Checks if an FVG has been fully mitigated by the current bar's price action.
Parameters:
isBullish (bool) : True if the FVG being checked is bullish, false if bearish.
fvgTop (float) : The top price level of the FVG.
fvgBottom (float) : The bottom price level of the FVG.
currentHigh (float) : The high price of the current bar.
currentLow (float) : The low price of the current bar.
Returns: True if the FVG is considered fully mitigated, false otherwise.
checkPartialMitigation(isBullish, currentBoxTop, currentBoxBottom, currentHigh, currentLow)
Checks for partial mitigation of an FVG by the current bar's price action.
It determines if the price has entered the FVG and returns the new fill level.
Parameters:
isBullish (bool) : True if the FVG being checked is bullish, false if bearish.
currentBoxTop (float) : The current top of the FVG box (this might have been adjusted by previous partial fills).
currentBoxBottom (float) : The current bottom of the FVG box (similarly, might be adjusted).
currentHigh (float) : The high price of the current bar.
currentLow (float) : The low price of the current bar.
Returns: The new price level to which the FVG has been filled (e.g., currentLow for a bullish FVG).
Returns na if no new partial fill occurred on this bar.
fvgInteractionCheck(fvg, highVal, lowVal)
Checks if the current bar's price interacts with the given FVG.
Interaction means the price touches or crosses into the FVG's
current (possibly partially filled) range.
Parameters:
fvg (fvgObject type from no1x/FvgTypes/1) : The FVG object to check.
Its isMitigated, isVisible, isBullish, currentTop, and currentBottom fields are used.
highVal (float) : The high price of the current bar.
lowVal (float) : The low price of the current bar.
Returns: True if price interacts with the FVG, false otherwise. Library
