RSI Divergence ScoutRSI Divergence Scout is a pivot-based RSI divergence study designed to mark potential disagreement between price movement and RSI momentum directly on the price chart.
The purpose of this script is to make bullish and bearish RSI divergences easier to see without requiring a separate oscillator pane or a large visual dashboard.
What the script detects
The study looks for two common RSI divergence conditions:
Bullish RSI divergence
A bullish divergence is detected when:
– price forms a confirmed pivot low below the previous confirmed pivot low
– RSI forms a higher value compared with the RSI value at the previous pivot low
– the previous RSI value was below the lower RSI context threshold
This can suggest that downside momentum is weakening, even though price has made a lower low.
Bearish RSI divergence
A bearish divergence is detected when:
– price forms a confirmed pivot high above the previous confirmed pivot high
– RSI forms a lower value compared with the RSI value at the previous pivot high
– the previous RSI value was above the upper RSI context threshold
This can suggest that upside momentum is weakening, even though price has made a higher high.
How the calculation works
The script uses confirmed pivot highs and pivot lows.
For bearish divergence, it compares the current confirmed pivot high with the previous confirmed pivot high:
– current pivot high price is higher than the previous pivot high price
– current RSI value is lower than the previous RSI value
– the previous RSI value is above the upper RSI context threshold
For bullish divergence, it compares the current confirmed pivot low with the previous confirmed pivot low:
– current pivot low price is lower than the previous pivot low price
– current RSI value is higher than the previous RSI value
– the previous RSI value is below the lower RSI context threshold
When a divergence is detected, the script draws a dashed line between the two relevant price pivots and places a label on the current confirmed pivot. The label can also show the RSI value at that pivot.
Why pivot confirmation matters
The script waits for a pivot high or pivot low to be confirmed using the selected left/right pivot sensitivity.
This means a signal appears only after the pivot is confirmed, not at the exact live high or low. This delay is intentional. It helps reduce noise and avoids marking every small candle fluctuation as a swing point.
Inputs
RSI length
Controls the RSI calculation period.
Pivot left bars
Controls how many bars to the left are required for pivot confirmation.
Pivot right bars
Controls how many bars to the right are required for pivot confirmation.
Higher pivot values produce fewer signals and focus on larger swings. Lower values produce more signals and make the script more sensitive to smaller price movements.
Upper RSI context threshold
Used as a context filter for bearish divergence. The previous pivot high RSI must be above this threshold.
Lower RSI context threshold
Used as a context filter for bullish divergence. The previous pivot low RSI must be below this threshold.
Display settings
The script allows bullish and bearish divergence labels to be shown or hidden independently. Pivot-to-pivot lines and RSI values on labels can also be enabled or disabled.
Alerts
The script includes basic alert conditions for bullish and bearish RSI divergence.
Because the script uses confirmed pivots, alerts trigger only after the pivot confirmation process is complete.
How to use it
RSI divergence should be treated as an early warning signal, not as a complete trade trigger.
A divergence can show that momentum is changing, but it does not confirm that price must reverse. In strong trends, multiple divergences can appear before price actually changes direction.
This study is most useful when combined with additional market context, such as:
– trend structure
– support and resistance
– volume behavior
– higher-timeframe direction
– risk management rules
Limitations
The script does not predict future price direction.
It does not generate complete buy or sell signals.
Pivot-based signals appear only after the pivot is confirmed.
Divergence can fail during strong trends, low-liquidity conditions or news-driven price movement.
The study should be used as one part of a broader analysis process.
Educational content only. Not financial advice.
Indicador

Volume-Weighted Conviction Oscillator (VWCO)🚀 VOLUME-WEIGHTED CONVICTION OSCILLATOR
The Volume-Weighted Conviction Oscillator (VWCO), engineered by gunebak4n, is an advanced multi-dimensional momentum isolation and volume-weighted structural trend detection framework designed to isolate high-probability trend regimes and trend velocity expansions.
VWCO is built on the core principle that pure price directional momentum cannot be accurately evaluated without cross-referencing directional price spread (Candle Range) with localized volume intensity. By structurally unifying absolute close positioning inside a bar (Close Location Value) with a reactive volume density modifier, the system projects compressed directional market forces onto a mathematically stable, standardized scale.
Unlike conventional momentum oscillators that frequently pin at extremes or trigger premature counter-trend signals during highly volatile directional expansions, VWCO stabilizes trend velocity over an institutional lookback window, anchoring the final signal to a highly scannable, multi-state trend baseline.
💡 CORE DESIGN PRINCIPLE
🧭 Volume-Weighted Close Location Velocity
VWCO interprets market trends not merely as an isolated price derivative, but as a dynamic interplay where trend conviction must be fueled by volume intensity and structurally validated by candle range expansion. True, sustainable trend expansions emerge when directional close location positioning and volume intensity accelerate simultaneously.
🧬 Trend–Spread–Volume Tri-Factor Model
The system continuously evaluates three interacting structural layers:
Directional Close Location Value (CLV): The raw positioning of the close relative to the candle's absolute trading range, determining intra-bar directional dominance.
Price Spread Dynamics: The absolute high-to-low range of the candle, measuring the geometric expansion of localized price volatility.
Volume Intensity Modifier: Real-time volume scaled against its baseline Simple Moving Average (SMA) to detect institutional commitment and accumulation phases.
The mathematical aggregation of these layers defines the final hybrid trend conviction line.
💡 KEY FEATURES
📊 Directional Conviction Core
The system extracts clean directional bias by calculating the continuous balance of buying and selling conviction scores. This value isolates the velocity of absolute directional price expansion before entering the smoothing matrix.
🧪 Volume Intensity Layer
To eliminate low-liquidity market noise and false breakouts, the framework integrates a volume tracking engine. It measures current volume relative to its moving average baseline, ensuring that trend conviction signals are backed by genuine market participation.
🛡️ Doji-Suppression & Geometric Range Logic
A key innovation of VWCO is its structural defense against high-risk, low-spread market conditions. By setting the Close Location Value (CLV) to absolute zero during true Doji periods (where High equals Low), the indicator automatically deflates during directionless price stagnation, filtering out dangerous trap zones.
📦 Symmetrical Ratio Scaling
To completely eliminate indicator drift and nominal floating boundaries, the isolated buying and selling conviction EMAs are processed through a bounded ratio formula. This forces historically asymmetric data points into a standardized, mathematically stable field.
🧠 Bounded Signal & Directional Logic
The final processed VWCO line oscillates strictly within a 0 to 100 range. The main signal line features a direction-sensitive color architecture that shifts background hue instantly based on whether the trend velocity is expanding above or decaying below the critical 50-midline pivot.
🔬 MATHEMATICAL STRUCTURE
Step 1: Raw Components Calculation
• Vol_MA = SMA(Volume, Volume_MA_Period)
• Vol_Intensity = Volume / Vol_MA
• CLV = (High - Low == 0) ? 0 : ((Close - Low) - (High - Close)) / (High - Low)
• Price_Spread = High - Low
Step 2: Candle Conviction Score Isolation
• Conviction_Score = Vol_Intensity * Price_Spread * CLV
• Buying_Conviction = Conviction_Score > 0 ? Conviction_Score : 0
• Selling_Conviction = Conviction_Score < 0 ? -Conviction_Score : 0
Step 3: Core Smoothing and Final Ratio Scaling
• EMA_Buying = ta.ema(Buying_Conviction, VWCO_Period)
• EMA_Selling = ta.ema(Selling_Conviction, VWCO_Period)
• Conviction_Ratio = EMA_Selling == 0 ? 100 : EMA_Buying / EMA_Selling
• VWCO = EMA_Selling == 0 ? 100 : 100 - (100 / (1 + Conviction_Ratio))
• Signal_Line = ta.ema(VWCO, Signal_Period)
This structural architecture ensures that all cyclical shifts are measured against a fully standardized baseline, rather than unstable nominal float boundaries.
🛠️ USAGE FRAMEWORK
The Midline Equilibrium Axis (50 Pivot)
Treat the 50 level as the structural axis of market control. VWCO values sustained above 50 dictate a dominant bullish regime, while values compressed below 50 confirm absolute bearish structural control.
Multi-State Background Shading
Monitor the directional background coloration. Shading changes dynamically around the centerline to visually represent structural regimes:
• Green Background: VWCO line is expanding above the 50-equilibrium zone, signaling bullish dominance.
• Red Background: VWCO line is compressed below the 50-equilibrium zone, signaling bearish dominance.
Signal Line Crossings & Trend Velocity
• Bullish Crossover: When the blue VWCO line crosses above the orange Signal Line, it signals an immediate acceleration of buying conviction.
• Bearish Crossunder: When the blue VWCO line crosses below the orange Signal Line, it highlights an immediate acceleration of selling conviction.
Symmetrical Institutional Zones
Utilize the 80 (Overbought) and 20 (Oversold) reference levels to identify statistical extremes. When the VWCO Line crosses these thresholds alongside a crossover on the signal line, it highlights high-probability trend reversal or profit-taking boundaries.
⚙️ SYSTEM CHARACTERISTICS
• Tri-Factor Synergy: Synchronized integration of candle close location value, price spread expansion, and volume intensity.
• Fixed-Boundary Architecture: Ratio scaling matrix eliminates standard indicator drifting, maintaining a hard 0–100 boundary.
• High-Conviction Filtering: Mathematical Doji-suppression reduces false breakouts during flat, low-liquidity consolidation phases.
• Fully Parameterized Controls: Seamlessly adjustable inputs to match any asset class, from macro indices to highly volatile crypto, commodities, and forex pairs.
📌 CREDIT
The Volume-Weighted Conviction Oscillator (VWCO) is officially developed and published by gunebak4n as a structural volume-weighted trend velocity detection framework for TradingView.
The system is engineered for traders seeking to identify statistically significant cyclical shifts emerging from multi-factor volume compression, rather than chasing isolated, noise-heavy price action breakouts.
⚠️ DISCLAIMER
VWCO is a probabilistic analytical model. It does not predict market outcomes or guarantee trading performance. All signals must be interpreted within a disciplined risk management framework and validated with broader institutional market context. Indicador

Momentum Adjusted Volatility Trend (MAVT)🚀 MOMENTUM ADJUSTED VOLATILITY TREND
The Momentum Adjusted Volatility Trend (MAVT), engineered by @gunebak4n, is an advanced multi-dimensional momentum normalization and volatility-filtered trend detection framework designed to isolate high-probability structural trend regimes and momentum expansions.
MAVT is built on the core principle that pure trend momentum cannot be accurately evaluated without cross-referencing volume validation and volatility stress. By structurally unifying absolute price direction (EMA Spread) with a reactive volume ratio, and mathematically penalizing the final output against an adaptive volatility denominator (ATR), the system projects compressed market forces onto a fixed, noise-filtered boundary.
Unlike conventional oscillators that frequently pin at extremes or trigger premature counter-trend signals during highly volatile expansions, MAVT stabilizes trend velocity over a structural lookback window, anchoring the final signal to a highly scannable, institutional trend baseline.
💡 CORE DESIGN PRINCIPLE
🧭 Volatility-Penalized Momentum Convergence
MAVT interprets market trends not merely as an isolated price derivative, but as a dynamic interplay where trend direction must be fueled by volume and structurally discounted by prevailing volatility. True, sustainable trend expansions emerge when momentum and volume accelerate while volatility remains compressed.
🧬 Trend–Volume–Volatility Tri-Factor Model
The system continuously evaluates three interacting structural layers:
Absolute Trend Direction: The raw spread between fast and slow Exponential Moving Averages (EMA).
Volume Confirmation Ratio: Real-time volume scaled against its baseline Moving Average to detect institutional participation.
Volatility Denominator Filter: Average True Range (ATR) utilized as a risk-buffer to compress the indicator's peaks during erratic, overextended market regimes.
The mathematical aggregation of these layers defines the final hybrid trend line.
💡 KEY FEATURES
📊 Adaptive Trend Direction Matrix
The system extracts clean directional bias by calculating the spread between two customizable EMAs. This raw distance represents the velocity of absolute price expansion before entering the normalization matrix.
🧪 Volume Ratio Confirmation Layer
To eliminate low-liquidity market noise and false breakouts, the framework integrates a volume tracking engine. It measures current volume relative to its moving average baseline, ensuring that trend signals are backed by genuine market participation.
🛡️ Non-Linear Volatility Suppressor (ATR Factor)
A key innovation of MAVT is its structural defense against high-risk market conditions. By integrating a normalized Average True Range (ATR) into the denominator of the core formula, the indicator automatically deflates and stabilizes during erratic price spikes, filtering out dangerous trap zones.
📦 Rolling Min-Max Normalization Engine
To completely eliminate indicator drift and nominal floating boundaries, all three core components (Trend, Volume, and Volatility) are dynamically rescaled between 0 and 1 over a customizable lookback period. This forces historically asymmetric data points into a standardized, mathematically stable field.
🧠 Bounded Signal & Directional Logic
The final processed MAVT line oscillates strictly within a 0 to 100 range. The main signal line features a direction-sensitive color architecture that shifts hue instantly based on whether the trend velocity is expanding above or decaying below the critical 50-midline pivot.
🎨 Momentum Strength Histogram
An advanced four-state momentum histogram measures the exact distance between the MAVT Line and its Signal Line. By shifting colors based on directional slope changes, it reveals accelerating and decelerating momentum shifts well before price exhaustion occurs.
🔬 MATHEMATICAL STRUCTURE
Plaintext
Step 1: Raw Components Calculation
• Trend_Raw = EMA(Close, Fast_Period) - EMA(Close, Slow_Period)
• ATR_Value = ATR(ATR_Period)
• Volume_Ratio = Volume / max(SMA(Volume, Volume_MA_Period), 0.000001)
Step 2: Dynamic Min-Max Normalization Function (f_norm)
• Min = Lowest(Source, Lookback_Period)
• Max = Highest(Source, Lookback_Period)
• f_norm(Source) = (Source - Min) / max(Max - Min, 0.000001)
Step 3: Core Combination and Final Scaling
• MAVT_Core = (f_norm(Trend_Raw) * f_norm(Volume_Ratio)) / (1 + f_norm(ATR_Value))
• MAVT_Line = f_norm(MAVT_Core) * 100
• Signal_Line = EMA(MAVT_Line, Signal_Period)
• Histogram = MAVT_Line - Signal_Line
This structural architecture ensures that all cyclical shifts are measured against a fully standardized historical baseline, rather than unstable nominal float boundaries.
🛠️ USAGE FRAMEWORK
1. The Midline Equilibrium Axis (50 Pivot)
Treat the 50 level as the structural axis of market control. MAVT values sustained above 50 dictate a dominant bullish regime, while values compressed below 50 confirm absolute bearish structural control.
2. Multi-State Line Color Interpretation
Monitor the directional line coloration. A bright lime line denotes an expansionary bullish trend above the equilibrium zone, while a bright red line indicates maximum acceleration in a bearish structural breakdown.
3. Advanced Histogram Momentum Scaling
Bright Lime: Positive momentum accelerating (Bullish Expansion).
Dark Green: Positive momentum decaying (Bullish Exhaustion / Consolidation).
Bright Red: Negative momentum accelerating (Bearish Expansion).
Dark Maroon: Negative momentum decaying (Bearish Exhaustion / Short Covering).
4. Symmetrical Institutional Zones
Utilize the 80 (Overbought) and 20 (Oversold) dotted reference levels to identify statistical extremes. When the MAVT Line crosses these thresholds alongside a color shift in the histogram, it highlights high-probability trend reversal or profit-taking boundaries.
⚙️ SYSTEM CHARACTERISTICS
Tri-Factor Synergy: Synchronized integration of trend momentum, volume expansion, and volatility compression.
Fixed-Boundary Architecture: Rolling Min-Max normalization matrix eliminates standard indicator drifting.
High-Conviction Filtering: Mathematical ATR penalty reduces false breakouts during erratic, low-probability market moves.
Four-State Momentum Histogram: Highly visible slope detection for precision entries and exits.
Fully Parameterized Controls: Seamlessly adjustable inputs to match any asset class, from macro indices to highly volatile crypto and forex pairs.
📌 CREDIT
The Momentum Adjusted Volatility Trend (MAVT) is officially developed and published by @gunebak4n as a structural momentum normalization and trend velocity detection framework for TradingView.
The system is engineered for traders seeking to identify statistically significant cyclical shifts emerging from multi-factor compression, rather than chasing isolated, noise-heavy price action breakouts.
⚠️ DISCLAIMER
MAVT is a probabilistic analytical model. It does not predict market outcomes or guarantee trading performance. All signals must be interpreted within a disciplined risk management framework and validated with broader institutional market context. Indicador

Body vs Wick Filter**Body vs Wick Filter**
The Body vs Wick Filter is a candle analysis tool that identifies candles with a significant body relative to their total range. The core idea behind this indicator is that candles with a large body and small wicks represent strong, decisive price movement, while candles with small bodies and large wicks indicate indecision, rejection or failed attempts to move in a direction. By filtering for candles that meet a minimum body percentage, traders can visually separate high-conviction moves from noise.
**How it works**
For every candle on the chart, the indicator calculates three values: the total candle range from high to low, the body size from open to close, and the remaining wick size. It then expresses the body as a percentage of the total range. A candle where the body takes up 80% of the total range is a strong, directional candle. A candle where the body is only 20% of the range is mostly wick and represents uncertainty in the market.
**Coloring and visual output**
Candles that meet or exceed your minimum body percentage threshold are highlighted directly on the chart. Bullish candles that qualify receive one color and bearish candles that qualify receive a separate color, both fully customizable in the settings. Candles that do not meet the threshold are left in their original chart color, so your attention is naturally drawn to the qualifying candles only.
An optional percentage label is displayed above each candle within the lookback window, showing the exact body percentage so you can quickly assess the strength of any candle at a glance.
**How to use it**
1. Set your minimum body percentage in the settings, for example 60%, to only highlight candles where the body makes up at least 60% of the total range
2. Choose your preferred colors for bullish and bearish qualifying candles
3. Adjust the lookback window to control how many recent candles display the percentage label
4. Use the Data Window by hovering over any candle to see the exact body percentage, wick percentage, total candle size in pips and body size in pips
**Practical applications**
This indicator is particularly useful for traders who base entries on candlestick structure, such as identifying strong momentum candles, confirming breakouts, or filtering out indecisive price action around key levels. It works on any timeframe and any instrument. Indicador

Indicador

Doppler Velocity Shift [JOAT]DOPPLER VELOCITY SHIFT
A trend-acceleration / exhaustion detector built on the Doppler shift principle : a stationary observer (the baseline frequency) compared to a moving source (the instant frequency) produces a measurable shift whose sign tells you whether the source is approaching (compression / acceleration) or receding (rarefaction / exhaustion). For markets the analogue is simple: when the residual wave's oscillation frequency is slower than its long-run baseline, momentum is accelerating into the trend; when it is faster than baseline, the trend is exhausting into chop.
The Doppler analogue, translated
The script's pipeline:
Detrend price by subtracting an EMA (configurable length). The result is a residual wave oscillating around zero.
Optionally normalise by ATR so the wave amplitude is regime-aware.
Count zero-crossings of the residual over a short window — this gives the instant frequency .
Count zero-crossings over a long window — this gives the baseline frequency .
Compute the Doppler shift = (instant − baseline) / baseline. Positive shift = faster than baseline → exhaustion. Negative shift = slower than baseline → acceleration.
EMA-smooth the shift to reduce flicker.
The output is a percentage that is intuitive to read: +0.30 means oscillations are 30% faster than baseline (approaching exhaustion); −0.30 means 30% slower (accelerating into trend).
Two-threshold event detection
Exhaustion — shift > +exhaustion threshold (default +0.30) for N consecutive bars (configurable, default 3). Fires the Exhaustion label.
Acceleration — shift < −acceleration threshold (default −0.30) for N consecutive bars. Fires the Acceleration label.
Frequency Anomaly — when |shift| crosses threshold × multiplier (default 2.0× → ±0.60). The anomaly alert fires and the chart background tints accordingly.
A configurable Event Cooldown (default 8 bars) prevents same-type events from stacking. A multi-bar confirmation gate prevents single-bar noise from triggering events.
Visual system
Detrend residual line (overlay) with configurable transparency and cosmetic display scale.
Vertical event lines at each Acceleration / Exhaustion event, with optional full-height extension for emphasis.
Event labels — Unicode glyphs by default (toggleable to plain text ACCEL / EXHAUST).
Frequency anomaly background tint when the |shift| crosses the anomaly trigger.
Pane companion (toggleable, on by default) — plots instant frequency, baseline frequency, and Doppler shift % in a separate pane below the chart.
A locked Cyber Aqua palette (electric blue acceleration / hot pink exhaustion / muted blue-gray stable on a near-black ground) gives the indicator a distinctive physics-inspired identity.
Dashboard
Monospaced table, positionable to any of nine corners, with row-fade gradient. Surfaces:
Instant frequency (zero-crossings in the short window).
Baseline frequency (zero-crossings in the long window).
Doppler shift % (signed).
Current status (ACCEL / EXHAUST / STABLE).
Last event direction with bars-ago.
Configuration: detrend length, frequency window, baseline window.
Anomaly flag when triggered.
Alerts
Three alert conditions, each independently controllable:
Trend Acceleration (shift < −threshold for N bars)
Approaching Exhaustion (shift > +threshold for N bars)
Frequency Anomaly (|shift| > threshold × multiplier)
How to read it
Two reads, in order of conviction:
Acceleration label after a quiet period — the script's intended trend-entry signal. Frequency has slowed, meaning the residual is making fewer mid-line crossings — the wave has lengthened and is now committed in one direction. Pair with a directional indicator for entry.
Exhaustion label inside an extended trend — the script's intended trend-exit signal. Frequency has risen above baseline — the residual is making more crossings, meaning the trend is fragmenting. Reduce / exit trend exposure; the next move is often a reversal.
The Frequency Anomaly alert is the script's headline event — when |shift| spikes far past threshold the market is in an extreme state, almost always associated with either an explosive breakout (acceleration anomaly) or an exhaustion blowoff (exhaustion anomaly).
Suggested settings
Defaults (detrend EMA 20, frequency window 40, baseline window 200, smoothing EMA 3, ±0.30 thresholds, 3-bar confirmation) are tuned for 15m–1H on liquid markets. For lower timeframes drop windows proportionally (10 / 20 / 100). For HTF (4H+) raise windows (30 / 80 / 400). The ATR-normalised residual is the recommended default — without it, the script's behaviour drifts on instruments with changing volatility levels.
Originality
The Doppler shift is a fundamental result of classical physics; the financial-market analogue and its implementation here are original. The pipeline — the EMA-detrended residual wave with optional ATR normalisation, the rolling zero-crossing frequency estimator at two scales, the (instant − baseline) / baseline shift formula, the EMA-smoothed shift, the multi-bar confirmed event classifier with cooldown, the anomaly multiplier layer, the vertical event line render, the pane-companion three-series overlay, and the dashboard — is JOAT-original. No third-party code reused. The use of oscillation-frequency shift as a trend acceleration / exhaustion metric is the original quantitative contribution.
Limitations
Zero-crossing frequency estimation is noisy on short windows; the smoothing input (default 3) exists to suppress that. The frequency-anomaly trigger is a heuristic — it tells you the market is in a rare state, not which direction it will resolve. Events confirm only after the multi-bar threshold; events are non-repainting but lag by the confirmation window.
-made with passion by jackofalltrades
Indicador

NG Trendlines & Market Structure# NG Trendlines & Market Structure
NG Trendlines & Market Structure is a proprietary trading indicator designed to identify high-probability market structure, trendline compression, and breakout opportunities.
The indicator combines dynamic trendlines, higher-timeframe directional bias, support and resistanceand market structure analysis to help traders identify periods of consolidation before momentum expansion.
## Features
* Automatic trendline detection
* Compression and breakout identification
* Multi-timeframe trend bias (5m, 15m, 1H, 4H)
* Dynamic support and resistance zones
* Market state identification (Bull, Bear, Range, Breakout)
* VWAP touch detection with customizable alerts
* Visual breakout confirmation
* Clean, non-repainting signals based on confirmed price action
## Alerts
Alerts can be configured for:
* Price touching VWAP
* Bullish breakout confirmation
* Bearish breakout confirmation
* Trend direction changes
* Market state transitions
This indicator is designed to assist traders in understanding market structure and improving trade timing. It is intended as a decision-support tool and should be used alongside proper risk management and trade confirmation.
**Disclaimer:** This indicator does not guarantee profits or trading success and should not be considered financial advice. Trading financial markets involves substantial risk, and past performance is not indicative of future results.
Indicador

Indicador

Nasdaq XXX20 / XXX50 / XXX80 Horizontal LevelsThis indicator automatically plots Nasdaq horizontal levels at XXX20, XXX50, and XXX80. Ideal for intraday trading on NQ, MNQ, NDQ, and NDX, with timeframes less than or equal to 5min.
This script highlights powerful reaction levels for entries, exits, stops, and targets.
Key Features
----------------
- Draws XXX20 (teal), XXX50 (light gray/ivory), and XXX80 (orange) levels extending across the chart.
- Dynamically anchors around the current price, showing ±25 blocks by default (50+ levels total, adjustable).
- Optional price range filter to declutter charts by limiting levels to a specific zone.
Inputs
--------------
- Toggle individual level types (XXX20 / XXX50 / XXX80).
- Line colors and width.
- Block size (default 100).
- Price range filter (show only levels between Min and Max price). Indicador

Indicador

Brownian Motion Residual [JOAT]BROWNIAN MOTION RESIDUAL
A regime classifier rooted in the sqrt(T) scaling law of geometric Brownian motion. Under a true random walk, the standard deviation of T-bar returns scales as σ₁ · √T — that is the central fact of Brownian motion in continuous time. Markets violate this scaling in revealing ways: when they trend, dispersion at long horizons grows faster than √T; when they mean-revert, it grows slower. Brownian Motion Residual measures that violation across three horizons simultaneously, aggregates it, and surfaces a single Z-like residual that classifies the market into Strong MR / MR / Random / Trend / Strong Trend.
The sqrt(T) scaling law, restated
For a Brownian process with per-bar volatility σ₁:
σ(T-bar return) = σ₁ · √T
For a real market the observed σ at horizon T can be measured directly. The residual is the deviation of the observed value from the Brownian-implied value:
residual(T) = σ_observed(T) − σ₁ · √T
When the residual is positive , dispersion at T is greater than Brownian predicts — the market is trending (price travels further than a random walk in T bars). When it is negative , dispersion is less than Brownian predicts — the market is mean-reverting (price ends up closer to home than a random walk would).
Optional normalisation by σ₁ · √T turns the residual into a unit-less percentage of expected dispersion, so the same threshold values are meaningful across instruments and timeframes.
Three horizons, weighted blend
A single horizon is noisy. Brownian Motion Residual reads three horizons simultaneously (default 5 / 20 / 100 bars), each independently toggleable and weighted (default 1.0 each). The horizons are aggregated into a single residual line — the script's headline metric. Toggling off the short horizon makes the read smoother and slower; toggling off the long horizon makes it more reactive. Configurable.
A configurable EMA on top of the aggregated residual suppresses single-bar noise without lagging the regime view.
Two-tier classification
The aggregated residual is mapped to one of five regimes by two symmetric thresholds (default ±1 mild, ±2 strong):
Strong Trend — residual > +2. Aggressive momentum regime.
Trend — residual between +1 and +2. Trending.
Random — residual between −1 and +1. Brownian-like.
MR — residual between −2 and −1. Mean-reverting.
Strong MR — residual < −2. Aggressive reversion regime.
Visual system
Slope-coloured residual line with configurable width and optional area fill under it (transparency configurable).
Zero line and ±1 / ±2 threshold lines (toggleable).
Background tint by regime (subtle 88 transparency default) — teal trend, lavender MR, mint random.
Per-horizon plots (toggleable, off by default) — each horizon's residual as a faint dotted overlay; useful for seeing which horizon is driving the read.
Regime-change dots above the line at every confirmed flip.
A locked Aurora palette (teal trend / lavender MR / mint random on a deep-night ground) gives the pane a distinctive structural identity.
Dashboard
Monospaced table, positionable to any of nine corners, with vertical row-fade. Surfaces:
Aggregated residual (raw and smoothed).
Regime classification with glyph.
σ₁ value (the Brownian anchor).
Per-horizon residuals (h1 / h2 / h3) when enabled.
Bars in current regime.
Distance to nearest threshold.
Optional fancy Unicode header for the institutional aesthetic.
Alerts
Three alert conditions, each independently controllable:
Regime Change (any classification flip)
Strong threshold cross (±2)
Mild threshold cross (±1) — off by default
How to read it
Three reads, in order of conviction:
Strong Trend / Strong MR entry — the highest-conviction read. The market has decisively departed from Brownian scaling in one direction. Pair with a momentum tool in Trend regimes, a reversion tool in MR regimes.
Residual crossing zero — the regime fault line. Even before crossing a threshold, a sustained sign flip means the underlying distribution has rotated; the next threshold cross will confirm the new regime.
Per-horizon disagreement (when enabled) — when the short horizon is in trend regime but the long horizon is in MR regime, the market is in a nested state: short-term momentum inside a longer reversion. This is the textbook setup for fade-the-extreme intraday plays inside a wider range.
Suggested settings
Defaults (σ₁ window 100, observed σ window 60, horizons 5/20/100, equal weights, log returns ON, normalisation ON) are tuned for 15m–4H on liquid markets. For lower timeframes drop horizon 3 to 50. For HTF (daily+) raise horizon 3 to 200 and σ₁ window to 200. Log returns are theoretically correct and the recommended default — the script's regime classification depends on the scaling law, which assumes log returns; switch off only for research.
Originality
The √T Brownian scaling law is textbook continuous-time finance — the central piece of Bachelier's 1900 thesis and the foundation of every diffusion model in pricing. The implementation here — the per-horizon σ measurement pipeline, the σ₁-anchored Brownian baseline with optional normalisation, the three-horizon weighted aggregation, the EMA-smoothed residual classifier with two-tier thresholds, the per-horizon overlay layer, the regime-tinted background, and the dashboard — is JOAT-original. No third-party code reused. The use of residual against Brownian as a regime classifier is the original quantitative contribution.
Limitations
The √T law is exact only for Brownian motion — real markets have fat tails, autocorrelation, and discrete bars, so the measured "residual" is always non-zero even in a regime that looks random. The thresholds (±1 / ±2) are calibrated to be the regime boundaries empirically; tighten or loosen if your instrument has unusual variance behaviour. Per-horizon σ values need their respective windows populated to be meaningful — early bars give a warm-up read.
—
-made with passion by jackofalltrades
Indicador

[ A L P H A X ] PIVOT - Smart Money StructureAlphaX PIVOT — Smart Money Structure + OTE Pullback Engine: Market Structure Tracking, Optimal Trade Entry Zones, Liquidity Sweep Detection & 7-Layer Confluence Scoring
AlphaX PIVOT is a professional-grade smart money pullback system built around two of the most powerful concepts in institutional price action: market structure and the Optimal Trade Entry zone. Where breakout-based systems enter at the moment of structural displacement — chasing the move after it has already begun — PIVOT waits for the market to pull back into the precise Fibonacci retracement zone where institutional continuation orders are resting, and fires only when a qualified rejection candle confirms within that zone with multi-layer confluence backing. The result is a system that gives you the same directional conviction as a breakout entry at a structurally superior price — buying the pullback into institutional demand after a bullish BOS or CHoCH, selling the pullback into institutional supply after a bearish structure shift — with a stop anchored to the structural swing low or high rather than an arbitrary ATR distance. Designed for precision-entry traders across crypto, forex, gold, and indices on any timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 The Core Philosophy — Why Pull Back to OTE?
A Break of Structure or Change of Character tells you that the market has shifted direction at the institutional level. But the bar that breaks structure is rarely the optimal entry — it has already moved aggressively, the risk/reward from entry is reduced, and a pullback is statistically likely before the continuation begins.
The Optimal Trade Entry concept solves this. After a structural displacement move, price almost always retraces into a specific Fibonacci retracement zone — the 61.8% to 78.6% retracement of the displacement leg — before the next move in the structural direction begins. This zone is where institutional orders waiting at discount prices (in a bull structure) or premium prices (in a bear structure) are filled. Entering in the OTE zone means entering where institutions are entering, with the displacement leg already confirmed as the directional signal and the structural swing as the natural stop reference.
PIVOT detects every structural event, computes the OTE zone for the displacement leg in real time, and monitors for qualified rejection entries within that zone — all while running a 7-layer confluence engine that scores every potential entry before it fires.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏗 Market Structure Engine — Tracking BOS & CHoCH
The market structure engine runs a real-time fractal pivot detection system that tracks the most recent confirmed swing high and swing low on every bar, identifies every Break of Structure and Change of Character event, and maintains a live structural trend state.
Pivot detection:
Swing highs and lows are detected using a configurable pivot length (default: 5 bars each side). A pivot is confirmed when the specified number of bars on both the left and right side are lower (for a pivot high) or higher (for a pivot low). This creates confirmation — not just a local high or low, but a genuine fractal swing point.
Break of Structure (BOS):
When price closes above the most recent confirmed swing high while the structure is already bullish, a bullish BOS is detected — confirming the uptrend is intact and continuing. When price closes below the most recent swing low in a bearish structure, a bearish BOS is confirmed. BOS events are continuation signals — the existing structure is reinforcing itself.
Change of Character (CHoCH):
When price closes above a swing high while the structure is bearish, a bullish CHoCH is detected — the character of the market has changed from bearish to bullish. A bearish CHoCH is the inverse. CHoCH events are the highest-quality structural signals — they represent genuine institutional trend reversals and form the trigger for PIVOT's highest-conviction setup type.
Structure break mode:
The Close Only setting (default: on) requires a candle body close beyond the swing level for a BOS or CHoCH to register. When off, any wick touch counts. Body close is the stricter, cleaner mode — it eliminates false structure breaks caused by wick spikes that fail to close through the level, producing fewer but more reliable structural events.
Live swing levels:
The most recent confirmed swing high (plotted as a red dashed line) and swing low (yellow-green dashed line) are maintained on the chart in real time, extending forward until superseded by a new confirmed pivot. These levels represent the current active liquidity pools — the precise levels where the next sweep event is likely to occur.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📦 Structure Leg Box & Equilibrium — The Dealing Range
Every confirmed structure break event spawns a Structure Leg Box — a semi-transparent purple rectangle anchored to the displacement leg that produced the structural event. This box is the visual equivalent of the ANCHOR trend segment box, providing immediate context for the current structural move's price range.
Box construction:
For a bullish structure break, the leg box spans from the previous swing low (the origin of the displacement) to the close that broke structure — capturing the full range of the institutional displacement move. For a bearish structure break, it spans from the previous swing high down to the structure break close.
Equilibrium line:
The midpoint of the structure leg box — the 50% retracement level — is plotted as a purple dotted line extending forward. This is the leg's equilibrium level and the dividing line between discount (below EQ, favorable for longs) and premium (above EQ, favorable for shorts). The Premium/Discount requirement enforces that PIVOT signals can only fire when price is in the institutionally correct zone relative to this level.
Live updating:
The box expands as the trend develops — if price makes new highs in a bull leg, the box top extends upward. The equilibrium adjusts continuously. This ensures the OTE calculations always reflect the full extent of the current structural leg, not just the initial displacement.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 The OTE Zone — Optimal Trade Entry Band
The Optimal Trade Entry zone is a Fibonacci retracement band calculated from the structure leg's high and low — the 61.8% to 78.6% retracement zone (configurable). This is the institutional re-entry zone — the price area where sophisticated traders who missed the initial displacement fill their positions on the pullback.
OTE calculation for bull structure:
OTE Top = Leg High − (Leg Range × OTE Fib Low). Default: Leg High − (Range × 0.618)
OTE Bottom = Leg High − (Leg Range × OTE Fib High). Default: Leg High − (Range × 0.786)
This creates a band in the lower portion of the leg range — price must retrace between 61.8% and 78.6% of the upward displacement before the OTE zone is active.
OTE calculation for bear structure:
OTE Bottom = Leg Low + (Leg Range × OTE Fib Low)
OTE Top = Leg Low + (Leg Range × OTE Fib High)
This creates a band in the upper portion of the leg range — price must retrace between 61.8% and 78.6% of the downward displacement before the OTE zone is active.
Why the 61.8–78.6% zone: The 61.8% (golden ratio) and 78.6% (square root of 0.618) retracement levels are the two most consistently respected Fibonacci levels in institutional price delivery. They represent the deepest pullback levels that remain structurally valid — a retracement beyond 78.6% technically invalidates the structure leg's momentum. Entries within this zone maximize reward (entering near the deepest discount in a bull leg) while minimizing risk (the stop is at the structural swing, not far from the OTE bottom).
OTE zone visualization: A semi-transparent purple box rendered from the leg start bar to two bars beyond the current bar, spanning the OTE top and bottom prices. The zone extends and updates in real time as the leg evolves. The exact OTE band price levels are displayed on the dashboard for immediate reference.
In-OTE detection: The current bar is considered in the OTE zone when the bar's low (for bull setups) reaches within the OTE band, or the bar's high (for bear setups) reaches within the OTE band. This detects the precise moment price has retraced into the optimal entry area.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💧 Liquidity Sweep Detection
The sweep detection engine identifies liquidity grab events relative to recent price extremes, adding an important second dimension to PIVOT's entry context. A sweep is detected when price briefly extends beyond the recent high or low reference level by a minimum ATR depth, then reverses and closes back inside — the classic stop-hunt signature.
Bull sweep: The current bar's low extends below the lowest low of the lookback period (default: 20 bars) by at least the minimum sweep depth (default: 0.1× ATR), and the bar closes above that low and closes bullish (close above open). Sell-side liquidity has been grabbed.
Bear sweep: The high extends above the highest high of the lookback period by at least the minimum depth, and the bar closes below that high and closes bearish. Buy-side liquidity has been grabbed.
Sweep recency: PIVOT accepts sweeps from the current bar or either of the two preceding bars — a three-bar recency window. This accommodates the common scenario where the sweep candle precedes the OTE entry bar by one or two bars, allowing the confluence engine to credit the sweep even when entry occurs slightly after the grab.
Setup B — Sweep + CHoCH: When a sweep occurs within 40 bars of a Change of Character event and price is simultaneously in the OTE zone with a rejection candle, PIVOT's second setup type fires — the Sweep + CHoCH entry. This is the highest-conviction entry type: a CHoCH confirms the structural reversal, the sweep confirms institutional liquidity accumulation, and the OTE entry delivers the optimal price. All three institutional signals converging simultaneously.
Sweep markers (optional): Small orange circles can be plotted above or below bars where sweeps are detected. Off by default — sweeps count toward confluence scoring regardless of whether markers are displayed — but enabling them provides visual awareness of every liquidity event on the chart.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🕯 Rejection Candle Confirmation
Every PIVOT entry requires a qualifying rejection candle within the OTE zone — the candle that demonstrates price has touched the OTE level and been rejected back in the structural direction.
Bull rejection (Bullish Rejection or Engulfing):
Bullish Rejection — the bar closes bullish (close above open) and the close-to-low distance represents more than 55% of the bar's total range. The lower wick consumes the majority of the bar's range — buyers overwhelmed sellers that pushed into the OTE zone
Bullish Engulfing — a bullish close that fully engulfs the prior bearish candle — closing above the prior open while the prior candle was bearish. Confirms a clean reversal of the pullback momentum
Bear rejection (Bearish Rejection or Engulfing):
The mirror conditions — a bearish close with the high-to-close distance exceeding 55% of range, or a bearish engulfing of the prior bullish candle.
Why candle confirmation is essential: The OTE zone being touched is a necessary but not sufficient condition for entry. Price can drift through the OTE zone on low momentum without producing a genuine reversal. The rejection candle requirement ensures that the OTE touch produced a visible institutional response — not just a passive drift through the zone.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 The 7-Layer Confluence Engine
Every potential entry is evaluated across seven independent confluence layers. The default minimum is 5 of 7 — a high-quality gate that blocks setups where several dimensions of confirmation are missing.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 1 — Market Structure Direction
Awards 1 point when the current structural trend agrees with the signal direction — bullish structure for longs (structure == 1), bearish for shorts. This is also a hard prerequisite enforced in the setup conditions — no PIVOT signal can fire without the structural trend being established in the signal direction. Structure is simultaneously a confluence layer and a foundational entry requirement.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 2 — OTE Zone Touch
Awards 1 point when the current bar is within the OTE retracement band for the active leg direction — the 61.8–78.6% retracement zone. Also a hard prerequisite in the setup conditions. Ensures the entry is at the institutionally optimal retracement depth, not at an arbitrary price within the leg range.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 3 — Premium/Discount Zone
Awards 1 point when price is in the correct zone relative to the leg equilibrium — below EQ (discount) for bull entries, above EQ (premium) for bear entries. The PD Zone layer enforces the institutional entry positioning principle: buy when price is cheap relative to the leg's fair value, sell when expensive. A valid OTE touch in the wrong PD zone (above EQ for a bull entry) carries a fundamental positioning problem — this layer blocks it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 4 — HTF Bias
Awards 1 point when the higher timeframe EMA structure (default: 60-minute, 21/55 EMA) agrees with the signal direction, using the same strict condition as SURGE and ANCHOR — the HTF fast EMA must be above the slow EMA and the HTF close must be above the fast EMA for a bull vote. A bull OTE entry against a bearish HTF is a counter-trend trade; this layer ensures PIVOT's signals align with the macro institutional flow.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 5 — Liquidity Sweep
Awards 1 point when a qualifying sweep has occurred within the three-bar recency window in the correct direction. A sweep before or coinciding with the OTE entry dramatically increases the probability that the pullback is a genuine institutional accumulation event rather than a mechanical retracement. When the Sweep Filter is disabled, this layer is not available for scoring — the total achievable score drops to 6 of 6 in that configuration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 6 — Rejection Candle
Awards 1 point when a qualifying bull rejection or bullish engulfing candle (long) or bear rejection or bearish engulfing candle (short) is present on the current bar. This is the candle confirmation layer — confirming that the institutional response to the OTE touch is visible and decisive on the current bar.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 7 — ADX + Volume Expansion
Awards 1 point when both the ADX filter and the volume expansion filter pass simultaneously. ADX confirms the market has directional strength rather than ranging. Volume exceeding the moving average confirms genuine institutional participation on the entry candle rather than a low-activity drift through the OTE zone. Both conditions must be true for the single layer point — they are evaluated jointly.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏷 Two Setup Types — A and B
PIVOT fires signals through two distinct setup configurations, each representing a different institutional entry scenario. Both can be enabled simultaneously.
Setup A — OTE Pullback:
The foundational PIVOT setup. Fires when the market structure is established (BOS or CHoCH has confirmed), the displacement leg is active, price pulls back into the 61.8–78.6% OTE zone, a rejection candle forms within the zone, and the full confluence stack meets the minimum score. This is the highest-frequency setup type — it captures the standard institutional pullback sequence following any qualifying structure event.
Setup B — Sweep + CHoCH:
The premium PIVOT setup. Requires all Setup A conditions plus a Change of Character within the lookback window (40 bars) and a qualifying liquidity sweep within the three-bar recency window. The sequence is: liquidity sweep (stop hunt) → CHoCH (structural reversal confirmation) → OTE pullback (optimal entry). When all three institutional events converge simultaneously in the OTE zone with a rejection candle, this is among the highest-conviction setups available in the entire AlphaX indicator suite.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Structural Stop Loss Placement
PIVOT uses structurally anchored stop placement — the stop is placed beyond the most recent confirmed swing low (for bull entries) or swing high (for bear entries), plus a small configurable ATR buffer (default: 0.25× ATR).
Why this is the correct stop for OTE entries: The OTE entry is made on the premise that the structural swing low (bull) or high (bear) will hold — it is the key level whose violation would invalidate the entire structural thesis. If price closes through the swing low after a bull OTE entry, the structure leg is negated, the displacement was a false break, and the position thesis is fundamentally wrong. The structural swing is therefore not an arbitrary stop choice — it is the precise price at which the trade is provably wrong.
This produces stops that adapt naturally to the leg size: large legs with distant swings produce wider stops and wider profit targets; tight legs with nearby swings produce tighter, higher-precision entries. The risk/reward is computed dynamically as `(close − slGuide) × TP Reward (R)`.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 16-row real-time dashboard displays the complete internal state across four sections.
STRUCTURE
Market Struct — current structural trend: ▲ BULLISH, ▼ BEARISH, or — NEUTRAL
PD Zone — current position relative to leg equilibrium: ◧ DISCOUNT, ◧ PREMIUM, or — EQ
Leg EQ — the exact leg equilibrium price (50% of the structure leg range) in real time
OTE Band — the current OTE zone bottom and top prices. Updates live as the leg expands
FILTERS
HTF Bias — higher timeframe EMA alignment: ▲ BULL, ▼ BEAR, or — FLAT
ADX — live ADX value with ✓ or ✗ pass/fail
Session — ✓ ACTIVE or ✗ OFF
LEVELS
Swing Hi — the most recent confirmed fractal swing high price. This is the current sell-side liquidity level and bear structural reference
Swing Lo — the most recent confirmed fractal swing low. The current buy-side liquidity level and bull structural stop reference
CONFLUENCE
Bull Score — live 0–7 confluence score. Background highlights yellow-green when threshold is met
Bear Score — live 0–7 score. Background highlights red when threshold is met
Live confluence label: During BUILDING and active leg phases, a small label near the OTE zone on the last bar shows B x/7 · S x/7 in real time — identical to ANCHOR's live score display — so you can monitor confluence building without dashboard attention.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Structure Leg Box (purple, semi-transparent) — the dealing range of the current displacement leg from structural origin to current price extreme. Adapts as the leg evolves
OTE Band Box (purple, deeper tint) — the 61.8–78.6% retracement zone of the current leg, extending two bars beyond the current bar for forward visibility
Leg Equilibrium Line (purple dots) — the 50% midpoint of the structure leg, continuously updated
Swing High Line (red dashed) — the most recent confirmed fractal swing high
Swing Low Line (yellow-green dashed) — the most recent confirmed fractal swing low
▲ Small Triangle (BOS Bull) — bullish Break of Structure, semi-transparent yellow-green
▲ Large Triangle (CHoCH Bull) — bullish Change of Character, bright yellow-green, larger size
▼ Small Triangle (BOS Bear) — bearish Break of Structure, semi-transparent red
▼ Large Triangle (CHoCH Bear) — bearish Change of Character, bright red, larger size
● Circle (optional, orange) — sweep detection markers when Show Sweep Markers is enabled
▲ Large Triangle (bull signal) — PIVOT long entry. All conditions confirmed
▼ Large Triangle (bear signal) — PIVOT short entry
Live confluence label — B x/7 · S x/7 near the OTE zone on the current bar
SL Guide (red dotted circles) — structural stop loss level below/above the swing reference
TP Guide (yellow-green dotted circles) — dynamically computed reward target based on R multiple
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX PIVOT — Step by Step
Step 1 — Identify the Structural Context
Check the dashboard Market Struct row. ▲ BULLISH or ▼ BEARISH tells you the directional bias. — NEUTRAL means no structure is established — no setup can develop
Note the Swing Hi and Swing Lo levels on the dashboard. These are the current liquidity pools and structural stop references
Check HTF Bias — does the higher timeframe agree with the current structure? HTF alignment is worth 1 confluence point and significantly improves setup quality
Step 2 — Watch for a Structure Event
A large bright ▲ CHoCH triangle below the bar marks a bullish Change of Character — the highest-priority structural event. The structure leg box and OTE zone will draw immediately
A smaller ▲ BOS triangle marks a bullish Break of Structure — confirmation the trend is continuing
After either event, the Structure Leg Box and OTE Band are drawn in real time. Note where the OTE zone sits in absolute price terms from the dashboard's OTE Band row
Step 3 — Wait for the OTE Pullback
After the displacement, watch price retrace toward the OTE zone. The purple OTE box on the chart gives you the exact price boundaries
Check PD Zone on the dashboard — for bull entries, you want ◧ DISCOUNT to confirm price is below the leg equilibrium when it enters the OTE
Watch the live B x/7 score label near the OTE zone. As price approaches the zone, the score builds in real time
Step 4 — Enter on the PIVOT Signal
A ▲ triangle at the OTE zone confirms all conditions — structure direction, OTE touch, PD zone, HTF bias, sweep (if applicable), rejection candle, and ADX/volume
The SL guide is plotted below the structural swing low (bull) — your structural invalidation level
The TP guide is plotted at the computed reward target based on your configured R multiple
For Setup B signals (Sweep + CHoCH), all three institutional events have converged — this is the highest-conviction PIVOT entry available
Step 5 — Manage and Exit
At the TP guide level, take partial or full profit
If a new CHoCH fires in the opposite direction during the trade, the structure has reversed — this is the exit signal for any remaining position
If price retests the OTE zone again during the same structural leg without triggering a new signal (cooldown active), wait for the cooldown to clear and assess whether the fresh confluence score still meets the minimum
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
Market Struct shows — NEUTRAL — no structural direction is established. Without a confirmed BOS or CHoCH, the leg box and OTE zone have no directional context. Wait for a structural event to occur before looking for OTE entries
HTF Bias opposes structure direction — a bullish current timeframe structure against a bearish HTF is a counter-trend setup. These carry significantly lower success rates. The HTF alignment layer will not score, reducing the confluence count
Price is in the wrong PD zone for the setup direction — a bull entry above the leg equilibrium (premium) or a bear entry below (discount) means entering when price is institutionally expensive relative to the leg's fair value. The PD zone filter blocks these when enabled
Score is at 4/7 and the minimum is 5/7 — the setup is present but not enough layers confirm. Do not force entries when confluence is borderline
Structure events (BOS/CHoCH) are flipping rapidly in both directions — alternating bull and bear structure events in quick succession indicate a choppy market with no clean trend. The OTE zones will be constantly resetting without producing completed pullback sequences
OTE zone is very close to the swing low (bull) or swing high (bear) — when the OTE band and the structural stop reference are nearly at the same price, the risk/reward is poor. The stop would be just below the OTE entry. Reduce position size or pass the setup
The ideal PIVOT setup:
CHoCH event followed by a clean displacement leg with a well-defined leg box
Price retraces into the OTE zone while in discount (bull) or premium (bear)
A qualifying sweep has occurred within the last three bars
HTF Bias aligned with structure direction
Rejection candle forms within the OTE zone
Confluence score at 6/7 or 7/7
ADX confirms trending and volume is expanding
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
📐 Real-time market structure engine — fractal pivot detection with configurable sensitivity, tracking BOS and CHoCH events with body-close confirmation mode
📦 Structure Leg Box — automatically drawn from the structural origin to the current price extreme, expanding in real time as the leg develops
🎯 Optimal Trade Entry zone — 61.8–78.6% Fibonacci retracement band computed from the structure leg, rendered as a live OTE box and displayed with exact price levels on the dashboard
⚖ Leg Equilibrium line — 50% midpoint of the structure leg acting as the dynamic PD zone divider, plotted continuously and updated as the leg grows
💧 Liquidity sweep detection — identifies stop-hunt events relative to the recent price range with configurable ATR depth and three-bar recency window
🏅 Two setup types — Setup A (OTE Pullback after any BOS/CHoCH) and Setup B (Sweep + CHoCH + OTE — the highest-conviction institutional entry pattern)
🕯 Dual candle confirmation — bullish/bearish rejection candles and engulfing candles both qualify, ensuring the OTE touch produced a genuine institutional reversal response
🧠 7-layer confluence engine — Market Structure, OTE Touch, PD Zone, HTF Bias, Liquidity Sweep, Rejection Candle, and ADX + Volume Expansion all scored independently
📊 Live confluence label near OTE zone — B x/7 · S x/7 displayed in real time on the current bar without requiring dashboard reference
🎯 Structural stop loss — placed beyond the confirmed swing low (bull) or swing high (bear) plus ATR buffer, anchored to the genuine structural invalidation level
💹 Dynamic TP target — computed as `risk × R multiple`, adapting to leg size rather than using a fixed ATR distance
📡 HTF EMA bias filter — strict dual-condition HTF alignment (EMA crossover + price above fast EMA) for maximum higher timeframe conviction
🕐 Session filter — restricts signals to configurable active trading hours
📊 16-row live dashboard — Structure, Filters, Levels, and Confluence sections updated in real time
🔔 6 alert conditions — long/short entry, bull/bear CHoCH, sweep low, sweep high
🎨 Fully cohesive dual-tone color system — yellow-green for all bullish elements, red for all bearish, purple for structural reference levels and OTE zone, orange for sweeps
⚙ Fully configurable — pivot length, structure break mode, OTE Fibonacci levels, sweep depth and lookback, setup types, confluence minimum, HTF timeframe and EMAs, ADX, volume filter, session, SL buffer, TP reward multiple, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Structure Engine
Pivot Length (bars each side) — fractal sensitivity. 3 for scalping, 5 for standard intraday (default), 7+ for swing trading
Structure Break: Close Only — when on, requires a candle body close beyond the swing level (default: on). Off = wick touch counts
Show Active Swing Levels — toggle swing high and swing low dashed lines
Show BOS / CHoCH Markers — toggle all structure event triangles
CHoCH Only (hide BOS markers) — when on, only CHoCH events are marked. BOS events still update structure but are not labeled
Structure Leg & OTE
Show Structure Leg Box — toggle the displacement leg dealing range box
Show Leg Equilibrium (50%) — toggle the leg midpoint line
Show OTE Band (62–79%) — toggle the Fibonacci retracement entry zone box
OTE Fib Low — lower Fibonacci level of the OTE band (default: 0.618)
OTE Fib High — upper Fibonacci level of the OTE band (default: 0.786)
Require Premium / Discount — when on, longs require discount positioning, shorts require premium (default: on)
Liquidity Sweep
Enable Sweep Filter — when on, Layer 5 scores the recent sweep and Setup B becomes available
Show Sweep Markers — toggle optional orange circle markers at sweep detection bars
Min Sweep Depth (xATR) — minimum wick extension beyond the reference extreme to qualify as a sweep (default: 0.1)
Sweep Reference Lookback — bars used to define the recent high/low reference for sweep detection (default: 20)
Entries & Confluence
Setup A · OTE Pullback — enable standard OTE pullback entries after BOS or CHoCH
Setup B · Sweep + CHoCH — enable the premium sweep + reversal + OTE setup type
Min Confluence Layers (of 7) — minimum score required for a signal (default: 5)
Show Entry Signals — toggle signal triangles
Show Confluence Label — toggle the live B/S score label near the OTE zone
Signal Cooldown (bars) — minimum bars between consecutive signals (default: 8)
Filters
HTF Trend Filter — toggle the higher timeframe EMA alignment requirement
HTF Timeframe — the higher timeframe for EMA data (default: 60-minute)
HTF Fast / Slow EMA — EMA periods on the HTF (defaults: 21 / 55)
ADX Trend Filter — toggle the ADX strength requirement (default: off)
ADX Length / ADX Minimum — ADX parameters (defaults: 14 / 18)
Volume Expansion Confirm — when on, entry candle volume must exceed the moving average by the minimum multiplier
Min Volume vs Avg — minimum volume ratio for the expansion filter (default: 1.1)
Volume Avg Length — SMA length for the volume baseline (default: 20)
Session Filter — toggle active hours restriction (default: off)
Active Session — configurable session window
Exit Guidance
ATR Length — lookback for ATR calculation (default: 14)
Show SL / TP Guides — toggle stop and target dotted circle plots
SL Buffer Beyond Swing (xATR) — additional ATR buffer beyond the structural swing stop reference (default: 0.25)
TP Reward (R) — take profit distance as a multiple of the risk from entry to stop (default: 2.0)
Display
Show Dashboard — toggle the full dashboard panel
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Bull Bright — yellow-green family for bullish signals, fills, and labels
Bear / Bear Bright — red family for bearish signals, fills, and labels
Sweep / Alert — orange for sweep markers and alerts
Equilibrium / OTE Band — purple for structural reference levels and OTE zone
SL Guide / TP Guide — stop and target circle colors
Bull / Bear Label Text — text color for signal labels
Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (6 total)
Entry Alerts
Pivot Long Entry — all conditions confirmed for a long OTE setup. Signal label fired
Pivot Short Entry — all conditions confirmed for a short OTE setup
Structure Alerts
Pivot Bull CHoCH — bullish Change of Character detected. Watch for OTE pullback in discount zone
Pivot Bear CHoCH — bearish Change of Character detected. Watch for OTE pullback in premium zone
Sweep Alerts
Pivot Sweep Low — sell-side liquidity swept below recent lows. Potential long setup developing
Pivot Sweep High — buy-side liquidity swept above recent highs. Potential short setup developing
All alert messages are formatted as const strings for clean webhook and notification platform integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD on M5–M15 , with general suitability for major forex pairs and crypto on the same timeframes:
Pivot Length at 5 — the classic fractal sensitivity for intraday gold and forex. Balances signal frequency with structural significance
Close Only on — body close structure breaks eliminate the vast majority of wick-based false breaks on gold and volatile instruments
Setup B (Sweep + CHoCH) on — the highest-quality setups on gold involve a sweep before the CHoCH, making this setup type particularly effective on XAUUSD
HTF at 60-minute — the standard intraday reference for M5–M15 trading
ADX filter off by default — the OTE + rejection candle requirements already provide strong quality filtering without needing ADX as an additional gate
For other instruments or timeframes, adjust:
M1–M3 scalping — reduce Pivot Length to 3, increase Cooldown to 5, reduce TP Reward to 1.5, use tight session filter
H1–H4 swing trading — increase Pivot Length to 7–10, set HTF to Daily or Weekly, increase TP Reward to 3.0–4.0, increase SL Buffer to 0.5
Crypto (BTC, ETH) — increase Sweep Depth to 0.2–0.3× ATR for the wider wicks typical of crypto, consider enabling ADX filter at 20
Indices (NAS100, US30) — use Pivot Length 5–7, enable Session Filter to 09:30–16:00, enable ADX filter
More signals — lower Min Confluence to 4, disable PD Zone requirement, enable Setup A only, reduce Cooldown
Ultra-selective entries only — raise Min Confluence to 6 or 7, require Setup B only, enable ADX filter, enable Volume Expansion
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🎯 OTE and Fibonacci pullback traders — PIVOT is the definitive quantitative implementation of the Optimal Trade Entry framework. Every component — structure detection, leg computation, Fibonacci zone rendering, and rejection confirmation — is automated and scored
🏦 Smart money concepts and ICT methodology traders — PIVOT encodes the CHoCH → displacement → OTE pullback sequence that forms the core of ICT's entry model. The Sweep + CHoCH setup type specifically captures the stop hunt → reversal → optimal entry sequence
🥇 Gold (XAUUSD) and forex traders — the default settings are calibrated for intraday gold trading, where OTE pullbacks after CHoCH events are among the most consistent institutional patterns available
📊 Traders who want structure-defined risk — the structural stop placement means every trade has a stop at a genuinely meaningful level — the swing that would invalidate the structure thesis — rather than an arbitrary ATR distance
🧠 Systematic traders who want to quantify OTE entries — the 7-layer scoring system removes subjectivity from OTE trading. Every potential entry is scored objectively against the same seven criteria on every bar
📈 Traders who want to enter later at a better price — PIVOT's entire philosophy is about waiting for the pullback. If you consistently enter at breakouts and then watch price retrace before continuing, PIVOT is the solution — it waits for that retracement and enters at the optimal Fibonacci level within it
⚠ Traders who struggle with stop placement — the structural swing reference + ATR buffer produces a stop that makes structural sense. You are not guessing where to put the stop — the market's structure tells you exactly where it belongs
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. Pivot detection, structure break logic, OTE zone calculation, and confluence scoring all finalize on confirmed bars only
The pivot detection has an inherent offset of pivotLen bars — a pivot is only confirmed after pivotLen bars have passed on both sides. This is standard behavior for fractal-based pivot systems and is not repainting — it is the mathematical requirement for confirming the fractal pattern
The Structure Leg Box and OTE Zone are redrawn only on the last bar for chart cleanliness. Historical bars retain signal markers and BOS/CHoCH labels but do not show outdated box overlays
The CHoCH window for Setup B (40 bars) means a Sweep + CHoCH setup can fire up to 40 bars after the CHoCH event, as long as the OTE zone is still valid and all other conditions are met. On slower timeframes this window covers a wider clock-time range — adjust if needed
The confluence label near the OTE zone is drawn only on the last bar. It is a real-time awareness tool, not a historical indicator
Maximum 500 labels, 500 lines, and 80 boxes are rendered. On very active charts, the oldest markers may be removed by TradingView's limits
The session filter is off by default — PIVOT's structural approach is timeframe and session-agnostic. Enable the session filter for instruments where specific sessions (London, NY) produce more reliable structure events
The TP guide is computed dynamically as risk × R multiple. On bars where the swing reference and current price are very close (producing near-zero risk), the fallback is ATR × R multiple
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ 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 know that the move has already started — and who want to enter it at the precise price where the institutions who created the move are still adding to their position. Indicador

Dynamic Visible AVWAPDynamic Visible AVWAP is a visible-range anchored VWAP tool designed to help traders read active price interaction with important visible swing areas.
The script automatically anchors AVWAP lines from the highest high and/or lowest low inside the currently visible chart range. This makes the tool dynamic: when the visible chart area changes, the anchors are recalculated from the new visible range.
Additional AVWAPs can be enabled with the AVWAP Count setting. When more than one AVWAP is selected, the script adds extra anchors from the next valid swing highs or swing lows. This allows multiple AVWAP references to be displayed at the same time, creating a clearer view of potential confluence zones.
Main features:
Dynamic AVWAP based on the currently visible chart range
Long, Short, or All display modes
Optional multiple AVWAPs per side
Optional deviation channels around each AVWAP
Optional channel fill
Separate style controls for AVWAP lines, channels, arrows, and anchor text
Optional anchor arrows and custom anchor label text
Adjustable text size for anchor labels
Optimized line budgeting to keep the script stable when multiple AVWAPs are displayed
How it can be used:
Dynamic Visible AVWAP can help identify areas where price is interacting with volume-weighted mean levels from important visible swing points. These levels may be useful for context, confluence, pullback analysis, trend continuation review, or mean-reversion observation.
Important note:
The anchors are based on the currently visible chart range. If you zoom, scroll, or change the visible area of the chart, the AVWAP anchors may change because the script recalculates the highest high, lowest low, and additional swing anchors from the new visible range.
This indicator should be used together with broader market analysis, such as structure, volume, liquidity, higher-timeframe levels, and personal risk management. Indicador

Rebound V-ScoreRebound V-Score
Scores Rebound V-Fib setups across timeframes. It runs both engines - RT (long / V-bottom rebound) and Closer (short / inverted-V breakdown) - on three selectable timeframes at once (default 1H, daily, weekly) and outputs ranking scores plus per-timeframe readouts for sorting and filtering across symbols. The score is built on the same V-Fib metric (where price sits on the slanted Fib) as the rest of the family. Built for the Pine Screener; no chart drawing, but it also runs on a chart.
For US equities by default. Adjust 'Trading hours per day' for other markets (default 6.5).
Each (direction x timeframe) produces a 0-1 "readiness" - how close that setup is to firing - blended into RT Score and CL Score. Columns are suffixed A / B / C, naming the slot, not the timeframe.
SCORES (sort / filter keys, also on the status line)
RT Score / CL Score (0-3) - long / short readiness across A/B/C. Sort descending for the best long / short candidates.
V-Score (-3..+3) = RT Score - CL Score - net direction. RT/CL are kept separate too, so a timeframe conflict shows as both high.
ENTRY SIGNALS + ALERTS (both directions)
Entry L / Entry S (Any, A, B, C) - long / short trend-entry on a timeframe, gated by the opposite Score (long needs no breakdown, short needs no rebound).
Alerts "Long entry" / "Short entry" (any TF, A, B, C) - one-shot per setup. Use "Once Per Bar Close".
PER-TIMEFRAME READOUTS (Data Window + Screener)
For each of A / B / C: RT/CL V-Fib (position on the slanted Fib), RT/CL Age (bars since firing), V-Trend (RT-CL, %/day). Plus % change 3M / M / W / D (close vs 63 / 21 / 5 / 1 daily bars ago).
INPUTS
Timeframe A / B / C and their Score weights (default 6:3:1, leaning on slot A; normalized, only the ratio matters).
Entry L max CL Score / Entry S max RT Score - the opposite-direction gate for each signal.
Trend / entry thresholds and Score weights (V-Fib zone / trend / lead, default 6:3:1) - same as Rebound V-Fib RT / Closer.
Notes: Pine Screener is limited to 500 bars and 5 unique request.* calls (this uses 4). The score measures readiness, not expected return.
DISCLAIMER
This script is provided "AS IS" without warranty of any kind. It is for informational purposes only and does not constitute financial advice. Past performance is not indicative of future results. The author is not liable for any losses arising from the use of this script. Trade at your own risk.
Indicador

Support & Resistances&r mtf is a support and resistance indicator designed to display clean zones directly on the chart.
the script automatically detects support zones from pivot lows and resistance zones from pivot highs. each zone is displayed with a rectangle, a dotted center line, and an optional label.
the goal is to help the trader identify important areas where price may react, reject, break, or come back for a retest.
the mtf version allows zones from a higher timeframe to be displayed on a lower timeframe. for example, daily zones can be displayed on an h1, 30 minute, or 15 minute chart.
this script is not an automatic buy or sell system. it is designed to read market structure, prepare decision zones, and avoid trading without context.
main features
automatic support zones
automatic resistance zones
chart mode or mtf mode
display higher timeframe zones on the current chart
support only below price
resistance only above price
left zone extension
right zone extension
merge zones that touch
merge zones that are too close according to the minimum distance setting
keep the lowest support when zones merge
keep the highest resistance when zones merge
strong candle break filter
optional candle close confirmation
doji filter
atr strength filter
force percentage inside the label
support break alerts
resistance break alerts
clean display with rectangles, center lines, and labels
how the script works
the script creates a resistance zone when a pivot high is confirmed.
the script creates a support zone when a pivot low is confirmed.
a resistance is valid only when it is above the current price.
a support is valid only when it is below the current price.
if two support zones touch or are too close, they are merged and the lowest support is kept.
if two resistance zones touch or are too close, they are merged and the highest resistance is kept.
if price breaks a zone with the selected break conditions, the zone can be removed and an alert can be triggered.
chart mode
chart mode uses the current chart timeframe.
example:
if the chart is on 30 minutes, the zones are calculated from the 30 minute chart pivots.
this mode is useful for reading the exact timeframe you are trading.
mtf mode
mtf mode calculates zones from a higher timeframe and displays them on the current chart.
example:
you are on an h1 chart.
you enable mtf mode.
you choose the daily timeframe.
the script displays daily zones directly on the h1 chart.
this helps keep major market zones visible while trading intraday.
mtf use case example
if you trade on 30 minutes, you can display daily zones.
this helps avoid buying directly under a daily resistance or selling directly above a daily support.
mtf zones are often more important than small lower timeframe zones because they come from a wider market structure.
beginner tutorial
step 1: enable the module
enable the support and resistance module.
if the mode is set to chart, the script uses the current chart timeframe.
if the mode is set to mtf, the script uses the timeframe selected in the mtf settings.
step 2: choose the mode
use chart if you want zones from the current timeframe.
use mtf if you want to see zones from a higher timeframe.
simple example:
for scalping on 10 minutes, display h1 or daily zones.
for trading on h1, display daily zones.
for trading on h4, display daily or weekly zones.
step 3: watch support zones
support zones are located below price.
a support can be used as an area of interest to look for a bullish reaction.
a beginner can wait for a wick rejection, a bullish close, or a reclaim above the zone before looking for a possible long setup.
step 4: watch resistance zones
resistance zones are located above price.
a resistance can be used as an area of interest to look for a bearish reaction.
a beginner can wait for rejection, a bearish close, or a failed breakout before looking for a possible short setup.
step 5: do not trade a zone alone
a zone is not an automatic signal.
you should wait for confirmation.
possible confirmations:
price reaction
wick rejection
clean close
volume
trend alignment
confirmed breakout
zone retest
step 6: use the merge logic
if several zones touch or are too close, the script groups them together.
this helps avoid a chart filled with useless overlapping zones.
for supports, the lowest level is kept.
for resistances, the highest level is kept.
step 7: use the minimum distance setting
minimum distance helps prevent zones from being created too close to each other.
if you lower the distance, the script accepts more zones.
if you increase the distance, the chart becomes cleaner and more selective.
even if the minimum distance is low, two zones that really touch should remain merged.
input explanation
enable s/r module
turns the support and resistance module on or off.
zone source mode
selects the source of the zones.
chart uses the current timeframe.
mtf uses the selected higher timeframe.
mtf zone timeframe
selects the timeframe used to calculate mtf zones.
example:
daily to display daily zones on h1 or 30 minute charts.
weekly to display weekly zones on h4 or daily charts.
pivot length
controls pivot sensitivity.
a lower value creates more zones and reacts faster.
a higher value creates fewer zones but makes them more selective.
number of visible zones
sets the maximum number of visible zones.
a lower value gives a cleaner chart.
a higher value shows more historical structure.
show s/r labels
shows or hides zone labels.
labels can display the zone type, percentage distance, and force value.
show only 2 active zones
keeps only the latest active resistance and the latest active support.
this is useful for a very clean chart.
minimum distance between zones
sets the minimum space between zones.
the higher the value, the fewer close zones will remain.
the lower the value, the more close zones the script accepts.
zone left extension
extends zones to the left.
this helps show the visual origin of a zone.
zone right extension
extends zones to the right.
this projects the zones into the future.
confirm breaks only on candle close
when enabled, a break is confirmed only after the candle closes.
this reduces false breaks during a live candle.
break equals full body outside zone plus strong candle
when enabled, the script requires the full candle body to close outside the zone with enough strength.
this makes break detection stricter.
max doji body to range
defines when a candle is considered a doji.
a doji is a candle with a small body.
doji candles can be ignored to avoid weak break signals.
min strength body to range
defines the minimum body size compared to the full candle range.
a higher value requires a stronger candle.
min strength body greater or equal atr multiplier
defines the minimum body strength compared to atr.
the higher the value, the stronger the break candle must be.
show force percent
shows the zone penetration force inside the label.
cap force percent
limits the displayed force value to avoid very large numbers.
max cap percent
sets the maximum displayed value when the force cap is enabled.
alert break resistance
enables the alert when a resistance zone is broken.
alert break support
enables the alert when a support zone is broken.
bullish use case example
price comes back to a support zone.
the support remains below price.
the market shows a bullish reaction.
a rejection candle appears.
the trader can then watch for a possible long setup, especially if the general trend is bullish.
bearish use case example
price comes back to a resistance zone.
the resistance remains above price.
the market shows rejection.
a bearish candle appears.
the trader can then watch for a possible short setup, especially if the general trend is bearish.
mtf example
you trade on h1.
you enable mtf mode.
you choose daily.
daily zones appear on the h1 chart.
if price reaches a daily resistance, the trader avoids buying too late.
if price returns to a daily support, the trader watches for a possible reaction.
beginner tips
do not trade every zone automatically.
always wait for price reaction.
avoid buying directly below resistance.
avoid selling directly above support.
use mtf zones as major decision areas.
always use a stop loss.
use proper position sizing.
combine the zones with trend, volume, candlesticks, and market structure.
important note
this script does not guarantee results.
supports can break.
resistances can break.
the best use of this tool is to treat it as a map of important market zones, combined with strict risk management and personal confirmation before each trade.
Indicador

Indicador

Indicador

Dynamic Gravity Attractor (DGA) [MarkitTick]💡 An advanced technical indicator designed to identify, weight, and visualize significant price zones using a physics-inspired gravitational model. By treating historical price pivots as physical masses that exert gravitational pull on the current price, this tool dynamically highlights levels of high structural importance. This offers traders a unique, quantitative perspective on support, resistance, and the overarching market equilibrium based on continuous volume and touch data.
✨ Originality and Utility
Unlike standard static support and resistance indicators that simply draw horizontal lines at arbitrary swing highs and lows, this system introduces a dynamic, weighted engine based on volume execution and touch frequency.
Traditional indicators often clutter the chart with dozens of obsolete lines. This tool resolves the issue by clustering proximate price levels using an Average True Range based spatial resolution. This synthesizes fragmented levels into cohesive, highly actionable Gravity Zones.
The core utility lies in its ability to quantify the relative strength of these zones using a gravitational constant. Instead of merely sorting by recency, it sorts by actual structural pull. This allows traders to cleanly distinguish between minor intraday speed bumps and major macroeconomic price attractors that have a high probability of influencing future price routing.
🔬 Methodology and Concepts
The script operates on a robust foundation of interconnected logical pillars, ensuring a precise reading of historical market structure:
• Pivot Detection and Clustering: The indicator identifies standard non-repainting pivot highs and lows using a defined lookback window. Instead of plotting each pivot individually and causing chart noise, it evaluates if a new pivot falls within an existing cluster radius. This radius is dynamically determined by a user-defined percentage of the 14-period Average True Range. If a match is found, the cluster aggregate price, volume, and touch count are updated using a volume-weighted average formula.
• Mass Calculation: Each clustered zone is assigned a quantitative mass. This mass is a blended metric derived from the total trading volume transacted at that specific level and the frequency of price touches it has endured. Users can dynamically adjust the weighting of these two components to favor volume-heavy execution levels or frequently tested psychological levels.
• Gravitational Pull: Applying a concept directly akin to classical physics, the indicator calculates the gravitational force of each active zone relative to the current closing price. The formula incorporates the zone calculated mass, a user-defined Gravitational Constant, and the inverse square of the absolute distance between the zone and the current price.
• Net Force and Equilibrium: By aggregating the gravitational pull of all active zones above the current price and subtracting the zones below, the script calculates a continuous Live Net Force. This net force dictates the overall directional bias of the underlying market structure.
🎨 Visual Guide
The tool provides a rich, multi-layered visual experience, utilizing dark-mode optimized palettes to allow traders to interpret complex market structures at a rapid glance:
• Gravity Zone Lines: Horizontal lines representing the clustered price levels. The strongest mathematical attractor is plotted with a solid line, while weaker zones use dashed line styles to indicate secondary importance. The thickness of the line directly correlates with its top-ranking status.
• Zone Colors: Levels situated above the current price are colored in a visual gradient from vibrant purple to deep violet, representing resistance or overhead gravity. Levels situated below are colored in a gradient from yellow to dark orange, representing support or underlying gravity. The color intensity and opacity scale dynamically with the calculated mass of each zone.
• Gravity Fields (Halos): Semi-transparent background boxes surrounding the strongest top-ranked gravity zones. The vertical height of the box represents the zone mathematical sphere of influence, calculated using the true range and the zone specific mass.
• Gravity Center: A distinct dotted cyan line plotting the weighted center-of-mass between the strongest overhead attractor and the strongest underlying attractor. This acts as the market current fulcrum.
• Dynamic Labels: Textual tags attached to the right of the gravity lines. These indicate the exact price level, an arrow denoting if the force is pushing up or down, and a percentage representing its gravitational strength relative to the maximum active zone.
• Heatmap Candles: The main chart candles are recolored based on the Live Net Force. A bullish bias paints the candles in a specific underlying color, while a bearish bias paints them in an overhead color. Border and wick colors adapt similarly to show micro-shifts in pressure.
• Gravity Dashboard: A comprehensive on-chart data table displaying the active number of tracked levels, the exact prices of the top upper and lower attractors, the Net Force bias, the current cluster size, and a visual block-bar representation of the highest active mass percentage.
📖 How to Use
• Trend Identification: Observe the Heatmap Candles and the Net Force metric on the Gravity Dashboard. A sustained bullish color bias suggests the price is being pulled upward by a stronger overhead attractor or violently pushed from a massive underlying support base. Traders should look to align their directional trades with this dominant net force.
• Targeting and Exits: Use the strongest Gravity Zone Lines as primary profit targets or areas to scale out of positions. Because these zones possess high mass, price tends to inevitably gravitate toward them over time.
• Entry Confirmation: Wait for the price to enter a Gravity Field. If price action demonstrates rejection patterns, long wicks, or volume anomalies within these specific halo zones, it provides a high-probability entry for mean-reversion trades.
• Equilibrium Trading: The Gravity Center line represents a literal point of balance between the primary opposing structural forces. Observing the price crossing, retesting, and holding this level can indicate a fundamental shift in structural control from sellers to buyers, or vice versa.
• Automated Alerts: The script includes built-in alert conditions for when the price comes within a tight proximity to the strongest above or below zones. It also fires alerts when the overall Net Force shifts direction. All alerts and webhooks are constructed as strictly formatted JSON strings designed for flawless third-party execution, dynamically calculating and including the Entry Price, the precise Take Profit target, and the exact Stop Loss invalidation price.
⚙️ Inputs and Settings
• History Depth (bars): Determines how far back in time the script looks to evaluate active pivots. A higher number tracks long-term macro zones, while a lower number focuses on immediate intraday structure.
• Number of Gravity Zones: Limits the maximum number of attractor lines drawn on the chart to prevent visual clutter.
• Level Cluster Resolution (ATR%): Controls how closely pivots must be to merge into a single, heavier zone. A higher value aggregates more historical levels together, creating fewer but stronger zones.
• Gravitational Constant G: A mathematical multiplier that scales the overall gravity calculations. Adjusting this tweaks the sensitivity of the Net Force output.
• Mass Components (Volume & Touch Weight): Fractional sliders allowing the user to adjust whether a zone mass is more heavily derived from transacted volume or the sheer number of times the price has historically tested the level.
• Minimum Touch Count: The baseline number of times a price level must be tested before it is officially registered as having enough mass to generate gravity.
• Visual Settings: Comprehensive toggles to independently turn lines, text labels, halo fields, the dashboard table, and center-of-gravity boxes on or off according to individual visual preference and chart cleanliness. All colors are fully user-configurable without hardcoding.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The tool borrows directly from classical mechanics, specifically the law of universal gravitation, to mathematically model financial market microstructure. In standard physics, the attractive force of gravity between two independent objects is directly proportional to the product of their masses and inversely proportional to the square of the distance between their centers.
In the context of this script, the current market closing price acts as a dynamic point mass navigating a static field of larger, stationary masses, representing the historical support and resistance clusters. The script operationalizes this concept by calculating Mass as a composite statistical index of cumulative trading volume and historical test frequency. Volume acts as the density of the price level, representing committed capital and trapped liquidity, while touch frequency represents the psychological reinforcement and memory of the level among market participants.
By rigidly utilizing the inverse square law of distance, the indicator mathematically guarantees that nearby price levels exert exponentially more influence on current price action than distant levels. This accurately reflects the highly localized nature of market liquidity, order book depth, and slippage. Furthermore, the clustering algorithm employs a dynamic threshold based on Average True Range, introducing a volatility-normalized spatial resolution. This specific mechanism ensures that the radius of a mass point expands in highly volatile environments and contracts in tight consolidations, strictly adhering to established principles of adaptive signal processing, robust statistical smoothing, and dynamic time warping.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicador

Elaris Failed Breakout DetectorFailed Breakout Detector
The **Failed Breakout Detector** is designed to help traders identify situations where price briefly breaks above resistance or below support, but fails to sustain the move and quickly returns back inside the previous trading range.
These events are commonly referred to as **failed breakouts**, **bull traps**, **bear traps**, or **liquidity sweeps**. They can indicate that buying or selling pressure was unable to maintain the breakout, potentially leading to a move in the opposite direction.
Instead of relying on a single candle pattern, this indicator combines multiple confirmation techniques to improve signal quality, including:
• Automatic support and resistance detection using confirmed swing pivots.
• Configurable breakout buffer to reduce sensitivity to minor price movements.
• Detection of failed breakout and failed breakdown events within a user-defined number of bars.
• Optional volume confirmation to require stronger participation during the initial breakout.
• Optional rejection wick analysis to identify stronger rejection candles.
• Optional EMA trend filter for users who prefer trading with the prevailing trend.
• Dynamic support and resistance zones based on ATR.
• Signal confidence score for additional context.
• Optional dashboard displaying current structure and trend information.
• Built-in alert conditions for long, short and combined signals.
How it works
**Failed Breakout (Short Setup)**
1. Price closes above a confirmed resistance level.
2. Within the specified number of candles, price closes back below that resistance.
3. Optional filters such as volume, wick rejection and trend confirmation are evaluated.
4. A bearish failed breakout signal is generated.
**Failed Breakdown (Long Setup)**
1. Price closes below a confirmed support level.
2. Price quickly closes back above that support.
3. Optional confirmation filters are applied.
4. A bullish failed breakdown signal is generated.
Inputs
The indicator allows users to customize:
• Pivot sensitivity
• ATR-based breakout buffer
• Support and resistance zone size
• Maximum number of bars allowed before the breakout is considered valid
• Volume confirmation
• Rejection wick requirements
• EMA trend filtering
• Dashboard visibility
• Signal labels
• Alert conditions
Notes
• Swing levels are created from confirmed pivot highs and lows. Because pivots require confirmation, support and resistance levels are confirmed after the selected right-side pivot bars.
• Signal markers themselves do not repaint after they appear.
• This indicator is intended as a technical analysis tool and should be used alongside sound risk management and additional market context.
• No indicator can guarantee future market direction.
If you find this indicator useful, consider leaving a like and sharing your feedback. Constructive suggestions are always appreciated and help improve future updates.
Indicador

High/Low Resistance LiquidityDescription
Not all liquidity pools are created equal. The market behaves very differently when attacking a clean, pristine target versus when it is grinding through jagged, already-swept price action.
The High/Low Resistance Liquidity indicator is an automated structural mapping engine that programmatically identifies and categorizes liquidity pools into Low Resistance (LRLR) and High Resistance (HRLR) targets in real-time.
🎯 What is LRLR and HRLR?
LRLR (Low Resistance Liquidity Run): These are "clean" targets. When stops are perfectly clustered at the exact same price, it creates a massive, unobstructed magnetic pull for price. When price attacks these areas, it displaces quickly and aggressively.
HRLR (High Resistance Liquidity Run): These are "dirty" or swept targets. If a pivot high has already swept a previous high and rejected (a false breakout or sweep), the liquidity resting there was already purged. Price will struggle, chop, and overlap heavily if it attempts to push back into that isolated zone.
✨ Key Features
Automated Target Detection: The indicator maps structural highs and lows using customizable left/right bar pivot confirmations, and immediately evaluates their relationship to the previous market structure.
EQH/EQL Detection (LRLR): If a new structural pivot forms within a tight tick threshold of the previous pivot, it validates them as Equal Highs or Equal Lows. A solid, highly visible line is drawn forward, marking a pristine Low Resistance target.
Swept Pivot Detection (HRLR): If a new pivot extends past the old pivot and reverses, it validates a sweep. A dotted warning line is drawn forward, marking a High Resistance target where price is likely to struggle.
Real-Time Mitigation: The script actively monitors price action. The exact moment a future candle wicks or closes through an active liquidity line, the line stops extending and its label updates to "Mitigated", keeping your charts completely free of historical clutter.
Standard Liquidity Toggle: Choose whether you only want to see explicit LRLR/HRLR targets, or if you want to also track all standard, unmitigated intermediate pivots in the background.
⚙️ Settings
Pivot Strength: Fully customize how many bars are required left and right to confirm a major structural point.
EQH/EQL Tolerance (Ticks): You dictate exactly how tight the price must align to be considered "Equal". (e.g., 5-10 ticks on lower timeframes, or expand it for Daily charts).
Display Settings: Toggle the visibility of Standard Unmitigated Pivots, turn text labels on or off, and fully customize the line colors to fit your exact chart aesthetic. Indicador

High / Low Resistance Liquidity TrendDescription
This indicator is a powerful, algorithmic tool designed for HRLR methodologies. It removes the subjectivity of identifying High Resistance Liquidity Runs (HRLR) and Low Resistance Liquidity Runs (LRLR) by dynamically mapping out the structural flow of liquidity on your chart using clean, point-to-point trendlines.
🎯 Core Concepts
In this methodology, understanding whether price will face "resistance" when drawing to a liquidity pool is critical for trade management:
Low Resistance Liquidity (LRLR): Clean, engineered liquidity. When price fails to sweep a previous structural extreme, it leaves behind smooth, resting stop-losses. This acts as a frictionless magnet for price.
High Resistance Liquidity (HRLR): Swept liquidity. When price violently takes out a previous extreme and reverses, it purges the local stop-losses. Returning to this level is a "High Resistance" run because the liquidity fuel has already been burned.
⚙️ How It Works
The script evaluates price action in real-time, detecting structural Pivot Highs and Pivot Lows. It then dynamically draws trendlines connecting adjacent pivots to reveal the underlying liquidity texture:
🟢 LRLR (Green Lines) - Failed Sweeps:
Highs: Connects a Pivot High to a subsequent Lower High.
Lows: Connects a Pivot Low to a subsequent Higher Low.
Signal: Clean trendline liquidity is building. Expect a fast, low-resistance run through this level.
🔴 HRLR (Red Lines) - Liquidity Sweeps:
Highs: Connects a Pivot High to a subsequent Higher High.
Lows: Connects a Pivot Low to a subsequent Lower Low.
Signal: A Turtle Soup / Sweep has occurred. Price may struggle to break this extreme cleanly.
✨ Visual Polish
This indicator is built with extreme attention to aesthetic detail. Rather than messy labels cluttering the wicks, the text (LRLR / HRLR) is mathematically positioned at the exact midpoint of the connecting trendlines. It features a custom Label Masking engine that dynamically cuts out the line exactly where the text sits, providing a stunning, ultra-clean look. (Note: Use the 'Chart Background Color' setting to ensure the label mask matches your specific TradingView theme).
🔧 Settings
Pivot Left/Right Bars: Fully customize the structural lookback to define exactly what constitutes a valid swing high/low for your timeframe.
Visual Customization: Full control over colors and text labels.
Chart Background Mask: Allows you to swap the label cutout color between Light Mode and Dark Mode backgrounds flawlessly. Indicador

Ehlers Adaptive Trend Filter + Consensus Engine v13Ehlers Adaptive Trend Filter + Consensus Engine
WHAT IT DOES
This screener reads a universe of up to 40 tickers through three independent Ehlers filter pairs running in parallel on every name, then groups the names by how many of the three filters agree the trend is up. The grouping is the "phase"; the intensity and direction of each name's move is the "temperature". It describes the structural state of each name. It does not tell you what to trade.
Because the three filters react at different speeds, the number that agree is a measure of how broadly a trend is confirmed across timescales: a move that only the fastest filter sees is early or fragile; a move all three see is broadly confirmed.
THE THREE FILTERS
Fast (2-pole SuperSmoother): the most reactive. It turns first and catches short-cycle moves, at the cost of more false turns.
Core (3-pole + 2-pole): the balanced middle. Slower to turn, steadier once it does. In most conditions it is the strongest single read.
Adaptive (MAMA/FAMA): retunes itself to the dominant detected cycle rather than using a fixed period. It often turns before the other two at a genuine cycle change, which is why an Adaptive-only signal is treated as an early, unconfirmed one.
THE FOUR PHASES
Heated: all three filters agree the trend is up. The fullest agreement the engine measures.
Liquid: two of three agree; one dissents. The dissenter is where the interest lies.
Thawing: one of three agrees. The earliest single-timescale turn, not yet confirmed.
Frozen: none agree. No bullish consensus.
Within each phase a per-row temperature word (Boiling, Hot, Simmering, Warming, Cooling, Cold, Freezing) describes how far the name sits from its own normal range and whether that separation is rising or falling. Direction is shown by an arrow, so "Boiling" means an extreme move regardless of sign.
READING A ROW
A Heated-phase row might read:
NVDA (up) 14b C:1.8 F(up)+12.4 Co(up)+9.1 A(up)+15.2 -> Heated . Boiling (up)
That is: NVDA, 63-bar direction up, 14 bars in its current phase, Calmar 1.8; all three filters bullish with their separations from baseline in percent (Fast +12.4, Core +9.1, Adaptive +15.2); stop distance to the Core baseline +6.3 percent; and the state tag, Heated . Boiling (up) - all three aligned, an extreme-magnitude move, rising.
The engine also flags "clusters": several names dissenting the same way at once (Adaptive turning bearish under apparent strength, or bullish under apparent weakness), which is structural pressure forming across the universe rather than in a single name.
HOW TO READ IT, NOT WHAT TO DO
This tool is descriptive. It reports what the filters show: which names are in which phase, how hot or cold each move is, and where broad pressure is building. It does not generate buy or sell instructions, position sizes, or price targets, and nothing in it should be read as financial advice. What you do with the information is your own decision.
CREDITS
Method: the MAMA/FAMA (MESA Adaptive Moving Average) algorithm and the SuperSmoother filters are John Ehlers' work (MAMA paper: mesasoftware.com/papers/MAMA.pdf).
Implementation: the MAMA/FAMA Pine derives from Ehlers MESA Adaptive Moving Average by LazyBear , an open-source script, refactored here from series form into a per-ticker state architecture. Credit and thanks to LazyBear for the original.
Original in this script: the multi-ticker consensus engine, the phase and temperature classification, and the cluster detection are my own work. Released open-source under MPL-2.0. Indicador

Estratégia
