Edo Liquidity SweepsEdo Liquidity Sweeps — Detects Liquidity Sweeps of Swing Highs and Lows and Tracks Each One Through Detected, Confirmed and Faded States
Markets move toward liquidity. Above every relevant swing high rests buy-side liquidity — the stops of short positions and the breakout buy orders waiting there. Below every relevant swing low rests sell-side liquidity — the stops of longs and the breakout sells. Those order clusters act as magnets: very often price travels precisely to reach them. A liquidity sweep is the moment that happens and is rejected — price wicks beyond the level to take the resting liquidity, then closes back on the other side, the classic trap that leaves breakout traders offside and frequently turns price around.
Edo Liquidity Sweeps isolates that single event and, crucially, tracks what happens next. It marks each sweep on the chart and follows it through three clear states — Detected, Confirmed and Faded — so you can separate the sweeps that actually reversed price from the ones that failed, all validated on closed bars so the indicator does not repaint. It is the sweep specialist of the Edolab structure family, designed to pair with Edo Liquidity Zones, which maps the liquidity pools these sweeps take.
LIQUIDITY LEVELS: SWING HIGHS AND LOWS
Everything starts from the swings that define where liquidity sits. A swing high is confirmed when a candle has the highest high of its surroundings; a swing low, the lowest low. The size of that surroundings is set by the Swing Profile: Scalper (5 bars each side) tracks short-term liquidity for intraday work, Swing (10 bars, the default) is the balanced setting for 4H and daily, and Long Term (21 bars) watches only the liquidity of the major structures. Each confirmed swing high becomes a buy-side liquidity level to monitor, and each swing low a sell-side one, until price sweeps it.
SWEEP DETECTION
A sweep is detected, on closed bars only, when price pierces a level with a wick but closes on the opposite side. A bearish sweep: the candle's high takes a swing high (grabbing the buy-side liquidity) but the close stays below that level — price pierced the high and rejected it, an downward reversal is expected. A bullish sweep: the candle's low loses a swing low (grabbing the sell-side liquidity) but the close stays above it — price pierced the low and rejected it, an upward reversal is expected. At detection the indicator draws a dotted line at the swept level with a Sweep ▲ or Sweep ▼ label, and records the high and low of the sweep candle itself, which will later decide whether the sweep confirms or fails. A wick that pierces a level but closes back on the same side generates nothing.
THREE STATES: DETECTED, CONFIRMED, FADED
A sweep is not a one-candle signal. The indicator follows each one through three states, evaluated on every closed bar against the range of the sweep candle. Detected: the sweep has just happened and it is not yet known whether price will turn — a dotted line. Confirmed: price confirms the reversal by closing beyond the sweep candle's extreme in the expected direction — the line turns solid and bold and the label gains a ✓. Faded: price closes the opposite way, reclaiming the level, so the sweep failed — the line turns dashed and faded grey and the label gains a ✕. For a bullish sweep, confirmation is a close above the sweep candle's high and a fade is a close below its low; for a bearish sweep it is the mirror. This follow-through confirmation is what separates the operative sweeps from the anecdotal ones: a Confirmed sweep has proven the rejection had continuation, while a Faded one warns that the trap did not work and the level has genuinely been broken.
INFORMATION PANEL
The panel condenses the read into a compact table. It shows the Last Sweep with its direction (Bull ▲ / Bear ▼) and state, and the live count of sweeps in each state: Detected, Confirmed and Faded. The Confirmed-to-Faded ratio gives a quick sense of how reliable sweeps are behaving on that instrument and timeframe. The panel sits in any of the four chart corners (Top Right by default), comes in three sizes (Tiny / Small / Normal) and two themes (Dark / Light), and can be hidden entirely.
NO REPAINTING
Sweeps are validated on closed bars only and on confirmed pivots, so a level and its sweep never appear or disappear intrabar. A wick that pierces a level but closes back inside generates nothing — the indicator waits for the close. This removes the false signals that clutter tools which mark instantly, at the cost of confirming each sweep once it has completed. There are no higher-timeframe functions: all logic runs on the current chart timeframe.
CONFIGURATION
The inputs are grouped by block. Detection sets the swing profile and the maximum number of sweeps kept on the chart (12 by default). Style exposes the bullish and bearish sweep colours, the faded colour, the label size and the Dark/Light theme. Panel controls panel visibility, position and size. The defaults are calibrated to work without adjustment on stocks, crypto, forex, indices and futures, on any timeframe — the input most users touch is the Swing Profile, to match the sensitivity of the tracked liquidity to their horizon.
ALERTS
Five predefined alerts cover the life of a sweep: Bullish Sweep Detected and Bearish Sweep Detected fire the moment a sweep is detected; Bullish Sweep Confirmed and Bearish Sweep Confirmed fire when a sweep confirms its reversal through follow-through; and Sweep Faded fires when a sweep fails and the level is reclaimed. The Detected alerts are the earliest but least confirmed, the Confirmed alerts are more reliable at the cost of arriving later, and the Faded alert is useful to discard a reversal idea. All alerts fire on bar close, consistent with the indicator's anti-repaint validation.
HOW TO READ IT
Wait for confirmation: a Detected sweep only flags that liquidity was taken and rejected, not that price will turn — waiting for it to become Confirmed reduces false signals at the cost of entering later, and the panel's Confirmed-to-Faded ratio shows how trustworthy sweeps are being. Read the fade as a warning: when a sweep turns Faded, the trap did not work and the level was genuinely broken — recognising a failed sweep in time avoids forcing a reversal idea the market has already rejected. Trade sweeps in confluence: a confirmed sweep that takes liquidity at an important level, a demand zone or a higher-timeframe support is a far more solid reference than an isolated one. And pairing Edo Liquidity Sweeps with Edo Liquidity Zones closes the loop — the zones say where liquidity sits, the sweeps say when it is taken.
OPEN SOURCE
Edo Liquidity Sweeps is published as a free open source indicator. The full Pine Script is publicly accessible on TradingView for study, adaptation and integration into any workflow. Part of the Edolab Markets free tools ecosystem alongside Edo Liquidity Zones, Edo Smart Money Map, Edo Order Blocks, Edo ZigZag Auto Fib SR and more available on TradingView.
This indicator is a technical analysis tool for educational and informational purposes only. It does not generate automatic buy or sell signals and should not be considered financial advice. Trading financial markets involves significant risk of capital loss. Past performance does not guarantee future results. Always use proper risk management.
TAGS
LiquiditySweep SmartMoneyConcepts Liquidity MarketStructure PriceAction StopHunt SwingHighLow SupplyDemand Reversal Overlay Indicator OpenSource Edolab EdolabMarkets Stocks Crypto Forex Indices
CATEGORIES (TradingView dropdowns)
— Direction: Both
— Market category: All markets (Stocks / Crypto / Forex / Indices)
— Analysis type: Trend Analysis / Chart patterns / Support and Resistance
Indikator

Indikator

Indikator

Forza Relativa - Professional Table v2█ OVERVIEW
Questo indicatore calcola e mostra la Forza Relativa (Relative Strength) di un asset rispetto a un benchmark di riferimento e al suo settore di appartenenza (se applicabile). Tutti i calcoli sono basati su giorni solari reali ("Calendar Days"), garantendo un confronto preciso e uniforme delle performance su diversi archi temporali: 1g, 7g, 30g, 60g, 90g e 180g.
A differenza delle tabelle standard, questa versione è stata interamente ottimizzata per il Tema Scuro (Dark Theme) di TradingView, garantendo una leggibilità nitida e professionale in ogni condizione di mercato.
█ CARATTERISTICHE PRINCIPALI
• Adattabilità Asset & Crypto: Lo script rileva automaticamente la classe di asset sul grafico. Se l'asset è una Criptovaluta, imposta come benchmark predefinito Bitcoin (BTC) o Ethereum (ETH) a scelta dell'utente. Se l'asset è un'Azione o ETF, utilizza lo S&P500 (SPY) come benchmark e attiva la colonna dedicata al "Settore".
• Selezione del Settore: Per il mercato azionario, è possibile selezionare manualmente l'ETF settoriale di riferimento (es. XLK per il Tech, XLF per i Finanziari, ecc.) per monitorare se l'asset sta sovraperformando o sottoperformando il proprio settore di appartenenza.
• Calcolo a Giorni Solari (Calendar Days): Le variazioni percentuali non si basano sul semplice conteggio delle candele del grafico corrente (che variano a seconda del timeframe), ma calcolano l'effettiva variazione temporale indietro nel tempo, rendendo l'indicatore ideale sia su grafici Daily che Intraday.
█ OTTIMIZZAZIONE GRAFICA & NITIDEZZA (DARK THEME)
Per risolvere il classico problema di scarsa leggibilità delle tabelle TradingView su sfondi scuri, sono state introdotte le seguenti migliorie:
1. Contrasto Dinamico: Il testo delle celle utilizza una palette di colori e trasparenze che si adatta allo sfondo per risaltare chiaramente senza affaticare la vista.
2. Palette Colori Soft: Sostituiti i verdi e rossi standard (troppo accesi e fastidiosi su sfondo scuro) con un elegante Verde Smeraldo Soft per i rendimenti positivi e un Rosso Corallo Soft per quelli negativi.
3. Griglia Protetta: La tabella presenta bordi grigio-scuri solidi per separare nettamente i dati e le colonne, rendendo l'interfaccia pulita e moderna.
█ PARAMETRI PERSONALIZZABILI (INPUTS)
• Crypto Benchmark: Consente di scegliere tra BTCUSDT ed ETHUSDT quando si analizzano le criptovalute.
• Dimensione Testo Tabella: Modifica la dimensione della tabella per adattarla a schermi di diverse risoluzioni (Tiny, Small, Normal, Large, Huge).
• Posizione Tabella: Permette di posizionare la griglia in qualsiasi angolo del grafico (es. in basso a destra, in alto a sinistra, ecc.) per non coprire i prezzi.
• Settore Manuale: Consente di selezionare l'ETF settoriale SPDR di riferimento per l'asset azionario sotto analisi.
█ NOTE SUL TIMEFRAME
Dato che l'indicatore analizza performance storiche fino a 180 giorni solari fa, si consiglia di utilizzare timeframe come il Giornaliero (1D) o l'Orario (1H/4H). Su timeframe estremamente ridotti (es. 1 o 5 minuti), TradingView potrebbe non avere abbastanza candele storiche caricate per calcolare i periodi più lunghi, mostrando la dicitura "n/a" (non disponibile).
Relative Strength vs Benchmark & Sector (Dark Theme)
█ OVERVIEW
This indicator measures and displays the Relative Strength (RS) of an asset by comparing its performance against a selected benchmark and, when applicable, its sector benchmark.
All calculations are based on actual Calendar Days rather than a simple bar count, ensuring consistent and accurate performance comparisons across the following periods:
1D, 7D, 30D, 60D, 90D, and 180D
The table has been specifically designed and optimized for the TradingView Dark Theme, providing maximum readability, strong contrast, and a professional appearance under all market conditions.
█ KEY FEATURES
• Automatic Asset Detection
The script automatically identifies the type of asset displayed on the chart:
Cryptocurrencies: uses either Bitcoin (BTC) or Ethereum (ETH) as the benchmark, selectable by the user.
Stocks and ETFs: uses SPY (S&P 500 ETF) as the benchmark and automatically enables the Sector comparison column.
• Sector Comparison
For equities, users can manually select the appropriate SPDR sector ETF (XLK, XLF, XLE, XLV, etc.) to determine whether the stock is:
Outperforming its sector
Underperforming its sector
Moving in line with its sector
• Calendar-Day Performance Calculation
Performance measurements are independent of the chart timeframe.
Instead of relying on the number of bars displayed, percentage changes are calculated using actual calendar days, ensuring consistent results across both Daily and Intraday charts.
█ DARK THEME VISUAL OPTIMIZATION
To improve readability on dark backgrounds, several visual enhancements have been implemented:
1. Dynamic Contrast
Text colors and transparency levels have been carefully tuned to provide excellent visibility while minimizing eye strain.
2. Soft Color Palette
Standard colors have been replaced with more balanced tones:
Soft Emerald Green for positive values
Soft Coral Red for negative values
This creates a cleaner appearance and improves readability during extended analysis sessions.
3. High-Definition Grid
The table uses solid dark-gray borders to clearly separate cells, columns, and headers, resulting in a modern and professional layout.
█ CUSTOMIZABLE INPUTS
• Crypto Benchmark
Select the benchmark used for cryptocurrency analysis:
BTCUSDT
ETHUSDT
• Table Text Size
Adjust the table size to fit different screen resolutions:
Tiny
Small
Normal
Large
Huge
• Table Position
Place the table anywhere on the chart:
Top Left
Top Right
Bottom Left
Bottom Right
• Manual Sector Selection
Choose the SPDR sector ETF used as the sector benchmark for relative performance analysis.
█ DATA INTERPRETATION
Positive values indicate that the asset is outperforming its benchmark or sector.
Negative values indicate underperformance, signaling weaker relative strength compared to the benchmark or sector being analyzed.
█ TIMEFRAME NOTES
Since the indicator analyzes historical performance up to 180 calendar days, the following timeframes are recommended:
1D
4H
1H
On very low timeframes (such as 1-minute or 5-minute charts), TradingView may not have enough historical bars loaded to calculate the longest lookback periods. In these cases, some cells may display "n/a" (data not available).
Ideal for quickly identifying assets that are demonstrating superior relative strength versus both the broader market and their respective sector, regardless of the chart timeframe being used.
Indikator

ATK/DEF KDJ Rewind ContextRewind KDJ Context is a visual KDJ analysis indicator designed to provide a clearer understanding of momentum structure through the relationship between the K, D, and J lines.
Traditional KDJ analysis often focuses on fixed overbough and oversol levels. This indicator expands the interpretation by analyzing the interaction between KDJ components, including line arrangement, directional changes, momentum development, and structural transitions.
The script transforms KDJ movement into different context states, helping users observe how momentum conditions develop, slow down, weaken, and recover over time.
Instead of treating K, D, and J as isolated values, Rewind KDJ Context focuses on the relationship between the three components and presents their current condition through a structured visual approach.
KDJ Context Framework
▶️ Momentum Push
Identifies conditions where K, D, and J show coordinated upward momentum development.
This context represents a phase where KDJ structure is aligned with increasing momentum activity and stronger directional movement.
⏸️ Momentum Pause
Highlights situations where momentum remains active but begins to slow or entr a temporary balance condition.
This state focuses on changes in momentum speed and the relationship between K, D, and J during a slowing phase.
⏪ Reversal Context
Highlights changes in KDJ structure where J-line movement and the relationship between K and D indicate a possible transition in short-term momentum conditions.
This context focuses on structural changes rather than predicting future pric direction.
⬇️ Weakness Context
Displays conditions where KDJ structure shows reduced momentum strength and weaker directional movement.
This state helps visualize when previous momentum conditions begin losing strength.
🔄 Recovery Context
Highlights situations where KDJ structure begins improving after a weaker phase.
This context observes changes in J-line behavior and KDJ alignment during potential momentum recovery conditions.
⚪ Neutral Context
Represents situations where K, D, and J do not form a strong directional structure and momentum remains relatively balanced.
Main Features
• Customizable KDJ calculation parameters
• Dynamic K, D, and J value visualization
• KDJ line relationship and structure analysis
• Momentum context classification
• Historical context table display
• Recent bar comparison
• Visual markers for important KDJ transitions
• KDJ arrangement monitoring
• Adjustable display range and historical reference position
How It Works
Rewind KDJ Context uses the traditional KDJ calculation method based on RSV, followed by smoothing calculations for the K and D lines.
The J line is derived from the relationship between K and D:
• K line represents the smoothed RSV movement
• D line represents the smoothed K line movement
• J line represents an extended momentum relationship between K and D
The indicator evaluates several aspects of KDJ behavior, including:
• Relative position between K, D, and J
• Directional movement of each component
• Changes in momentum expansion and contraction
• KDJ structural transitions
• Recent historical context
These calculations are organized into visual context states to make KDJ behavior easier to interpret.
Intended Use
Rewind KDJ Context is designed as a technical analysis tool for observing momentum conditions and KDJ structure.
It can be used together with price action analysis, trend evaluation, support and resistance analysis, volatility analysis, and other technical methods to build a broader market view.
The indicator is intended to provide additional context about momentum behavior rather than replace complete market analysis.
Notes
Rewind KDJ Context is based on mathemat calculations derived from historical pric data.
The displayed context states represent current and historical KDJ conditions based on the selected settings and market data available on the chart.
Different assets, timeframes, and market environments may produce different interpretations of the same indicator behavior.
Disclaimer
Rewind KDJ Context is provided for informational and technical analysis purposes only.
This indicator does not provide finacl advice, personalized recommendations, autm trading decisions, or guaranteed results.
The displayed KDJ context states, momentum conditions, and visual markers are generated from mathematical calculations and should not be interpreted as predictions of future pric movements.
Users are responsible for conducting their own analysis, making their own decisions, and applying appropriate risk management methods.
Past market behavior and technical indicator performance do not guaran future outcomes. Indikator

Premium/Discount ML Zones [PickMyTrade]What does it do?
Builds a Premium / Equilibrium / Discount map from a higher-timeframe dealing range, then runs an online logistic regression over every price level inside that map to detect the exact band where the model currently reads a directional edge. Because the range is read from one anchor timeframe, the zones sit at the same prices whether you view the 5m, 1h or Daily chart.
────────────────────────────────────
The intellectual problem
Premium/Discount is a location framework: above the 50% equilibrium of a dealing range price is expensive, below it price is cheap. Two problems show up the moment you try to automate it.
First — the range is usually drawn on whatever chart you are looking at. A 5-minute chart finds 5-minute swings, so it anchors to a micro-range that may be a few points wide. The Daily chart finds a range a hundred times larger. The same price is then simultaneously "premium" on one timeframe and "discount" on another, and the label stops meaning anything. The conventional discipline is to define the range on a higher timeframe and drop down only to execute — never to redraw the range on the execution chart.
Second — location alone is not an edge. Knowing price is in the lower half of a range tells you it is cheap relative to that range. It does not tell you whether cheapness is currently being rewarded. In a strong downtrend every discount print keeps getting cheaper. Location is a filter; something else has to decide whether the location is worth acting on.
This indicator separates those two jobs. The dealing range and its three zones are the map , anchored once on a higher timeframe. A logistic regression trained on the chart's own history is the decision , and it is what marks the actionable band inside the map.
────────────────────────────────────
How the dealing range is anchored
The range is built from confirmed swing highs and lows read from the Dealing Range Timeframe (default Daily) via request.security(..., lookahead=barmerge.lookahead_off) . Each side re-anchors to its most recent confirmed swing, with guards that keep the pair coherent:
if not na(ph) and (na(swingLow) or ph > swingLow) swingHigh := ph if not na(pl) and (na(swingHigh) or pl < swingHigh) swingLow := pl
Those guards are what make the range track the current leg rather than a fixed lookback window. In an uptrend each new higher low pulls the low side up with price, instead of leaving equilibrium pinned to an ancient low that price has long since left behind.
From that range:
Equilibrium — the exact 50% midpoint, (rangeHigh + rangeLow) / 2 Equilibrium band — a neutral fair-value zone of ± Equilibrium Band × range around the midpoint (default ±10%, i.e. the middle 20%). No signals fire inside it. Premium — everything above the band. Discount — everything below it.
Break of structure — when price closes beyond the anchored range, the old range is stale until a new swing confirms. A bearish BOS blocks longs and a bullish BOS blocks shorts, so the model does not fade a breakout while waiting for the range to re-anchor.
────────────────────────────────────
How the logistic regression works
Step 1 — Three z-score normalised features
All three are standardised over the Z-Score Window (default 50) so the model is scale-invariant across instruments and timeframes.
F1 — Position in range : where the close sits between the range low and high, clamped to 0–1. This is the premium/discount coordinate itself. F2 — Dwell time : a rolling time-at-price measure — the fraction of the last N bars that closed within one price band of the current close. High dwell means price has spent real time here; a level touched once in a spike scores low. F3 — Momentum : rate of change over the momentum length, normalised. Distinguishes a discount that is stabilising from one that is still falling.
Step 2 — Online gradient descent with L2 regularization
There is no fixed training window and no retraining pass. Each confirmed bar is labelled from its forward return over the Label Horizon, and the weights take one gradient step per bar, always evaluated on the previous bar's features so no current-bar information leaks into the update:
_pred = f_sigmoid(w0 + w1f1 + w2f2 + w3*f3 ) _label = label_bull ? 1.0 : 0.0 _err = _label - _pred w1 := w1 + i_learn_rate * (_err * f1 - i_l2_lambda * w1)
The - i_l2_lambda * w1 term is weight decay: it pulls weights back toward zero each step, which stops any single feature from running away to an extreme value on a stretch of trending data. The bias term w0 is deliberately left unregularized — it carries the base rate, not a feature relationship.
Step 3 — Posterior
post_bull = f_sigmoid(w0 + w1f1 + w2f2 + w3*f3) post_bear = 1.0 - post_bull
Step 4 — The ML entry zone (what the model detects)
This is the part that does the work. Rather than only scoring the bar in front of it, the model scores every price level inside the discount half and the premium half — sweeping the position feature across the zone while holding dwell and momentum at their current values — and marks the contiguous band where its probability clears the Entry Threshold:
for j = 0 to i_nbins float p = rangeLow + (eq_bot - rangeLow) * j / i_nbins float f1p = ((p - rangeLow) / range_size - pos_mean) / pos_std float pbup = f_sigmoid(base + w1 * f1p) if pbup >= i_posterior_thresh ml_long_lo := na(ml_long_lo) ? p : math.min(ml_long_lo, p) ml_long_hi := na(ml_long_hi) ? p : math.max(ml_long_hi, p)
That band is the ML Buy / Sell Zone drawn on the chart. It is the exact price range in which a signal would fire right now — visible before price arrives there. Its thickness is meaningful: a thin band means only a sliver of the zone clears the threshold, a thick band means the model reads an edge across most of the zone. When nothing clears the threshold, the band disappears entirely rather than showing a level the model does not support.
────────────────────────────────────
Reading the indicator
PREMIUM box (orange) — upper region of the HTF range. Shorts are considered here only. EQUILIBRIUM box (grey) — the fair-value band around the 50% midpoint. Nothing fires here by design. DISCOUNT box (blue) — lower region. Longs are considered here only. ML BUY / SELL ZONE (bright band) — the model-detected band inside the discount/premium region, labelled with the peak probability found in that band. ● circle (blue) — high-conviction long: P(Bull) ≥ 0.85. ▲ triangle (blue) — standard long: P(Bull) ≥ threshold. ● circle (orange) — high-conviction short: P(Bear) ≥ 0.85. ▼ triangle (orange) — standard short: P(Bear) ≥ threshold. Dashed equilibrium line — the exact 50% midpoint. Dashed SL / TP lines — reference levels from the range extreme at ATR × multiplier and the Risk:Reward ratio.
Only the first bar of each signal cluster fires — if conditions stay true for several bars, only the transition bar is marked.
Info table (top-right)
● LIVE (green) — the model has taken ≥ Training Samples Needed gradient steps. ● WARMUP (yellow) — still accumulating; signals suppressed. Zone — Premium / Equilibrium / Discount, or BOS ↑ / BOS ↓ (yellow) when price has broken the range. P(Bull) / P(Bear) — live posterior at the current bar. N Trained — total gradient updates taken.
────────────────────────────────────
Inputs
Dealing Range Dealing Range Timeframe — whose swings define the map (default D). Set it equal to or higher than your execution chart. This is the input that makes the zones identical across timeframes. Swing Left / Right Bars — swing definition on the anchor timeframe (default 3/3). Right Bars is the confirmation delay: the range re-anchors that many anchor-timeframe bars after a swing forms. Equilibrium Band — half-width of the neutral zone as a fraction of range (default 0.10). Set 0 to collapse it to a single line.
Dwell-Time Feature Scan / Dwell Bands (default 20) — price resolution for the entry-zone scan and the dwell band width. Dwell Lookback (default 50).
Logistic Regression Training Samples Needed — gradient updates before signals activate (default 80). Entry Threshold — minimum probability to fire a signal and to light the ML zone (default 0.65). Learning Rate — gradient step size (default 0.05). Higher adapts faster but noisier. L2 Regularization — weight decay (default 0.001). 0 disables it. Label Horizon (default 5), Momentum Length (default 14), Z-Score Window (default 50).
Signal Levels Show SL/TP Lines, ATR Period, SL ATR Buffer (default 1.2), Risk:Reward (default 1.8).
Visual / Display Show Premium/Discount Map, Show ML Entry Zone, Zone Left Extent / Forward Extend, Show Equilibrium Line, Regime Background, zone colours. Zen Mode — hides SL/TP lines and the table; map and ML zone remain.
────────────────────────────────────
Three alerts included
PD ML - Long — discount long fired PD ML - Short — premium short fired PD ML - Any Signal — either direction
────────────────────────────────────
Technical notes
Swing detection on the anchor timeframe needs Swing Right Bars of that timeframe to confirm. With the Daily default that is a three-day confirmation delay before the range re-anchors. This is inherent to non-repainting swing detection, not a tunable away. request.security uses lookahead_off , so historical bars use only confirmed anchor-timeframe values. The developing anchor bar updates in real time, which is expected behaviour for a live higher-timeframe reference. The dwell feature counts closes within one band of the current close over the lookback — a bar-based proxy for time-at-price. It does not use tick or volume-profile data. The entry-zone scan holds dwell and momentum fixed while sweeping position. It answers "if price were at level X, with today's momentum and dwell, what would the model read?" — a counterfactual across location, not a forecast of the path. Logistic regression assumes a monotonic relationship between each feature and the log-odds. Real price behaviour is not always monotonic in position-within-range; the model captures the dominant direction of that relationship, not its curvature.
────────────────────────────────────
Requirements and limitations
The model needs Training Samples Needed gradient steps before signals activate; on short-history charts the table shows WARMUP and nothing fires. Weights are learned per chart and per timeframe — switching symbol or timeframe restarts the learning from zero.
Probabilities are the model's read of patterns in its own training history. They are not a probability of profit, and patterns that historically preceded a directional move may not repeat.
The equilibrium band is deliberately dead space. If you want signals nearer the midpoint, reduce the band toward 0 — but the closer to fair value you trade, the less the premium/discount premise is contributing.
If the Dealing Range Timeframe is left blank or set below your chart's timeframe, the range is computed on the chart timeframe and the cross-timeframe consistency is lost. That is the failure mode this indicator exists to avoid.
The three zones describe location within one dealing range. They carry no information about ranges above them — a Daily discount can sit inside a Weekly premium.
────────────────────────────────────
Risk disclosure
Nothing here forecasts price. The zones describe where price sits inside a measured range; the classifier reports what its training history associates with that location. Use with your own position sizing and risk management. Not financial advice.
Built natively in Pine Script® v6. Online logistic regression trained by per-bar gradient descent with L2 weight decay, a rolling dwell-time feature, and a higher-timeframe swing-anchored dealing range. No external libraries, no data feeds.
Open source — Mozilla Public License 2.0. Indikator

XI0033 Williams FractalA Williams fractal confirms late by definition: the pattern is complete only after the bars to its right have closed, so the marker always appears in the past. This script keeps the classic fractal template — three- or five-bar — and adds the one thing the classic version cannot show: the bar that is about to become a fractal, before the confirmation arrives.
It draws triangles for confirmed fractal highs and lows, plus one highlighted triangle for the last potential fractal on the live edge. Nothing else: no lines, no levels, no signals.
Confirmed fractals
A fractal high is a bar whose high stands above the highs of its neighbours; a fractal low mirrors that on the lows. The 3-bar mode compares one neighbour on each side, the 5-bar mode two on each side — the original Bill Williams definition. The Periods input sets how many bars back the reference bar sits. Confirmed fractals are painted as muted grey triangles above the highs and below the lows, and once the pattern that produced them is closed, they are history: they do not move and do not disappear.
Confirmed fractal highs and lows in the muted default colour: every triangle marks a bar whose extreme beat its neighbours on both sides, printed only after the pattern completed.
The last potential fractal
This is the addition. One bar to the right of the last confirmable centre there is always a candidate: a bar already higher (or lower) than its closed neighbours, waiting only for the current bar to keep its distance. The script highlights that candidate with an orange triangle — pointing down above a potential high, pointing up below a potential low — so the developing swing is visible before it becomes official.
The highlight exists only on the live bar. It is recalculated tick by tick, disappears the moment price violates the candidate, and is deliberately dropped on the bar's final update, so it never leaves a trace in the chart history. Scroll back and you will find only confirmed fractals.
Left: the orange triangle under the newest low is the last potential fractal. Right, a few bars later: that low now carries a grey confirmed triangle — the preview left no trace — and a new potential fractal already sits above the latest high.
What repaints, and what does not
The potential marker repaints by design — that is its job. It is a live preview that appears, moves and vanishes with the current bar, and it is intentionally not committed to history. Confirmed fractals in the default 3-bar mode are built from closed bars only, so once a triangle prints, it is final. In the 5-bar mode with the default period, the newest confirmation still involves the forming bar's extreme, so it can appear and be withdrawn until that bar closes; after the close it is final. And every confirmed fractal is late by definition — the triangle appears above a bar that is already in the past, because that is what confirmation means.
What is reused, and what is new
The confirmed-fractal logic is the classic Bill Williams fractal template as coded by Mit Nayi, reused open-source with attribution in the source header. What this edit adds: the port to Pine Script v6, and the whole potential-fractal layer — the candidate detection one bar to the right of the confirmable centre, and the barstate mechanism that shows the preview on the live bar only and drops it on the bar's final update, so it never piles up in history.
What it does not do
It gives no signals. A fractal marks a local extreme, and most local extremes get traded through; on their own they are not entries. This is a structural marker — swing logic, liquidity maps and ICT-style analysis use fractals as raw material, and the potential marker only tells you where the next one may appear. The decision stays yours.
The Inputs allow you to set:
Periods: how many bars back the fractal centre sits; the triangles are drawn on that centre bar
3 or 5 Bar Fractal: one or two neighbours compared on each side
Show last potential fractal: the live-edge preview on or off
Potential down and up fractal colours
About the chart
BYBIT:BTCUSDT.P, 5-minute chart. The only script on it is this one, with default settings: muted grey triangles mark confirmed fractal highs and lows across the chart, and the orange triangle at the right edge is the last potential fractal, not yet confirmed. No other indicators, no drawings. Indikator

Fractal Timeframe Collision Node [MarkitTick]💡 The financial markets operate across multiple interacting timeframes, creating complex structural geometries that cannot be accurately analyzed through a single, isolated lens. The tool presented here acts as a comprehensive multi-timeframe aggregation engine, designed to isolate highly significant structural support and resistance clusters. By evaluating pivot points across four distinct time spans and merging them based on volatility-adjusted proximity, this system identifies high-probability reaction zones where structural exhaustion is most likely to occur. It is built strictly for the modern Pine Script environment, utilizing an entirely non-repainting architecture that respects the highest standards of data integrity and execution logic.
● ✨ Originality and Utility
Standard pivot or support/resistance scripts typically plot historical swing highs and lows independently. This creates chart clutter and often leaves the analyst guessing which level holds the most technical weight. This tool introduces the concept of "Collision Nodes." Instead of simply drawing every pivot, the algorithm scans higher timeframe data, identifies structural extremes, and clusters them together using a dynamic, adaptive mechanism.
When multiple higher timeframes project a pivot at the exact same price zone, a structural "Collision Node" is formed.
The utility lies in its objective strength grading: a node formed by the confluence of the 1-hour, 4-hour, and Daily charts mathematically demands more respect than a single localized swing point on a lower timeframe.
By filtering out the noise and only projecting nodes that meet a user-defined minimum strength threshold, the analyst is presented with a remarkably clean chart displaying only the most critical, high-liquidity zones.
Furthermore, the script automatically generates full trade execution parameters (Entry, Stop Loss, and multiple Take Profits) directly on the chart when a valid structural rejection occurs.
● 🔬 Methodology and Concepts
• Multi-Timeframe Pivot Extraction
The core engine relies on detecting localized extrema (Pivot Highs and Pivot Lows) over a user-defined lookback window. The script fetches these pivot values simultaneously from three higher timeframes plus the current chart's timeframe. To ensure absolute data integrity and prevent any future data leakage (repainting), the algorithm strictly requests historical, confirmed data using offset historical referencing.
• Volatility-Normalized Spatial Clustering
Once the pivots are extracted, the algorithm must determine if they "collide" or overlap. Because absolute price distance is irrelevant across different assets, the script uses a dynamic clustering mechanism normalized by the Average True Range (ATR).
A tolerance band is calculated by multiplying the current ATR by a user-defined coefficient.
If a newly discovered higher timeframe pivot falls within this exact tolerance band of an existing pivot cluster, it is merged into that cluster, and the cluster's "strength" rating is incremented.
If it falls outside the tolerance band, a new independent node is registered.
• Memory Management and Age Pruning
Financial markets possess a memory, but structural relevance decays over time. The script incorporates a memory management protocol that continually monitors the age of all registered nodes. If a node has not been tested or updated within a specific bar count limit, it is automatically pruned from the active array, ensuring that only highly relevant, modern liquidity pools are analyzed.
• Automated Signal Validation
A visual node is not a signal; it is an area of interest. The script validates trade signals by combining spatial location with price action. A valid signal requires the price to close inside the tolerance zone of a high-strength node, accompanied by a rejection candle (where the wick constitutes a significant percentage of the total candle range), and a structural close confirming the directional bias.
● 🎨 Visual Guide
• Collision Nodes
Teal Horizontal Lines: Represent bullish support nodes. The opacity of the line dynamically shifts based on the strength of the node (darker/more solid lines indicate higher timeframe confluence).
Red Horizontal Lines: Represent bearish resistance nodes. Like the bullish nodes, their visibility scales with structural strength.
Diamond Labels (◆×2, ◆×3): Attached to the end of the node lines, these labels explicitly display the node's strength rating. A "◆×3" label means three separate timeframes have confirmed a pivot at this exact mathematical level.
• Trade Execution Box
Dashed Blue Line: Indicates the exact Entry price upon signal confirmation.
Solid Red Line: Represents the dynamic Stop Loss, which is placed behind the collision node with an added ATR-based buffer to avoid premature liquidation.
Dashed Teal Lines (TP1, TP2, TP3): Represent calculated Take Profit levels projected automatically based on the user's defined Risk-to-Reward (RR) multipliers.
Red Background Fill: Visually maps the total risk zone between the Entry and the Stop Loss.
Teal Background Fill: Visually maps the total reward zone extending from the Entry up to the final Take Profit target.
• Real-time Dashboard
Located by default in the top right corner, this data table provides an instant summary of the market structure.
Bias: Displays the current active signal direction (LONG, SHORT, or NONE).
Active Nodes & Strengths: Lists the exact price levels of the nearest active bull and bear nodes, accompanied by visual progress bars displaying their respective strengths (Green for high strength, Yellow for medium, Red for low).
Trade Tracking: Displays the currently active Stop Loss and primary Take Profit levels if a trade configuration is locked on the chart.
● 📖 How to Use
Apply the indicator to your chart and set your three preferred higher timeframes in the settings (e.g., if trading on the 15-minute chart, you might select 1-Hour, 4-Hour, and Daily).
Observe the chart for the formation of high-strength Collision Nodes (look for ◆×3 or ◆×4 labels). These are your primary zones of interest.
Wait for price action to approach these nodes. Do not place blind limit orders.
Allow the script's internal logic to identify a structural rejection. When a valid rejection candle forms and closes at a node, a trade execution box will automatically populate on the chart.
Use the provided Entry, Stop Loss, and Take Profit lines to format your position sizing and manage the trade according to the mapped risk-to-reward parameters.
Optionally, link the script's advanced JSON webhook alerts to an external execution platform for automated trade routing.
● ⚙️ Inputs and Settings
• Core Settings
Pivot Lookback: The structural length required to confirm a swing high or low.
TF 1, TF 2, TF 3: The three higher timeframes used to scan for structural confluence.
Include Chart TF: Determines if the current chart's timeframe should also contribute to node strength.
Node Tolerance (×ATR): The spatial bandwidth used to cluster pivots together, measured as a multiplier of current volatility.
Min Node Strength: The minimum number of overlapping timeframes required for a node to be rendered on the chart.
• Filters
Require Rejection Candle: Enforces strict price action criteria, demanding that signals only fire if the candle displays a prominent rejection wick.
Min Wick % of Range: The exact percentage of the candle that must be composed of the wick to validate a rejection.
Max Node Age (bars): The duration a node remains active without being re-tested before being permanently purged from memory.
• Trade Tools
SL Buffer (×ATR): Adds a dynamic volatility buffer beyond the structural node to determine the absolute invalidation point.
TP1, TP2, TP3 (×SL Risk): The respective risk-to-reward multipliers used to dynamically project profit targets.
Lock Current Trade Levels: Freezes the visual risk/reward box on the chart until the trade hits either the final target or the stop loss, ignoring subsequent signals.
• Dashboard & Alerts
Show Dashboard: Toggles the visibility of the real-time data table.
Alert Actions: Customizable text fields allowing users to define specific JSON payload strings for long, short, and exit triggers.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The architectural foundation of this algorithm is heavily rooted in the Fractal Market Hypothesis (FMH), which posits that financial markets exhibit self-similar statistical structures across varying scales of time. In practical terms, a distribution pattern on a 5-minute chart mathematically resembles a distribution pattern on a Weekly chart. By aggregating pivot extrema from multiple independent time scales, this script exploits these fractal geometries to identify areas of harmonic resonance—price zones where liquidity pools overlap across different cohorts of market participants.
To resolve the spatial clustering problem, the system utilizes a volatility-normalized one-dimensional grouping algorithm conceptually akin to Density-Based Spatial Clustering of Applications with Noise (DBSCAN). Instead of utilizing fixed scalar distances (which fail as asset prices scale), the algorithm calculates an epsilon distance bounded by the Average True Range (ATR). This ensures that the clustering logic expands and contracts organically with market entropy. The ultimate output is a mathematically objective reduction of structural noise, isolating only the highest-density liquidity nodes that possess the greatest statistical probability of halting directional momentum.
⚠️ 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. Indikator

Options Sniper Pro v1Options Sniper Pro v1 — Indicator Summary
Options Sniper Pro v1 is an intraday momentum and trend-following indicator designed to identify higher-probability CALL and PUT option setups on liquid ETFs and stocks such as SPY, QQQ, and IWM.
The indicator works best when used during the New York trading session, especially during high-volume periods when momentum is strongest. It combines:
EMA Trend Analysis (9/21/200) – Identifies the overall market direction and avoids trading against major trends.
RSI Momentum Filter – Confirms buying or selling pressure.
Volume Confirmation – Helps identify moves supported by increased participation.
Pullback Entries – Looks for entries after price retraces toward the fast EMA before continuing the trend.
Candlestick Confirmation – Uses bullish/bearish engulfing patterns to improve entry timing.
Smart Money Concepts – Includes Order Blocks and Fair Value Gaps to highlight areas where institutional-style price reactions may occur.
ATR Risk Management – Automatically calculates stop-loss levels and 1R/2R/3R profit targets.
Dashboard Monitoring – Displays trend direction, RSI strength, volume conditions, and active signals.
Best Usage:
Timeframes: 5-minute, 15-minute, and 30-minute charts
Best Markets: SPY, QQQ, IWM, large-cap stocks with strong volume
Best Trading Window: 9:30 AM–11:30 AM and 2:00 PM–4:00 PM EST
Trading Style: Intraday options scalping and momentum trades
Ideal Setup:
✅ Wait for the dashboard to show trend alignment
✅ Enter CALLS when price is above VWAP/EMAs with strong volume and bullish confirmation
✅ Enter PUTS when price is below VWAP/EMAs with strong volume and bearish confirmation
✅ Use TP1 for partial profit and TP2/TP3 for runners
✅ Avoid low-volume chop and sideways markets
Purpose:
This indicator is designed to help traders filter out weak setups and focus on momentum-driven option opportunities with defined entries, exits, and risk management. It is best used as a trade confirmation tool, not as a standalone buy/sell system. Indikator

Indikator

Daily Pivot Points - Classic ( S&R Levels )Daily Pivot Points
Classic daily pivot point levels — P, R1, R2, S1, S2 — calculated automatically from the prior session's High, Low, and Close. Levels update at the start of each new trading day and are labeled directly on the right edge of the chart with their exact prices, so you always know where you stand without doing any math.
Levels included:
P — Central pivot (orange)
R1 / R2 — Resistance zones (red)
S1 / S2 — Support zones (green)
R3 / S3 — Extended levels (optional, off by default)
Features:
Right-edge price labels on every level — no guessing
Soft zone fill between R1→R2 and S1→S2 for a clean visual bias
Works on any intraday timeframe (1m, 5m, 15m, 30m, 1H)
Built-in alerts for R1, R2, S1, S2 crosses
Fully customizable colors and line width
How to use:
Pivots are one of the most widely used levels in intraday trading. Price tends to react at these zones — use P as the neutral line, R1/R2 as overhead resistance targets, and S1/S2 as downside support. Watch for rejection or breakout at each level to time your entries and exits.
Lightweight, no repainting, no clutter. Just the levels that matter.
Added concise inline comments explaining:
why lookahead_on + is used (locks levels to prior day at open)
the floor-trader pivot formula logic
why stepline style prevents diagonal artifacts
how the var label + delete-and-redraw pattern keeps the label count clean
the barstate.islast gate
No bloat — just enough for a reader to follow the logic without re-deriving it. Indikator

Chart Narrator [verticetrading]An analyst that writes. Chart Narrator reads your chart and describes it in plain sentences — no cryptic numbers, no jargon.
◆ WHAT IT DOES
It turns the chart into a written briefing: main trend and whether the higher timeframe agrees, unusual calm or agitation in volatility, the last structural break in plain words, nearest tested support/resistance with distances in %, fresh candlestick patterns, and volume participation. Everything is summarized in a bias header with a conviction score ("BULLISH — 4 of 5 signals point the same way").
◆ HOW IT WORKS
Six evidence modules (trend + higher-timeframe confirmation, volatility ranking, market structure, merged pivot levels weighted by touches, candlestick patterns, volume vs its average) each produce a verdict and the numbers behind it. A narration engine turns them into sentences, stays silent when a module has nothing to say, and detects confluences between modules (e.g. a bullish pattern printed on a tested support) to flag higher-quality situations. With enough history it also adds a day-of-week tendency note with its sample size.
◆ HOW TO USE IT
Add it to any symbol and timeframe. Read the panel top to bottom: bias first, evidence after. Set the "Bias flip" alert to receive the full written analysis when the overall picture changes. Interface in English and Spanish.
◆ WHAT MAKES IT ORIGINAL
Indicators show numbers; this one explains itself. Every sentence cites its evidence, only confirmed bars are narrated (no repainting), and the panel says "mixed, no clear edge" when that is the truth.
◆ LIMITATIONS
It describes the present; it does not predict. Not financial advice.
────────────────────────
ESPAÑOL — El analista que escribe
Convierte el gráfico en un informe escrito: tendencia y si la temporalidad mayor la confirma, calma o agitación inusual de la volatilidad, la última ruptura estructural en palabras llanas, soporte/resistencia más cercanos con distancias en %, patrones de velas recientes y participación del volumen — todo resumido en un sesgo con puntuación de convicción ("ALCISTA — 4 de 5 señales apuntan en la misma dirección"). Seis módulos de evidencia alimentan un motor de redacción que calla cuando no hay nada que decir y detecta confluencias entre señales. Solo narra velas confirmadas (sin repintado). Interfaz en inglés y español. Describe el presente, no predice; no es asesoramiento financiero. Indikator

IQE + Volume Bubbles Engine LiteIQE + Volume Bubbles Engine Lite
Overview
Recently I have just seen DeepCharts and BookMap and HeatMaps with Volume Bubbles. I trade XAUUSD and scalp that instrument and wanted this for TradingView. But realised the way TradingView implements Level 2 MBO data it would not be possible to implement the heatmaps and Volume Bubbles, but I cracked on regardless and created IQE. I was trying to identify Institutional Particpation . Then I came across Volume Bubbles (QuantAlgo) and how they implemented Volume Bubbles and thought I could implement that methodology, Then I put both indicators on the chart and thought how much richer the Indicators when merged together looked, giving increased insights into Volume.
IQE + Volume Bubbles Engine Lite combines the Institutional Quality Engine (IQE) with an enhanced Volume Bubble Engine to identify high-quality institutional participation and volume events on a single chart.
Rather than relying on volume alone, IQE analyses multiple aspects of market behaviour to classify the quality of each move before combining that information with significant Volume Bubble events.
The result is a simple visual representation of potential institutional participation using three signal families:
VI – Volume Bubble + IQE
V – Volume Bubble Only
I – IQE Only
The Lite version is designed to provide a powerful institutional participation indicator while remaining easy to understand and configure.
Institutional Quality Engine (IQE)
IQE is an original multi-engine scoring model developed to evaluate the overall quality of market participation rather than relying on a single technical indicator.
Every candle is analysed using five independent market components.
Participation Engine
Measures whether unusually large market participation is occurring by analysing:
Relative volume
Volume acceleration
Volume persistence
Candle expansion
Overall participation quality
This attempts to distinguish genuine participation from normal market activity.
Efficiency Engine
Evaluates how efficiently price moved during the candle.
Factors include:
Body size
Wick size
Close location
ATR efficiency
Directional close strength
Strong institutional candles generally close efficiently with limited rejection.
Structure Engine
Evaluates market structure including:
Break of previous highs/lows
Breakout strength
Range compression
Close outside previous structure
This helps identify meaningful structural moves rather than random price fluctuations.
Trend Engine
Analyses trend quality using:
EMA trend direction
Trend slope
Higher highs
Higher lows
Lower highs
Lower lows
Trend continuation
This helps distinguish trend participation from counter-trend movement.
Liquidity Engine
Evaluates potential liquidity behaviour including:
Liquidity sweeps
Rejection candles
High-volume stalls
Exhaustion characteristics
The Lite version includes this internal liquidity assessment as part of the IQE score.
IQE Classification
Each candle is classified into one of three quality levels.
PRO
Professional participation.
Represents above-average institutional quality and is often the earliest indication of meaningful activity.
INST
Institutional participation.
Requires stronger agreement between the IQE engines and generally indicates higher confidence.
EXCE
Exceptional participation.
Reserved for the strongest institutional-quality candles where multiple market conditions align.
Volume Bubble Engine
The Volume Bubble Engine identifies statistically significant volume clusters and classifies them into three levels.
Small
Medium
Big
Each cluster may be classified as:
Buy
Sell
Mixed
depending on the selected classification method.
The Volume Bubble settings remain intentionally compatible with the original implementation.
For a detailed explanation of the Volume Bubble detection methods, percentile settings, consensus modes and lower timeframe delta calculations, users are encouraged to refer to the original Volume Bubbles publication by QuantAlgo .
Combined Signal Engine
The Lite version introduces three independent signal families.
VI
Volume Bubble and IQE occur together.
This represents the strongest confluence because both engines independently agree on institutional participation.
V
Volume Bubble only.
Used when significant volume is detected without an accompanying IQE classification.
I
IQE only.
Used when institutional-quality price behaviour is detected without a qualifying Volume Bubble.
Consecutive Signal Confirmation
One of the major additions in the Lite version is the ability to require multiple qualifying signals within a user-defined lookback period before a signal is displayed.
This helps reduce isolated signals and instead highlights repeated institutional participation.
Each signal family can be configured independently.
VI Confirmation
Require multiple VI signals within a configurable lookback window.
Useful for confirming repeated institutional participation combined with elevated volume.
V Confirmation
Require multiple Volume Bubble signals.
Useful for identifying persistent high-volume activity rather than isolated spikes.
I Confirmation
Require multiple IQE signals.
Useful for confirming repeated institutional-quality behaviour even when volume remains below cluster thresholds.
TDFI Trend Filter
The Lite version includes an integrated TDFI v2 filter which can optionally suppress signals that occur against the prevailing trend.
Two filtering modes are available.
Threshold Hold
Signals are permitted whenever TDFI remains inside its bullish or bearish threshold.
This is the more responsive mode and generally produces more trading opportunities while still filtering obvious counter-trend signals.
Momentum / Recovery
Signals require both:
TDFI to remain inside the bullish or bearish threshold
Momentum to continue in the same direction (or remain pinned near an extreme)
This is a stricter confirmation method designed for traders who prefer stronger trend continuation before allowing signals.
Informative Alerts
Dynamic alerts include:
Signal family
Buy or Sell direction
IQE classification
IQE score
Volume Bubble level
Volume ratio
Delta information
Signal occurrence count
TDFI status
Trend filter state
Candle Colouring
The indicator supports four colouring modes.
Off
IQE Only
Volume Bubbles Only
IQE + Volume Bubbles
When both engines are enabled, Volume Bubble colours take priority while IQE colours remain visible on candles without an active Volume Bubble.
Attribution
This indicator combines original work with adapted open-source components.
Original work
nrendall
Original developments include:
Institutional Quality Engine (IQE)
IQE scoring methodology
Participation, Efficiency, Structure, Trend and Liquidity engines
VI / V / I Combined Signal Engine
Consecutive signal confirmation
TDFI integration
Dynamic alert system
Candle colouring system
Overall architecture and user interface
Volume Bubble Engine
This indicator includes an adapted implementation of the open-source Volume Bubbles indicator.
Original author:
QuantAlgo
When using a laptop hovering over the Bubbles gives additional volume insights. This does work of a phone or tablet but does not work as well as when using a laptop
TDFI Trend Filter
This indicator includes an adapted implementation of TDFI v2.
Original author:
causecelebre
The TDFI filter has been integrated into the IQE signal engine and extended with configurable filtering modes while respecting TradingView's House Rules for open-source scripts.
Looking Ahead – IQE Professional
IQE + Volume Bubbles Engine Lite is the community edition of the IQE platform.
The upcoming IQE Professional will introduce a completely new proprietary architecture, including:
Institutional Absorption Engine - Completed
EMA Squeeze / Market State filter showing Squeeze and Ranging Markets - Completed
Participation Persistence Engine
Advanced Liquidity Analysis
Institutional Confidence Scoring
Multi-engine confirmation
Advanced dashboards
Premium alerts
Iceberg Identification
Multi-timeframe participation analysis
Accumulation and distribution regimes
Institutional continuation and reversal models
Liquidity sweep sequences
Reload and estimated iceberg behaviour
Cross-engine confluence scoring
Configurable trade-rating framework
Session and regime analytics
Research/export tools
These may have to be split into two different indicators as the Pro is already 3000+ lines and creeping towards the max of PineScript.
Additional institutional market analytics
The long-term goal is the IQE Institutional Suite, bringing together original institutional participation and market-structure analysis into a unified professional trading platform. Indikator

Multi-Oscillator Divergence Scanner [Quantum Algo]Multi-Oscillator Divergence Scanner
====================================================
🔶 OVERVIEW
Multi-Oscillator Divergence Scanner is a confluence-based divergence indicator that scans up to seven classic oscillators simultaneously — Relative Strength Index, Moving Average Convergence Divergence, Stochastic Oscillator, Commodity Channel Index, On Balance Volume, Money Flow Index, and Momentum — and displays the result on two synchronized canvases at once. Divergence lines, graded labels, and reaction zones are drawn directly on the price chart, while a dedicated pane below plots a Composite Oscillator built from every enabled engine, with the same divergence lines mirrored onto the composite itself. You see both slopes of every divergence — price disagreeing with momentum — in one glance.
The problem this script solves is selective divergence trading. Any single oscillator produces frequent divergences, and most of them fail. Requiring multiple mathematically independent engines — momentum-based, volume-based, and volatility-normalized — to diverge at the same confirmed swing filters the noise down to setups where disagreement between price and participation is broad, not incidental.
🔶 WHAT IS A DIVERGENCE?
A divergence occurs when price prints a new extreme but an oscillator refuses to confirm it. A regular bullish divergence forms when price makes a lower low while the oscillator makes a higher low — a classic reversal condition. A regular bearish divergence forms when price makes a higher high while the oscillator makes a lower high. Hidden divergences are the continuation counterparts: price makes a higher low while the oscillator makes a lower low (hidden bullish), or price makes a lower high while the oscillator makes a higher high (hidden bearish). This scanner detects all four types on confirmed swing pivots.
🔶 WHAT IS THE COMPOSITE OSCILLATOR?
The Composite Oscillator is the consensus reading of every engine you enable. Bounded oscillators (Relative Strength Index, Stochastic, Money Flow Index) contribute their native zero-to-one-hundred values; unbounded engines (Moving Average Convergence Divergence histogram, On Balance Volume, Momentum) are range-normalized over a configurable lookback; the Commodity Channel Index is rescaled onto the same axis. The average of all enabled engines plots as a single gradient line with overbought and oversold guides, a midline fill, and divergence lines drawn directly on it — so the pane shows aggregate momentum from the same engines that vote on every signal, not a separate calculation.
🔶 WHY THIS SCRIPT IS ORIGINAL
1. True multi-engine confluence. Divergences are not detected on one oscillator and decorated with others. All seven engines are evaluated independently at every confirmed pivot, and a signal only exists when the minimum confluence count you set is reached.
2. Dual-canvas mirroring. Every qualified divergence is drawn twice: on price, and on the Composite Oscillator in the pane, connected at the same two pivots. Both slopes of the disagreement are visible simultaneously — the visual proof that defines a divergence.
3. Consensus composite pane. The pane line is not one more oscillator; it is the averaged, normalized voice of the exact engines doing the scanning, colored by a gradient between the oversold and overbought guides.
4. Full transparency on every label. Each signal prints its strength as a diamond meter and lists the exact oscillators that diverged (for example: RSI · OBV · MFI). You always know why a signal exists — nothing is a black box.
5. Strength-scaled visuals. Divergence lines thicken with confluence on both canvases, and signals reaching the Strong threshold upgrade to the accent color, so chart hierarchy communicates quality instantly.
6. Reaction zones with a life cycle. Every regular divergence projects a volatility-sized zone around its pivot (measured in Average True Range). Zones gray out automatically the moment price invalidates them, so the chart always distinguishes live zones from dead ones.
7. Divergence pressure gauge. A decaying pressure model accumulates bullish and bearish divergence weight over time, giving a one-glance read on which side has been stacking disagreement with price.
🔶 HOW IT WORKS
Pivot scanning: Swing highs and swing lows are confirmed with a symmetric pivot lookback. All divergence checks are evaluated on closed bars at pivot confirmation, so historical signals do not repaint. Confirmation lag equals the right-side pivot length by design.
Confluence evaluation: At each confirmed pivot, every enabled oscillator's value at that pivot is compared against its value at the previous same-side pivot. The four divergence types are tested independently per oscillator, and contributions are counted.
Signal grading: Signals meeting the Minimum Oscillator Confluence print with strength diamonds (one per contributing oscillator). Signals reaching the Strong Signal Threshold upgrade to the accent color and thicker geometry on both the price chart and the composite pane.
Composite rendering: The pane plots the consensus line with a gradient fill to the midline, dashed overbought and oversold guides, tinted extreme bands, triangle marks at divergence bars, and the mirrored divergence lines.
Reaction zones: Each regular divergence projects a box around its pivot sized by Average True Range, extended a configurable number of bars. A bullish zone grays out when price closes below it; a bearish zone grays out when price closes above it.
Dashboard: A fully themeable panel on the price chart shows the last signal, a live divergence pressure meter, and one row per engine with its live value — color-coded for overbought, oversold, or directional state — plus each engine's most recent divergence side. Text size (four steps), position, and every color (title band, background, frame, grid, header, body, muted) are adjustable.
Chart hygiene: The number of divergences kept is capped by input, on both canvases. Older lines, labels, and zones are deleted automatically, keeping the chart readable and the auto-scale anchored to current price.
🔶 HOW TO USE IT
1. Works on any market — cryptocurrency, forex, gold, indices, stocks, futures — and any timeframe. Higher timeframes produce fewer, larger-structure signals.
2. Start with Minimum Oscillator Confluence at 2 and the Strong threshold at 4. Raise the minimum to 3 for a strict, low-frequency reversal tool; lower it to 1 to study single-oscillator behavior.
3. Read the pane and the chart together: a valid signal shows price sloping one way and the composite sloping the other, connected at the same pivots.
4. Regular divergences are reversal-oriented: treat them as exhaustion evidence at swing extremes, strongest when the composite is also inside an overbought or oversold band.
5. Hidden divergences are continuation-oriented: treat them as trend re-entry evidence during pullbacks, and do not read them like reversal signals.
6. Use the reaction zone as the decision area: a live zone holding on retest supports the signal; a grayed zone means the divergence failed.
7. The pressure meter is context, not a trigger — persistent one-sided pressure alongside fresh strong signals is the highest-quality condition.
🔶 SETTINGS
- Pivot Left / Right Length — swing size; larger values scan bigger structures.
- Independent toggles and lengths for all seven oscillator engines.
- Composite pane: normalization lookback, overbought and oversold levels, pane marks, and mirrored divergence lines toggle.
- Regular and hidden divergence toggles, minimum confluence, strong threshold.
- Reaction zone height (Average True Range ratio) and extension.
- Divergences To Keep — caps historical drawings on both canvases for chart cleanliness and stable auto-scale.
- Dashboard with adjustable text size, position, live oscillator values, and full color theming.
- Full color customization for all chart drawings and pivot markers.
🔶 ALERTS
- Bullish Divergence / Bearish Divergence — a regular divergence met the confluence minimum.
- Hidden Bullish Divergence / Hidden Bearish Divergence — a continuation divergence met the minimum.
- Strong Divergence — a regular divergence reached the strong threshold.
🔶 FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? No. Divergences are evaluated only on confirmed pivots at bar close. The trade-off is intentional confirmation lag equal to the right-side pivot length.
Why does a pane divergence line sometimes start slightly off the composite's visual peak? Divergence is measured at price structure points. The line connects the composite's values at the two confirmed price pivots, which is the correct comparison even when the composite made its own extreme a bar or two away.
Why do some obvious divergences not print? Either the confluence minimum was not reached, the oscillator involved is disabled, or the swing did not confirm as a pivot under the current lengths.
Which oscillators should I enable? The default set mixes momentum and volume perspectives, which is the point of confluence: independent evidence, not seven copies of the same math.
Is a Strong signal a guaranteed reversal? No. Strength counts agreement between engines; it is a transparency measure, not a probability of profit.
🔶 CREDITS
This script builds its scanning and composite engine on classic, public-domain oscillators, and gratefully credits their creators: the Relative Strength Index by J. Welles Wilder Jr. (1978), Moving Average Convergence Divergence by Gerald Appel, the Stochastic Oscillator popularized by George C. Lane, the Commodity Channel Index by Donald Lambert (1980), On Balance Volume by Joseph Granville (1963), and the Money Flow Index by Gene Quong and Avrum Soudack. All oscillator calculations use standard built-in formulas. Drawing divergence lines on an oscillator is a long-established charting convention popularized by many community authors, acknowledged here as shared prior art. The multi-engine confluence scanner, the consensus Composite Oscillator, the dual-canvas mirroring, transparency labeling, strength grading, reaction zone life cycle, pressure model, and all code in this script are original work — no third-party or open-source script code was reused.
🔶 LIMITATIONS
Divergence can persist or fail entirely during strong trends; regular divergences against a powerful trend are the weakest application. Volume-based engines (On Balance Volume, Money Flow Index) are less meaningful on symbols with unreliable volume reporting. The composite's normalized components depend on the normalization lookback. Pivot confirmation introduces intentional delay. No indicator replaces independent analysis.
🔶 DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past behavior of any signal does not guarantee future results. Trading involves substantial risk. Always do your own research and manage risk independently.
Indikator

Indikator

JonnyFutures IB Pro + Session LevelsJonnyFutures IB + Session Levels
a level-mapping tool. it builds your Initial Balance live as the first hour forms, tracks PDH/PDL, London, and Asia session ranges, and tells you — in real numbers — whether ES and NQ agree on which side broke first.
no signals, no arrows, no "buy here" nonsense. just the levels that matter and the math behind them.
What it plots:
**IB High / IB Low** — the running high and low of your Initial Balance window (default 9:30–10:30 AM ET). while the hour is forming, these lines update live, bar by bar, as price makes new extremes. once the hour closes, they lock and hold for the rest of the day.
**25% / 50% / 75%** — the IB range sliced into quarters. these update in real time right alongside the IB high/low while the hour is still forming, so you can see where the midpoint and quarter levels are sitting before the hour even closes.
**PDH / PDL** — yesterday's regular session high and low. fixed the moment the new trading day starts.
**London High / Low** — the prior completed London session's range (default 2:00–5:00 AM ET). locks in when London closes, holds through the entire next day.
**Asia High / Low** — the prior completed Asia session's range (default 6:00 PM–12:00 AM ET). same logic — locks at session close, holds until the next Asia session completes.
every line ends with a small dotted extension and a price-tagged label pushed to the right of live price, so nothing sits on top of your forming candles.
The table
top-right by default (movable in settings). shows:
- **CURRENT** — did your chart's symbol form the IB high or IB low first
- **COMPARE** — same read, but for the second symbol you set (ES/NQ pair)
- **ES/NQ MATCH** — MATCH if both instruments broke the same direction first, NO MATCH if they diverged, FORMING while the IB hour is still in progress
- exact IB high/low, PDH/PDL, London H/L, Asia H/L values
this is the confirmation piece. divergence between ES and NQ on which side prints first is a real tell — this puts it in front of you instead of making you eyeball two charts.
## setup
1. add to chart, works on any intraday timeframe — **5-minute or lower recommended.** on higher timeframes a single candle can contain both the IB high and low, which blurs which one actually came first.
2. in settings, set **Compare Symbol** to whichever of ES/NQ you're *not* charting. defaults to NQ (`CME_MINI:NQ1!`) — flip it to `CME_MINI:ES1!` if your chart is already NQ.
3. adjust session windows (IB, London, Asia) if you run different hours than the ICT-standard defaults.
4. **Label Offset** controls how far right the price tags sit — bump it up if you're zoomed out and labels still feel close to price.
## things to know
- IB and session boxes reset automatically at the start of each new NY trading day — you're never looking at stale levels.
- the ES/NQ comparison uses `request.security` to pull the same IB logic on the second symbol in real time, so both reads are apples-to-apples.
- London and Asia levels are the **previous completed session**, not the one currently forming — that's intentional, it's your reference range, not a live-forming box.
no edge in a level by itself. the edge is in how price reacts when it gets there. this just gives you the map.
execute your edge 🟦 Indikator

Indikator

Institutional Flow MatrixInstitutional Flow Matrix is an open-source market-analysis framework designed to organize trend direction, confirmed market structure, institutional price zones, momentum, and location within a dealing range into one readable chart.
The purpose of this indicator is not to predict every price movement or generate constant entries. It is designed to answer a more practical sequence of questions:
1. What is the current directional bias?
2. Is market structure supporting that direction?
3. Is price trading from a meaningful location?
4. Has price returned to an active institutional zone?
5. Is momentum aligned with the proposed setup?
The script combines these questions into a structured workflow while keeping the default chart intentionally clean.
WHY THIS INDICATOR WAS BUILT
Many market-structure indicators display every swing, imbalance, liquidity level, zone, and signal at the same time. While that information can be useful for detailed analysis, it can also make the chart difficult to interpret during live trading.
Institutional Flow Matrix was built around a visual hierarchy:
* Directional bias is the primary layer.
* Active Order Blocks are the principal reaction zones.
* Momentum is a confirmation layer.
* Premium and Discount provide market location.
* Fair Value Gaps, liquidity pools, sweeps, and higher-timeframe levels are optional study tools.
The default Balanced preset focuses on the information most relevant to a directional pullback setup. Minimal mode removes most supporting visuals for live execution. Full mode reveals the additional market-structure tools for deeper analysis.
WHAT MAKES THE IMPLEMENTATION DIFFERENT
The individual concepts used by this script, including pivots, moving averages, ATR trend filters, Order Blocks, Fair Value Gaps, and Premium/Discount ranges, are established forms of technical analysis.
The original contribution of Institutional Flow Matrix is how those components are synchronized and managed as one decision framework.
Key design elements include:
* Confirmed structure events rather than unconfirmed swing guesses.
* A persistent directional state requiring agreement between structure, EMA alignment, and an ATR-based trend filter.
* Order Block freshness validation before a zone is accepted.
* Separate visual duration and analytical lifetime controls for zones.
* Automatic mitigation and expiration of old zones.
* Limited drawing-object counts to prevent long-term chart clutter.
* A weighted confluence model centered on trend, structure, zone interaction, market location, and momentum.
* Three visual presets that change the information hierarchy without changing the underlying calculations.
* Confirmed-bar signals and event-based alerts.
This is not intended to be a collection of unrelated indicators. Each module has a defined role in the same setup process.
DIRECTIONAL BIAS
The chart background represents the script's confirmed directional state.
A bullish state requires agreement between:
* Bullish market structure.
* Fast EMA positioning above the slow EMA.
* Bullish ATR trend conditions.
A bearish state uses the opposite conditions.
The background changes only after the required conditions are confirmed. A larger BUY or SELL label marks a confirmed change in this directional state.
These shift labels are different from the smaller confluence signals. A shift label identifies a change in directional bias. A confluence signal requires additional location, zone, and momentum conditions.
MARKET STRUCTURE
Confirmed pivot highs and lows form the structure engine.
The script tracks:
* Higher Highs
* Higher Lows
* Lower Highs
* Lower Lows
* Breaks of Structure
* Changes of Character
A bullish break occurs when a confirmed bar closes above the latest unbroken confirmed swing high. A bearish break occurs when a confirmed bar closes below the latest unbroken confirmed swing low.
Swing labels are retrospective by design. A pivot can only be confirmed after the selected number of right-side bars has closed. Once confirmed, its label is placed on the candle where the swing originally occurred. The label was not known on that earlier candle.
ORDER BLOCKS
Order Blocks are the primary reaction zones in the indicator.
After a confirmed structure break or qualifying displacement event, the script searches backward for an opposing candle. A candidate candle can be filtered by:
* Candle range relative to ATR.
* Body size as a percentage of candle range.
* Optional volume expansion.
* Wick-based or body-based zone construction.
Before accepting the candidate, the script checks whether price has already invalidated it. This prevents many stale zones from being created after the fact.
Active Order Blocks can be invalidated by either:
* A close beyond the opposite edge.
* A wick beyond the opposite edge.
The selected mitigation method is used consistently during both zone creation and live zone management.
Order Blocks have separate controls for visual extension and analytical age. This allows users to control how long a box remains visible independently from how long it remains eligible for signal calculations.
PREMIUM, DISCOUNT, AND EQUILIBRIUM
The script creates a rolling dealing range from the highest high and lowest low over the selected lookback.
The range is divided into:
* Premium: the upper portion of the range.
* Discount: the lower portion of the range.
* Equilibrium: the 50% midpoint.
Premium and Discount do not generate trades by themselves. They provide location.
In general:
* Bullish setups receive stronger contextual support in Discount.
* Bearish setups receive stronger contextual support in Premium.
* Equilibrium represents the midpoint of the current rolling range.
Because the range is rolling, its boundaries can change when a new lookback high or low is formed.
MOMENTUM RIBBON
The momentum module uses three exponential moving averages and an ATR-normalized difference between the fast and slow averages.
Bullish momentum requires:
* Fast EMA above the slow EMA.
* Positive normalized momentum.
* Momentum above its signal average.
Bearish momentum uses the opposite conditions.
Diamond markers identify confirmed momentum crossings. The ribbon is intended as confirmation rather than a standalone entry system.
CONFLUENCE SIGNALS
The script calculates a 0-100 Confluence Score from five conditions:
* Directional bias: 25 points.
* Market structure: 15 points.
* Momentum alignment: 15 points.
* Active Order Block interaction: 25 points.
* Premium or Discount location: 20 points.
The score measures condition alignment. It is not a probability, win rate, accuracy estimate, or forecast of future performance.
By default, BUY and SELL signals require:
* Confirmed directional bias.
* Matching confirmed structure.
* Interaction with an active Order Block.
* Correct Premium or Discount location.
* Matching momentum.
* Minimum Confluence Score.
* Completion of the selected signal cooldown.
Signals are displayed only when the complete condition changes from false to true. This prevents repeated labels while the same setup remains active.
OPTIONAL ADVANCED MODULES
Full mode provides additional analytical tools:
* Fair Value Gaps with ATR size filtering.
* Equal-high and equal-low liquidity pools.
* Confirmed liquidity sweeps.
* BOS and CHoCH labels.
* HH, HL, LH, and LL labels.
* Previous day, week, and month highs and lows.
* Optional momentum candle coloring.
These features are disabled or hidden from the default Balanced view to preserve readability.
VISUAL PRESETS
Minimal:
Designed for traders who want the least chart interference. It suppresses the background, ribbon, Premium/Discount display, trailing line, dashboard, and advanced structure annotations.
Balanced:
The default view. It emphasizes directional background, active Order Blocks, Premium/Discount context, momentum ribbon, diamonds, signals, and the dashboard.
Full:
Designed for detailed study. It adds structure labels, BOS/CHoCH events, Fair Value Gaps, liquidity tools, higher-timeframe levels, and optional candle coloring.
FOR NEWER TRADERS
A simple workflow is:
1. Start with the Balanced preset.
2. Use the background to identify the current directional bias.
3. Wait for price to return to an Order Block matching that bias.
4. Check whether price is in Discount for a bullish setup or Premium for a bearish setup.
5. Confirm that the momentum ribbon agrees.
6. Treat the signal as a point for further analysis, not an automatic order.
The equilibrium line can be used as a reference for the midpoint of the current dealing range. It is not automatically an entry or exit instruction.
FOR ADVANCED TRADERS
Experienced users can customize:
* Pivot confirmation sensitivity.
* ATR and EMA trend parameters.
* Wick-based versus body-based Order Blocks.
* Displacement-created zones.
* Candle body, range, and volume filters.
* Close-based versus wick-based mitigation.
* Zone visual duration and analytical age.
* Premium and Discount percentages.
* Fair Value Gap size.
* Liquidity sensitivity.
* Momentum lengths.
* Individual signal requirements.
* Minimum confluence threshold.
* Signal cooldown.
* Higher-timeframe reference levels.
Advanced users can also disable individual hard requirements and use the Confluence Score as a more flexible filtering system.
ALERTS
Alert conditions are included for:
* Break of Structure.
* Change of Character.
* New Order Block.
* BUY signal.
* SELL signal.
* Bias-aligned Order Block entry.
* Trend and momentum confluence.
* Liquidity sweep.
Alerts should be created using Once Per Bar Close when confirmed signals are required.
NON-REPAINTING AND TIMING
Structure breaks, directional shifts, zone creation, zone mitigation, momentum events, and confluence signals are evaluated on confirmed bars.
Pivot-based swing labels require future bars to confirm that a swing occurred. After confirmation, the label is displayed on the original pivot candle. This is delayed confirmation with retrospective placement, not advance knowledge of the swing.
Previous-period levels use completed higher-timeframe data.
LIMITATIONS
* This indicator does not predict future prices.
* It does not calculate position size, stop loss, or account risk.
* It is not a complete automated trading system.
* Signals can fail during volatile, illiquid, or range-bound conditions.
* Rolling Premium, Discount, and equilibrium levels can move when the lookback range changes.
* Confirmed pivots introduce an intentional delay.
* Order Block definitions vary among trading methodologies; this script uses the documented candle-search and filtering rules described above.
* Volume behavior differs across asset classes and data providers.
* Parameter settings that work on one symbol or timeframe may not be appropriate for another.
Suggested starting points are the 15-minute and 1-hour charts for intraday analysis and the 4-hour chart for broader swing structure. Users should test settings on their own symbols and trading sessions.
OPEN-SOURCE PURPOSE
The script is published open-source so traders can inspect the calculations, understand why signals occur, verify the confirmed-bar methodology, and adapt the framework for their own research.
The goal is to provide a readable and transparent market-structure workflow rather than a black-box prediction tool.
DISCLAIMER
This indicator is provided for educational and analytical purposes only. It is not financial advice and does not guarantee profitable results. Historical chart behavior does not ensure future performance. Users are responsible for their own analysis, testing, risk management, and trading decisions.
Indikator

Indikator

Indikator

Trend Follow - EMA200 + ATR Risk**What this script does**
This indicator flags trend changes based on the price crossing a 200-period EMA, and displays an indicative risk level based on ATR (Average True Range) at each signal. The orange dotted markers represent a suggested risk distance (2x ATR by default) — a visual reference only; this script does not execute any trades.
**Why this approach**
The logic follows a simple principle: stay aligned with the underlying trend as long as price confirms it relative to a long moving average, rather than stacking multiple indicators in search of a "perfect" signal. A small parameter count reduces the risk of curve-fitting — a common pitfall in scripts that combine many filters.
**Validation methodology**
This mechanism was tested using a walk-forward approach: parameters were fixed on one period (2020-2023) and then evaluated without any adjustment on an unseen period (2024-2026), on BTC/USDT and ETH/USDT, 4H timeframe. Profit factor stayed above 1 across all four tested combinations (both assets, both periods). More complex approaches (multi-indicator combinations, volatility squeeze detection) were tested with the same protocol and rejected for failing to generalize — this elimination process led to this intentionally simple version.
**Limitations and disclaimer**
A positive historical test does not guarantee future performance — market conditions change. This script is a trend-reading aid, not a complete trading system or investment advice. The win rate of a trend-following approach is structurally low (many small losses offset by a few larger moves) — understand this before use. Always test and validate independently on your own market and timeframe before real use.
**Parameters**
- EMA Length (default 200): trend moving average length.
- ATR Length (default 14) and suggested risk distance (x ATR, default 2.0): configuration of the displayed risk level.
Open-source script under the Mozilla Public License 2.0.
**Ce que fait ce script**
Cet indicateur signale les changements de tendance à partir du croisement du prix avec une EMA200, et affiche un niveau de risque indicatif basé sur l'ATR (Average True Range) à chaque signal. Les points orange en pointillés représentent une distance de risque suggérée (2x ATR par défaut) — un repère visuel, pas un ordre automatique : ce script n'exécute aucune transaction.
**Pourquoi cette approche**
La logique repose sur un principe simple : suivre la tendance de fond tant qu'elle est confirmée par le prix au-dessus (ou en-dessous) d'une moyenne mobile longue, plutôt que d'empiler plusieurs indicateurs à la recherche d'un signal "parfait". Un nombre réduit de paramètres limite le risque de sur-optimisation (curve-fitting) — un piège fréquent des scripts combinant de nombreux filtres.
**Méthodologie de validation**
Ce mécanisme a été testé en walk-forward : les paramètres ont été fixés sur une période (2020-2023), puis évalués sans aucun ajustement sur une période non vue (2024-2026), sur BTC/USDT et ETH/USDT en 4H. Le facteur de profit est resté supérieur à 1 sur les quatre combinaisons testées (les deux actifs, les deux périodes). D'autres approches plus complexes (combinaisons d'indicateurs, détection de squeeze de volatilité) ont été testées avec le même protocole et rejetées car elles ne se généralisaient pas — c'est ce processus d'élimination qui a mené à cette version volontairement simple.
**Limites et avertissement**
Un test historique positif ne garantit aucune performance future — les conditions de marché évoluent. Ce script est un outil d'aide à la lecture de tendance, pas un système de trading complet ni un conseil en investissement. Le taux de trades gagnants d'une approche de suivi de tendance est structurellement bas (beaucoup de petites pertes compensées par quelques mouvements plus larges) : à comprendre avant toute utilisation. Testez et validez toujours par vous-même sur votre marché et votre horizon de temps avant un usage réel.
**Paramètres**
- EMA Length (200 par défaut) : longueur de la moyenne mobile de tendance.
- ATR Length (14 par défaut) et distance de risque suggérée (x ATR, 2.0 par défaut) : configuration du niveau de risque affiché.
Script open-source sous licence Mozilla Public License 2.0.
Indikator

Indikator

Zero-Lag MACD Divergence Pro Zero-Lag MACD Divergence Pro is a MACD-family oscillator that reduces the indicator's inherent lag using zero-lag exponential averaging, detects regular divergences directly inside the MACD pane, and optionally gates its buy/sell markers so they only appear when a divergence and a crossover confirm each other. It is designed for intraday timeframes but works on any chart.
What makes it original
This is not a standard MACD with cosmetic changes. Three elements work as one system: (1) all three components — fast line, slow line, and signal line — are rebuilt on zero-lag EMAs rather than standard EMAs, (2) divergence detection runs on the zero-lag MACD line itself and draws its lines and labels inside the oscillator pane, with an optional mirrored dashed line on the price chart, and (3) a combo-gating mode suppresses crossover markers unless a divergence was confirmed within a recent, user-defined window, which filters the many insignificant crossovers a MACD produces in ranging markets.
How it works
Zero-Lag Core: Each component uses the zero-lag EMA construction (2 × EMA − EMA of EMA), a public-domain technique attributed to John Ehlers' error-correction work. This roughly halves the effective lag of each average, so crossovers occur earlier than on a classic MACD. A faded classic MACD line can be displayed for side-by-side comparison and switched off in the settings.
Divergence Detection: Confirmed pivot highs/lows on the zero-lag MACD line are compared with price highs/lows at the same bars. A regular bullish divergence (price lower low, MACD higher low) or regular bearish divergence (price higher high, MACD lower high) draws a connecting line between the two MACD pivots with a label in the pane. Pivots confirm only after the lookback period elapses, so divergence lines appear with a delay by design and do not repaint.
Combo Signals: In the default mode, a buy/sell marker prints on the price chart only when a zero-lag crossover occurs while a same-direction divergence is still valid (within a user-defined number of bars). Turning combo mode off prints markers on every confirmed crossover instead. Signals respect a cooldown and a daily maximum.
Four-Color Histogram: The histogram distinguishes rising and fading momentum on both sides of the zero line.
Dashboard: A dark, movable panel (styled to stay readable on light-theme charts) summarizes MACD state, histogram direction, active divergence, zero-line position, and the day's signal count.
How to use it
Add the indicator to a lower-timeframe chart (5–15 min for intraday use). Watch for a divergence label in the pane, then wait for the crossover marker that confirms it — the combo mode automates exactly this sequence. The zero-line row on the dashboard helps grade signals: bullish setups above the zero line and bearish setups below it occur in the direction of the broader momentum. All lengths, the divergence window, signal limits, colors, and dashboard placement are adjustable.
Limitations
Divergence lines appear only after pivots confirm (default 5 bars), so they are visible later than the pivot itself; this is the unavoidable cost of non-repainting detection. Reduced lag also means the zero-lag lines are more sensitive than a classic MACD and can produce more crossovers in choppy conditions — the combo mode exists to filter these. This tool describes momentum conditions; it does not predict future price movement, and past behavior of any signal does not guarantee future results. Always combine with your own analysis and risk management. Indikator
