Wonra Alchemist SNR EngineWonra Alchemist SNR Engine
An implementation of Malaysian SNR (MSNR) and the Quasimodo reversal pattern, built as one engine because in that method the pieces are not independent indicators. A level means nothing without knowing which way the story is running, and the story is told by levels. This publishes the whole reading rather than one part of it.
Everything below is visible in the source. This is published open-source so the code is the final word on any of it.
How levels are found
Malaysian SNR ignores wicks. A level is marked by joining one candle's close to the next candle's open, and the space between those two prices is the level itself. Where the two meet you get a hairline; where they do not, the space between them never traded, and that untraded space is what the method calls a GAP. The engine treats both as one construct: a level is a band, and a gap is a band you can see.
That has consequences the code follows through on:
A touch registers at either edge of the band.
A break requires a close through the far edge. Closing inside the band has broken nothing, because nothing in there ever traded.
Levels are seeded from confirmed swings (an ATR-threshold zigzag, so minor noise does not create a level of its own) and from close-to-open gaps above a size floor.
How a level earns weight
Two things strengthen a level, and the second is the one most tools ignore.
Touches. Price left the level, came back and was refused. Leaving is required: price hovering at a price does not add a touch every bar.
Misses. Price swung toward the level and turned before reaching it. In MSNR a miss validates a level rather than doing nothing, and the reasoning is that the resting liquidity was never taken, so all of it is still there. A level with three misses is not the same as one with three taps, and the label shows them separately.
Role flip (SBR / RBS)
A level closed through does not disappear, it changes sides. Broken support becomes resistance and broken resistance becomes support, keeping its history. This is the SBR/RBS part of the method and it is why the chart does not empty out over a session.
Quasimodo (QM / QML)
The engine looks for the QM shape: a shoulder, a head beyond it, and a return. For a bullish QM the head must be a lower low than the left shoulder; the level drawn is the left shoulder, not the head, which is where the pattern is traded from. Each candidate must also produce a structure break before it is accepted, and combinations are scanned across several swings so a pattern is still found when a minor swing sits inside it.
Supply zones extend up from the QM level and demand zones extend down from it, on one side only, so price is not counted as having reached a zone while it is still short of the level.
Storyline (direction)
MSNR determines direction from higher-timeframe levels, and the engine follows the four rules the method states:
Direction comes from higher-timeframe levels, read from bodies, not from wick extremes.
A storyline begins with a rejection: a close back below resistance, or back above support.
It is confirmed by a breakout on a lower timeframe. The engine distinguishes the two kinds the method names — an internal breakout of a level formed after the rejection, and an external breakout of one that already existed — and reports which occurred.
Levels against the established direction are roadblocks: the places pullbacks are expected to stop on the way. They are marked rather than hidden, because they are the one thing the method tells you to expect.
Engulfing zones (EG / EF)
An engulfing candle above a size floor creates a zone. The rule that makes it worth having is what happens when it fails: a bullish zone that price closes through becomes a failed zone read the other way, at the same prices, because that is where the other side proved itself. Broken twice and it is discarded, having now been wrong in both directions.
Imbalances
Three-candle gaps, drawn as neutral background. Zones spanning a market closure are discarded — a weekend is not unfinished business between buyers and sellers, it is a closed market, and it happens to leave the largest and most eye-catching gap on the chart.
Scoring
Confirmed patterns are scored 0-100 from what the engine already knows about them: the size of the structure, the quality of the break, whether liquidity was swept and how cleanly, whether an imbalance sits inside the zone, and how proven the levels involved are. The score sets how loudly a pattern is drawn. Nothing is deleted for scoring low.
Why this is one script and not several
Because in this method the parts are not separable. The storyline decides which levels are tradeable and which are roadblocks. The QM level is only a setup when it agrees with the storyline. A level's weight comes from its own touch and miss history. Splitting these into separate indicators would produce three scripts that each need the other two to say anything, which is the situation this replaces.
How to use it
The panel gives the current reading: storyline direction and which breakout confirmed it, how many fresh zones are live on each side, the nearest zone in ATR, and whether a confluence is being watched.
Fresh zones are the tradeable ones. A zone that has been used is faded, not removed, so the history stays readable.
Zone reactions are marked where they happen. A diamond marks a reaction from a level that had already proven itself.
Levels against the storyline are marked RB. Expect a pause there, not a reversal.
Higher timeframes for direction, lower for entry timing. The storyline timeframe is automatic and can be set manually.
Credits
The concepts are not mine. Malaysian SNR, the storyline structure, roadblocks, fresh and unfresh levels, the MISS, SBR/RBS and the Quasimodo entry come from Malaysian SNR and Alchemist educational material that circulates publicly. This is an implementation of that method, not a new one.
The Strong FVG section is taken from "Customizable Strong FVGs" by Fleezzuss, published open-source under the Mozilla Public License 2.0. The three-candle detection, the sensitivity modes and the zone lifecycle are their work. This script is published open-source under the same licence because of it.
Added on top: a gap is not drawn when it would sit on one already on the chart, so consecutive impulse candles stop stacking zones at the same price; gaps spanning a market closure are discarded, because a weekend is a closed market rather than an imbalance; and the palette is neutral so imbalances sit behind the levels instead of competing with them.
Not financial advice. This is an analysis tool. It does not predict outcomes and does not tell you to buy or sell. Every level can fail.
Wskaźnik

Precision Bedrock [MohaveTrader]Precision Bedrock is an open-source market structure indicator that combines adaptive trend rails, structural equilibrium, rail-sourced support and resistance zones, and contextual reversal warnings into a single framework. Rather than accumulating historical levels, Bedrock continuously maintains the structure that remains relevant to current price action.
━━━━━━━━━━━━━━━━━━━━━━━━━━
WHY BEDROCK IS DIFFERENT
━━━━━━━━━━━━━━━━━━━━━━━━━━
Most support/resistance tools draw a level and leave it there. The market moves; the level does not, and the chart slowly fills with lines that no longer matter.
Bedrock treats market structure as something living. Zones are born from rail extremes and confirmed by price rejection. They move through a defined lifecycle that includes testing, confirmation, merging, role reversal, and eventual retirement as the market evolves. The result is a chart focused on the structural levels that remain relevant as price evolves.
━━━━━━━━━━━━━━━━━━━━━━━━━━
THE RAIL & EQUILIBRIUM ENGINE
━━━━━━━━━━━━━━━━━━━━━━━━━━
Upper and lower rails track the recent extremes over a lookback that adapts to your chart's timeframe. They define the channel the zones are sourced from and the directional context the reversal logic reads against, running under the hood rather than as a plotted line.
Between the rails sits the equilibrium: a smoothed, adaptive midline that reads where price is balancing within the channel. It is the reference the reversal logic measures turns against — a curl or slope shift in the equilibrium is often where building pressure first shows up.
━━━━━━━━━━━━━━━━━━━━━━━━━━
STRUCTURAL ZONES
━━━━━━━━━━━━━━━━━━━━━━━━━━
Zones are sourced from the rails, not from raw pivots. A rail printing a new extreme arms a candidate; a close-based pullback of a configurable ATR distance away from that extreme commits it into a zone, keeping zones anchored to structure the market actually stepped away from. Each zone is an ATR-width band — the rail extreme is the outer edge, extending inward toward price — so the level has the thickness real reactions occur across.
Every zone moves through a lifecycle:
• Active — a confirmed level, drawn as Support or Resistance.
• Testing — price has entered the band; the label reads Testing until the test resolves.
• Confirmed hold — after a set number of consecutive closes back outside the inner edge, the test counts and the level's respected-touch strength increases.
• Broken — a confirmed close beyond the outer edge, or price walking far past and staying away, retires the level.
• Role reversal — a broken level can flip its role in place (support becomes resistance, or the reverse) a limited number of times, rather than spawning a duplicate.
Overlapping same-side zones collapse into a single structural area, reducing duplicate levels and chart clutter. Distant zones are hidden but retained, reappearing if price returns; a per-side cap and a broken-level fade keep the chart clean. Labels show the role and mid price (for example, "Support 6.04"), and an optional Full Zone History mode lengthens each box back to where the level first formed. All zone logic runs on confirmed bars and draws at the live edge — historical levels do not repaint.
━━━━━━━━━━━━━━━━━━━━━━━━━━
REVERSAL WARNING DOTS
━━━━━━━━━━━━━━━━━━━━━━━━━━
A reversal warning dot marks a bar where pressure is building against the current trend near a rail extreme. It appears only when several conditions align on the same bar: the trend is intact and not already changing, price is on the appropriate side of the equilibrium, price is near the relevant rail, either the equilibrium is turning or the bar itself is a rejection, and a weighted reversal score clears its threshold. A cooldown prevents clusters on the same swing. The score blends multiple structural and momentum components, so no single feature alone fires a dot.
A dot is an early, contextual warning, not a trade signal. It flags that a turn is being pressured; it does not confirm one. Each dot's tooltip prints its reversal score and the rail-break level a close beyond which would confirm the turn.
━━━━━━━━━━━━━━━━━━━━━━━━━━
CANDLE COLORING
━━━━━━━━━━━━━━━━━━━━━━━━━━
Optional candle coloring displays bullish bars in green and bearish bars in red, to keep the chart readable against the zone bands and dots. It is a simple directional recolor and encodes no state. For the cleanest display, hide the chart’s native candle body, border, and wick colors when this option is enabled.
━━━━━━━━━━━━━━━━━━━━━━━━━━
CHOP SUPPRESSION
━━━━━━━━━━━━━━━━━━━━━━━━━━
An optional filter, off by default, suppresses reversal dots when momentum is unusually weak or the momentum state is changing repeatedly. It remains optional because quiet or thin markets can still produce legitimate reversal pressure.
━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE IT
━━━━━━━━━━━━━━━━━━━━━━━━━━
Bedrock is context and structure for your own methodology, not a signal service:
• Read the zones as a map of where price may react, and plan your own entries, stops, and scale-outs around them.
• Use the rails and equilibrium for directional context as price approaches a zone.
• Treat a reversal warning dot as an early heads-up to tighten attention on an open position — remembering that a dot is a warning, not a confirmed turn.
• Watch how a level's touch history and lifecycle develop to gauge which zones have earned respect on your instrument.
Alert conditions are included for bullish and bearish reversal warnings, carrying the ticker and timeframe.
Bedrock pairs naturally with tools that add a different lens on the same price — volume profile, VWAP, and momentum or market-structure tools. It does not predict prices or guarantee outcomes: its zones and warnings are analytical structures, not recommendations to buy or sell. You remain solely responsible for every trading decision.
━━━━━━━━━━━━━━━━━━━━━━━━━━
CREDITS & LICENSE
━━━━━━━━━━━━━━━━━━━━━━━━━━
Precision Bedrock is released under the Mozilla Public License 2.0.
The adaptive trend rail, equilibrium, and reversal framework is derived from Adaptive Trend Rails by NICK789, used under the MPL 2.0. Original framework © NICK789.
Structural zones, lifecycle management, reversal scoring, candle coloring, and other Bedrock-specific functionality are original work by MohaveTrader. The momentum-state component of the reversal score is adapted from the author's open-source Precision Price Gamma (PGamma). Wskaźnik

[Kpt-Ahab] Moving Average Simple AlgoPilotImportant Notice and Risk Warning
The published settings were selected exclusively based on historical data for the asset and timeframe shown.
The displayed result may be random or over-optimized and cannot automatically be transferred to other assets, timeframes, or future market conditions. Even with the presented settings, the strategy may cause significant losses at any time, including the complete loss of the allocated strategy capital.
This script is intended exclusively for analysis and testing purposes. It does not constitute investment advice or a trading recommendation.
Description
This script uses reused and adapted code components from ** Auto RiskManagement & Backtest System 2.1b** and the ** Moving Average Alarm Output **.
These components have been combined into a standalone strategy that integrates moving-average signals with position management, risk management, and backtesting functions.
How It Works
The strategy uses two freely configurable moving averages. **SMA, EMA, WMA, VWMA, or HMA** can be selected independently for the short and long moving averages.
A long signal is generated when the short moving average crosses above the long moving average. A short signal is generated when the short moving average crosses below the long moving average.
The moving averages are displayed directly on the chart. An additional colored area visualizes the position of the price relative to the long moving average. Its intensity changes according to the distance between the two moving averages.
Position and Risk Management
The script supports, among other features:
* Long and short positions
* Fixed or trailing stop-loss levels
* Multiple partial profit targets
* A final profit target
* Breakeven after the first profit target
* Optional additional entries
* Drawdown and losing-trade limits
* Internal or external trading signals
* Different position-sizing methods
Additional entries and simulated leverage may significantly increase the risk of loss.
Backtest Limitations
Strategy Tester results are based exclusively on historical market data. Real-world results may differ significantly due to commissions, spreads, slippage, liquidity, price gaps, and execution delays.
Past performance is not a reliable indication of future results.
Signals During an Open Position
The **Open Position Signals** setting determines how new signals are handled while a position is already open:
* **Wait-End-Deal:** All new moving-average signals are ignored until the current position has been closed by a profit target, stop-loss, or another protective function.
* **Wait-Reversal:** An opposing moving-average signal may close the currently open position.
With **Wait-Reversal**, a sell signal closes a long position, while a buy signal closes a short position. The opposing signal does not automatically open a new position during the same step.
Price-based additional entries remain independent of this setting and may still be executed when enabled.
Stop-Loss, Trailing Stop, Breakeven, and Liquidation Line
The strategy supports both a fixed stop-loss and a trailing stop. The selected percentage represents the direct price distance from the average entry price and is not automatically adjusted by the simulated leverage.
In **FIXED %** mode, the stop is calculated from the current average entry price. If the average entry price changes due to an additional entry, the stop is recalculated accordingly.
In **TRAILING** mode, the stop only moves in a direction that is favorable to the position. If the average entry price changes due to an additional entry, the existing trailing stop is adjusted accordingly.
The stop may optionally be moved to the average entry price after the first profit target has been reached. A stop mode must be enabled for this breakeven function to operate.
The displayed liquidation line is only an internal estimate based on the simulated position and account values. It may differ significantly from the actual liquidation calculation used by a broker or exchange.
Using External Indicators
An external numerical signal source may be used instead of the integrated moving-average signals.
The external indicator must provide a selectable plot series containing the following values:
* **+1:** Long or buy signal
* **−1:** Short or sell signal
All other values, including `na`, produce no new signal.
The external indicator must output the required numerical values through a selectable plot. This plot can then be selected under **External Source**.
How an external signal is processed while a position is already open also depends on the selected **Open Position Signals** setting.
Wichtiger Hinweis und Risikowarnung
Die veröffentlichten Einstellungen wurden ausschließlich anhand historischer Daten für das dargestellte Asset und den verwendeten Zeitrahmen gewählt.
Das Ergebnis kann zufällig oder überoptimiert sein und lässt sich nicht automatisch auf andere Assets, Zeitrahmen oder zukünftige Marktphasen übertragen. Auch mit den dargestellten Einstellungen kann die Strategie jederzeit erhebliche Verluste verursachen und das eingesetzte Strategiekapital vollständig verlieren.
Dieses Skript dient ausschließlich zu Analyse- und Testzwecken und stellt keine Anlageberatung oder Handelsempfehlung dar.
Beschreibung
Dieses Skript verwendet wiederverwendete und angepasste Codebestandteile aus ** Auto RiskManagement & Backtest System 2.1b** und dem ** Moving Average Alarm Output **.
Die Komponenten wurden zu einer eigenständigen Strategie verbunden, die Moving-Average-Signale mit Positions-, Risiko- und Backtestfunktionen kombiniert.
Funktionsweise
Die Strategie verwendet zwei frei konfigurierbare gleitende Durchschnitte. Für den kurzen und den langen Moving Average können jeweils **SMA, EMA, WMA, VWMA oder HMA** ausgewählt werden.
Ein Long-Signal entsteht, wenn der kurze Moving Average den langen Moving Average von unten nach oben kreuzt. Ein Short-Signal entsteht bei einer Kreuzung von oben nach unten.
Die Moving Averages werden direkt im Chart dargestellt. Eine zusätzliche farbliche Fläche visualisiert die Position des Kurses relativ zum langen Moving Average. Die Intensität der Darstellung verändert sich abhängig vom Abstand zwischen den beiden Moving Averages.
Positions- und Risikomanagement
Das Skript unterstützt unter anderem:
* Long- und Short-Positionen
* feste oder nachlaufende Stop-Loss-Marken
* mehrere Teilgewinnziele
* ein abschließendes Gewinnziel
* Breakeven nach dem ersten Gewinnziel
* optionale zusätzliche Einstiege
* Drawdown- und Verlustserienbegrenzungen
* interne oder externe Handelssignale
* unterschiedliche Methoden zur Bestimmung der Positionsgröße
Zusätzliche Einstiege und ein simulierter Hebel können das Verlustrisiko deutlich erhöhen.
Einschränkungen des Backtests
Die Ergebnisse des Strategietesters basieren ausschließlich auf historischen Kursdaten. Reale Ergebnisse können durch Gebühren, Spread, Slippage, Liquidität, Kurslücken und Ausführungsverzögerungen erheblich abweichen.
Vergangene Ergebnisse sind kein verlässlicher Hinweis auf zukünftige Ergebnisse.
Signale während einer offenen Position
Über **Open Position Signals** wird festgelegt, wie neue Signale während einer bereits geöffneten Position behandelt werden:
* **Wait-End-Deal:** Alle neuen Moving-Average-Signale werden ignoriert, bis die aktuelle Position durch ein Gewinnziel, einen Stop-Loss oder eine andere Schutzfunktion beendet wurde.
* **Wait-Reversal:** Ein entgegengesetztes Moving-Average-Signal kann die aktuell geöffnete Position schließen.
Bei **Wait-Reversal** schließt ein Verkaufssignal eine Long-Position und ein Kaufsignal eine Short-Position. Das entgegengesetzte Signal eröffnet dabei nicht automatisch im selben Schritt eine neue Position.
Preisbasierte zusätzliche Einstiege bleiben von dieser Auswahl unabhängig und können weiterhin ausgeführt werden, sofern sie aktiviert sind.
Stop-Loss, Trailing-Stop, Breakeven und Liquidationslinie
Die Strategie unterstützt einen festen Stop-Loss sowie einen nachlaufenden Trailing-Stop. Der eingestellte Prozentwert beschreibt den direkten Kursabstand zum durchschnittlichen Einstiegspreis und wird nicht automatisch durch den simulierten Hebel verändert.
Im Modus **FIXED %** wird der Stop anhand des aktuellen durchschnittlichen Einstiegspreises berechnet. Verändert sich dieser durch einen zusätzlichen Einstieg, wird auch der Stop neu berechnet.
Im Modus **TRAILING** wird der Stop nur in eine für die Position günstigere Richtung nachgezogen. Verändert sich der durchschnittliche Einstiegspreis durch einen zusätzlichen Einstieg, wird der bestehende Trailing-Stop entsprechend angepasst.
Optional kann der Stop nach dem Erreichen des ersten Gewinnziels auf den durchschnittlichen Einstiegspreis verschoben werden. Für diese Breakeven-Funktion muss ein Stop-Modus aktiviert sein.
Die angezeigte Liquidationslinie ist lediglich eine interne Schätzung auf Basis der simulierten Positions- und Kontowerte. Sie kann deutlich von der tatsächlichen Liquidationsberechnung eines Brokers oder einer Börse abweichen.
Verwendung externer Indikatoren
Anstelle der integrierten Moving-Average-Signale kann eine externe numerische Signalquelle verwendet werden.
Der externe Indikator muss eine auswählbare Plot-Serie mit den folgenden Werten bereitstellen:
* **+1:** Long- beziehungsweise Kaufsignal
* **−1:** Short- beziehungsweise Verkaufssignal
Bei allen anderen Werten oder bei `na` wird kein neues Signal ausgelöst.
Der externe Indikator muss die benötigten Zahlenwerte direkt über einen auswählbaren Plot ausgeben. Dieser Plot kann anschließend unter **External Source** ausgewählt werden.
Wie ein externes Signal während einer bereits geöffneten Position verarbeitet wird, hängt zusätzlich von der gewählten Einstellung unter **Open Position Signals** ab.
Strategia

Pivot Matrix + Zones [AFD]Overview
Pivot Matrix + Zones brings up to three independently configured pivot systems into one coordinated overlay. It combines exact pivot ladders, standard Central Pivot Range (CPR), ATR- or tick-scaled reaction zones, formula-aware cross-pack confluence, retained untested levels, a compact context dashboard, and seven bar-close alert conditions.
Each pack can use a different formula and anchor, allowing combinations such as Daily Traditional, Daily Camarilla, and Weekly Fibonacci to be compared without merging their identities.
The script is designed for descriptive market context. It does not produce trade recommendations, forecasts, performance statistics, or automated orders.
What makes it different
The script's original contribution is its identity-aware coordination of the three packs rather than a simple stack of pivot lines. Each pack has its own formula, anchor, tier ceiling, formula-pivot and CPR visibility, labels, R/S color, and line style. One shared lifecycle model freezes reaction width at origin, carries formula and anchor provenance into retained levels and alerts, and keeps dashboard and drawing state aligned.
Confluence requires overlapping reaction zones from at least two distinct enabled packs. Multiple levels or historical origins from only one pack do not create confluence, and duplicate canonical levels do not inflate the displayed pack count. Exact formula-and-anchor duplicates are marked inactive instead of drawing the same configuration twice.
The implementation and lifecycle logic are original. The named pivot methods use standard published calculations identified below; no third-party indicator source code is reused.
Pivot formulas and anchors
The three packs can use Traditional, Floor Pivots, Fibonacci, Woodie, Classic, DM, Camarilla, Frank Dilernia, Shadow Trader, or ACD Method calculations. Traditional, Fibonacci, Woodie, Classic, DM, and Camarilla use the formulas documented for TradingView Pivot Points Standard. Floor Pivots uses the standard prior-period high, low, and close ladder through R3/S3; those levels match Traditional through the third tier, while Traditional retains its additional R4/R5 extensions.
Available anchors are Auto, Daily, Weekly, Monthly, Quarterly, and Yearly. Auto uses Daily pivots on chart resolutions through 15 minutes, Weekly pivots above 15 minutes and below one day, and Monthly pivots on daily-or-higher charts.
Each formula stops at its documented native tier. The Through Rn/Sn controls do not create unsupported extension levels. Camarilla calculations use the standard R/S equations and display H/L aliases alongside those names.
Data and session handling
Use daily-based values to request anchor data from the selected symbol context. Exchange default, RTH, and ETH choices are available. For futures, ETH uses the exchange-default electronic context, while RTH uses the named subsession entered in the settings. The default futures RTH name is us_regular, but valid names are symbol-specific.
On intraday charts, turning daily-based values off builds anchor values from the chart feed. This may reflect a visible session more closely, but Quarterly or Yearly anchors can have insufficient intraday history. On daily-or-higher charts, the script continues to use daily-based anchor data.
Most formulas use completed prior-anchor values. Woodie also uses the fixed open of the active anchor. The optional developing next CPR uses the active anchor's changing high, low, and close; it is visually separated and never enters confluence, retained history, or alerts.
CPR and reaction zones
CPR always uses the standard floor-pivot calculation from the completed period's high, low, and close. Its chart labels identify the center as PP, the lower Bottom Central boundary as Lower (BC), and the upper Top Central boundary as Upper (TC). This CPR pivot remains separate from a formula pivot when methods such as Woodie or DM produce a different value.
Reaction zones are symmetric bands around exact pivot prices. Their half-width can use confirmed Daily ATR, completed anchor ATR, or a fixed number of minimum ticks. The width is frozen when an anchor's geometry is created, so an existing zone does not drift as ATR changes inside that anchor. The exact pivot remains the center line; the surrounding fill is a configurable context band.
How to read the chart
Exact center lines are the calculated PP, resistance, support, or CPR levels. Soft surrounding fills show the configured interaction distance; they are not additional pivot levels or predictive outputs.
By default, formula PP lines and matching fills are yellow, Pack A R/S lines and fills are blue, and CPR boundaries and the central range are purple. Active labels identify Formula + Level, while CPR labels distinguish PP, Lower (BC), and Upper (TC). Price text is optional and hidden by default.
Confluence and retained levels
When eligible reaction zones from at least two distinct packs overlap, the script merges the overlap transitively into a confluence band. Each label names the unique contributing formulas and then shows the number of distinct packs represented, such as Traditional + Fibonacci x2. Enable confluence is the master control and is on by default. Turning it off removes confluence zones and labels and suppresses Confluence Touch events while the pivot packs, dashboard, retained-level lifecycle, and other alerts continue. When enabled, confluence color, text color, and projection change the display only, not the overlap or alert identity.
At an anchor rollover, eligible pivot zones that were not touched during their active period can be retained as Untested. A later confirmed wick overlap changes the record to TESTED, freezes and fades its drawing for 20 chart bars, and removes it afterward. Retained drawings are off by default, but lifecycle tracking, dashboard counts, confluence eligibility, and fill alerts continue while the drawings are hidden.
Dashboard
The compact dashboard shows only enabled packs with their selected pivot formula and any non-active status. It then classifies the two-period CPR relationship, reports whether the active-anchor open is above, below, or inside CPR, and shows the nearest retained untested level with the live count across all packs. CPR context follows the first enabled pack in A/B/C order.
Display controls
Active geometry can end at a finite current-bar offset, at the anchor end, or extend right. Confluence has its own finite current-bar, finite label-offset, and extend-right choices. Show confluence only hides non-confluence drawings while confluence is enabled; turning the master control off restores the normal layers. Calculations, the dashboard, lifecycle processing, and all enabled alerts continue.
Formula PP, CPR, labels, displayed prices, label size, line width, reaction shading, tier depth, and retained-level styling can be adjusted independently. Formula PP lines and fills default to yellow, Pack A R/S lines and fills default to blue, and CPR boundaries and the central range default to purple. The Inputs tab follows a numbered workflow and dims controls that do not apply without disabling calculations that still use their state. Prices are hidden by default, and chart labels identify formula and level without A/B/C prefixes; dashboard and alert provenance retain pack identity. Duplicate formula-and-anchor pack configurations are rejected rather than drawn twice.
Suggested setup workflow
Configure Pack A as the primary context, then enable Pack B or C when a second formula, anchor, or both are needed for comparison. Choose the highest native R/S tier, session basis, reaction-width method, and projection for the chart being reviewed. Use the dashboard and labels for identity, Show confluence only to isolate cross-pack overlaps, and retained-level drawings when the untested lifecycle should remain visible.
Create alerts only after the symbol, timeframe, sessions, pack settings, and reaction-width inputs are finalized, because those chart settings define the levels and events being monitored.
Alerts
Seven fixed conditions are available: Active Level Touch, Cross Up, Cross Down, CPR Enter, CPR Exit, Untested Level Filled, and Confluence Touch. Events confirm at chart-bar close. Optional dynamic messages aggregate supported events from the same confirmed bar and include available pack, formula, anchor, level, origin, and price context. TradingView running alerts retain the script inputs saved when they were created, so delete and recreate an alert after changing Enable confluence or another input.
Limitations
Pivot values and rollover timing depend on the selected symbol, data feed, anchor, session context, and available history. Daily and intraday feeds can differ because of extended hours, futures settlements, and feed construction. An invalid futures subsession name can fall back to the exchange default, so confirm the requested name in Inputs and compare the resulting pivots with the intended session.
Reaction zones and confluence visualize proximity; they do not predict a response. Untested means the configured zone was not touched during its tracked active period; it does not imply that price must revisit or react to it.
Use a standard time-based chart when evaluating touches, crosses, and alerts because those events use the chart's OHLC bars. Alerts still depend on TradingView alert creation, chart settings, feed updates, and bar-close processing.
The script keeps bounded histories of up to 30 live untested levels and 20 fading tested markers, with older retained records removed as those limits are reached. Confluence display is capped at 20 zones.
This is a public open-source Pine Script v6 indicator with a Mozilla Public License 2.0 source header. TradingView's open-source reuse rules apply on-platform before the license terms. It is an educational charting tool and is not financial advice. Wskaźnik

Market Structure BOS, CHoCH, HH HL LH LL & Trend Health [LunqFX]Market structure is the skeleton of every trend: a series of higher highs and higher lows, or lower highs and lower lows, until a break says the trend has changed. This indicator maps that skeleton automatically — labelling every swing as HH, HL, LH or LL, drawing each Break of Structure (BOS) and Change of Character (CHoCH) — and adds one thing no other structure tool has: it tells you the trend is failing BEFORE the structure actually breaks.
❶ THE STRUCTURE MAP
▸ SWING LABELS — every confirmed swing point is labelled HH (higher high), HL (higher low), LH (lower high) or LL (lower low). The sequence of those four labels IS the trend, and having it on the chart removes the guesswork from reading price action.
▸ BOS — Break of Structure. Price closes through the last swing level in the direction of the trend: the trend is continuing. Drawn as a dashed line from the broken level with a BOS label.
▸ CHoCH — Change of Character. Price closes through the last swing level against the trend: the trend has flipped. Drawn as a solid, highlighted line — this is the reversal signal smart-money traders wait for.
▸ STRUCTURE CANDLES — the candles themselves are coloured by the structural trend, not by whether each bar closed up or down. Green means the market structure is bullish, violet means bearish, so the regime is obvious at a single glance. Their brightness fades as Trend Health falls.
❷ TREND HEALTH 0–100 — THE EARLY WARNING
Every other structure tool tells you a trend has ended after CHoCH prints. By then the move is already gone. Trend Health measures the two things that decay before every structure break:
▸ EXPANSION — in a healthy trend each new extreme clears the previous one by at least as much as the last leg did. When new highs barely exceed the old ones, the trend is running out of fuel.
▸ RETRACEMENT — in a healthy trend pullbacks stay shallow. When each pullback eats deeper into the previous leg, control is shifting to the other side.
Both are measured on the live leg, normalised by ATR so the score behaves the same on any symbol and timeframe, and blended into a single 0–100 reading. When it drops below your threshold the dashboard flags WEAKENING — while the trend is still technically intact. That is the warning CHoCH cannot give you, because CHoCH is confirmation, not anticipation.
❸ THE STRUCTURE TAPE
Instead of a table of numbers, the dashboard shows a timeline of the last five structure events, oldest to newest: BOS ▲ · BOS ▲ · CHoCH ▼ · BOS ▼. Reading the sequence tells you instantly whether the market is trending cleanly (a run of BOS in one direction) or chopping (CHoCH flipping back and forth) — context you cannot get from a single label on the chart.
❹ HOW TO TRADE IT
1 — Establish the bias from MARKET STRUCTURE in the panel. Bullish structure = look for longs, bearish = look for shorts. Do not fight it.
2 — Use BOS as continuation. A BOS in the direction of your bias confirms the trend is intact; the broken level often becomes support or resistance on the retest.
3 — Use CHoCH as the reversal trigger. A CHoCH against the prevailing trend is the earliest confirmed signal that structure has flipped. Wait for it before trading a reversal.
4 — Use TREND HEALTH for timing and risk. Health above 65 with a run of BOS on the tape = a clean trend, hold your position and trail. Health falling into WEAKENING = tighten stops, take partials, and stop adding — the structure is decaying and a CHoCH becomes more likely.
5 — Read the tape for market state. Several BOS in a row = trending market, trade continuations. Alternating CHoCH = choppy market, stand aside or trade the range instead.
❺ HOW IT WORKS
Swing points come from confirmed pivots, so a swing only exists once the bars on both sides of it have closed. The most recent swing high and swing low become the active structure levels. When a bar CLOSES beyond one of them (a wick-based mode is available), the break is registered: in the direction of the current trend it is a BOS, against it a CHoCH, and the trend state flips. Trend Health compares the size of the current expansion leg with the previous one in ATR units, and the depth of the latest pullback against the leg it retraced, then blends them 60/40 into the 0–100 score. Immediately after a CHoCH there is no second leg to compare yet, so the panel honestly reports NEW TREND instead of a misleading health reading.
Works on every symbol and timeframe — forex, gold, indices, crypto and stocks — because every threshold is either structural or ATR-normalised, with nothing to configure per market.
SETTINGS — swing length (how major a swing must be), break on close or wick, the health threshold that flags weakening, swing labels and BOS/CHoCH lines on/off, number of events kept, structure candles on/off, and dashboard position.
ALERTS — BOS up, BOS down, CHoCH up, CHoCH down, and Structure Weakening (the early warning).
NON-REPAINTING — swings are built from confirmed pivots and every break is validated on bar close. A label or line that has printed never moves or disappears.
Every component here describes the same object — the market's structure — at a different resolution: the swings build it, BOS and CHoCH break it, Trend Health measures its condition, and the tape is its history. That is why they belong in one tool rather than five.
This indicator is an educational market-analysis tool, not financial advice. Trend Health describes the current structure's condition and does not predict future prices. Always confirm with your own analysis and manage your risk.
Pre-publish checklist Wskaźnik

Jurik Moving Average Approximation🚀 JURIK MOVING AVERAGE APPROXIMATION (JMA)
The Jurik Moving Average Approximation (JMA) , engineered by gunebak4n , is an advanced, ultra-low lag, adaptive noise-reduction indicator framework designed for TradingView. Built upon the legendary signal-processing principles conceptualized by Mark Jurik (Jurik Research) , this open-source implementation resolves the classical moving average tradeoff between lag and smoothness—delivering crisp, real-time trend tracking without erratic price oscillations or excessive signal delay.
Standard moving averages (such as SMA, EMA, or WMA) suffer from a fundamental lag-vs-noise dilemma: lengthening the period removes noise but introduces severe lag, while shortening the period reduces lag at the expense of excessive whipsaws. JMA overcomes this limitation by utilizing an adaptive, multi-stage recursive filtering process combined with a dynamic phase-adjustment mechanism. The result is an ultra-smooth, responsive curve that reacts instantly to sharp breakouts and price gaps while remaining stable during choppy, sideways consolidation.
💡 CORE DESIGN PRINCIPLES
🧭 Eliminating the Lag vs. Noise Dilemma
Conventional moving averages lag behind sudden market moves—especially during aggressive gaps or volatility expansions. JMA acts as a near-ideal noise filter: it tracks price action with minimal temporal delay while suppressing high-frequency market noise that leads to false signals.
🎛️ Fine-Tuned Phase & Power Control
Unlike standard averages that offer only a period setting, JMA provides modular fine-tuning controls:
• Phase (-100 to +100): Adjusts the balance between lag reduction and overshoot prevention. Positive values accelerate responsiveness for fast-moving markets, while negative values increase smoothness.
• Power: Controls the acceleration exponent of the smoothing curve, allowing traders to customize how aggressively the filter adapts to price velocity.
🌐 Native Multi-Timeframe (MTF) Capability
Equipped with Pine Script v5 multi-timeframe evaluation engines ( timeframe parameter), JMA enables you to seamlessly overlay higher-timeframe trend lines (e.g., Daily or Weekly JMA) onto lower-timeframe execution charts without breaking visual layout or causing repainting.
💡 KEY FEATURES
• Ultra-Low Lag Adaptive Tracking: Captures rapid price breakouts and market gaps instantaneously, giving traders earlier macro directional bias compared to traditional exponential or weighted moving averages.
• Dynamic Trend & Bar Coloring: Includes an optional visual execution engine that dynamically colors both the JMA line and chart price bars based on real-time trend direction (Bullish = Green, Bearish = Red).
• Integrated Alert System: Features pre-configured, non-repainting alertcondition events for bullish and bearish trend flips, enabling instant mobile notifications or webhooks for automated trading workflows.
🔬 MATHEMATICAL ARCHITECTURE
• Beta Coefficient: Beta = (0.45 * (Length - 1)) / (0.45 * (Length - 1) + 2.0)
• Alpha Coefficient: Alpha = Beta ^ Power
• Phase Ratio (PR): Mapped from Phase input (-100 to +100) into range
• Stage 1 (Raw Smoothing): e0 = (1 - Alpha) * Source + Alpha * e0
• Stage 2 (Trend Detrending): e1 = (Source - e0) * (1 - Beta) + Beta * e1
• Stage 3 (Phase-Adjusted Offset): e2 = (e0 + PR * e1 - JMA ) * (1 - Alpha)^2 + Alpha^2 * e2
• JMA_Current = JMA_Previous + e2
🛠️ USAGE FRAMEWORK
1. Trend Bias & Macro Axis
• Green JMA Line / Green Bars: Bullish regime. Focus on long entries, trend continuations, or buying pullbacks toward the JMA line.
• Red JMA Line / Red Bars: Bearish regime. Focus on short entries, trend continuations, or selling relief rallies toward the JMA line.
2. Dynamic Support & Resistance / Trailing Stop
Due to its low-lag and ultra-smooth profile, JMA functions as an exceptional dynamic trailing stop-loss boundary during sustained trend movements, preventing premature exits caused by minor intraday noise.
3. Replacement Proxy for Oscillators
Standard indicators (MACD, RSI, Stochastics) often generate false crossovers when calculated using raw price or EMAs. Passing the smoothed JMA output into these classical formulas yields significantly cleaner, higher-conviction oscillator signals.
⚙️ SYSTEM CHARACTERISTICS
• Zero Repainting: All calculations strictly evaluate on closed historical bar states.
• Fully Parameterized Inputs: Customize source price, length, phase, power, bar coloring, and color themes.
• Asset-Agnostic Engine: Operates with high precision across Equities, Forex, Crypto, Commodities, Futures, and Indices.
• Clean & Modern UI: Designed for high visual clarity on both dark and light chart themes.
📌 CREDIT & ATTRIBUTION
The Jurik Moving Average Approximation script is engineered and published by gunebak4n on TradingView.
This indicator is based on the mathematical concepts of the Jurik Moving Average (JMA) originally conceptualized by Mark Jurik (Jurik Research) .
⚠️ DISCLAIMER
This script is an open-source community implementation and mathematical approximation of the JMA concept. It is not affiliated with, officially supported by, or endorsed by Mark Jurik or Jurik Research. This indicator is a technical analysis visualization tool and does not provide financial advice, automated trading signals, or profit guarantees. Always perform thorough backtesting and practice strict risk management. Wskaźnik

Liquidity Sweep & ATR Envelope⚡ Liquidity Sweep & ATR Envelope
The market hunts stops. This tool shows you where it just happened — and whether price actually rejected the grab or kept right on going. 🎯
Liquidity sweeps caught at volatility extremes, confirmed by a real reclaim, fully resolved on the bar they fire. No repaint. No HTF trickery.
🔍 THE MECHANICS
📐 The envelope — an ATR band around a 20-period basis. It's the visual anchor on the chart AND the qualification threshold at once: the same measurement does both jobs, so there's no separate cosmetic ATR filter bolted on top.
🎯 Pivot + envelope, both required — a signal needs the wick to breach a confirmed pivot level AND clear the band plus a clearance buffer. Levels are one-shot: any wick through a tracked pivot consumes it, signal or not. Re-arms on the next confirmed pivot.
↩️ Reclaim, not just recovery — the close has to snap back past the swept level by at least half the wick's own penetration depth (adjustable, 0 to disable). A candle that barely creeps back over the line doesn't count as a rejection — the snap-back has to beat the sweep.
Levels are one-shot: any wick through a tracked pivot consumes it — signal or not — and the tool re-arms on the next confirmed swing. What you see is exactly what happened.
🛡️ Non-repaint by construction — pivots confirm after their right-side bars, and every signal, marker, zone, and alert is gated to bar close. A triangle that printed yesterday printed on that bar and never moved. What you backtest is what you trade. ✅
🎨 On the chart:
🌊 Hero ATR envelope with event-driven band glow — bands light up when price presses them or on a fresh sweep.
📦 Gradient sweep zones from swept level to wick extreme — historical signals legible at a glance.
👣 Swept-history footprints so you can read where liquidity already got taken.
🎛️ 8 themes (Suite, Ocean, Royal, Ember, Mono, Frost + full Custom), optional bar tint, trigger-threshold line, compact status table.
🔔 Clean JSON alerts (direction / level / trigger) — wire it straight into your automation.
⏱️ Timeframe notes — single-timeframe and scale-free. Every threshold is measured in ATR or as an intra-bar ratio, so it ports across instruments and timeframes with zero rescaling. Defaults are tuned on H1 and carry to M15 unchanged — comparable signal frequency and reclaim quality on both. On H4 and above the setup is rarer by nature; drop Pivot Left/Right to 3 if you want more events there. Read every signal as liquidity-location context, not a standalone entry — pair it with your structure read (or Confluence Context, regime/confluence indicator on my profile) for direction. 🧭
📈 How to use it — the tool tells you where the market just swept liquidity and rejected. Stack it with structure.
Built to one standard: still useful after it's been on your chart for a while. Wskaźnik

Noise Adaptive RSINoise Adaptive RSI | MisinkoMaster
The Noise Adaptive RSI is an advanced momentum oscillator engineered to solve one of the most persistent problems in technical analysis: outlier spikes and market noise corrupting momentum calculations. Traditional RSI algorithms treat every sharp price spike as a genuine surge in strength or weakness. This often leads to false overbought or oversold readings during brief liquidity sweeps or news-driven spikes.
By integrating statistical Z-score thresholding and dynamic noise attenuation, the Noise Adaptive RSI identifies abnormal price spikes in real time and dampens their distortive effects. The result is a clean, highly reliable, and adaptive oscillator line that reflects true structural momentum without the lag or false breakouts caused by erratic market noise.
How It Works (The Core Architecture)
The indicator filters raw price changes through a three-stage statistical filter:
Statistical Outlier Detection: The algorithm evaluates localized price changes over a short correction lookback window, calculating moving standard deviations and tracking how far current price swings deviate from their rolling statistical averages using Z-score metrics.
Dynamic Noise Suppression: When a gain or loss exceeds a specified Z-score threshold (indicating a statistically anomalous spike or noise event), the engine applies a corrective square-root smoothing filter to temper that outlier move before it can distort the underlying indicator state.
Smoothed Relative Strength & Trend Tracking: The sanitized gains and losses are processed through a standard relative strength engine to plot a smooth, adaptive RSI line bounded between 0 and 100. A companion Exponential Moving Average (EMA) acts as an adaptive baseline signal line to confirm structural regime shifts.
Key Features
Outlier-Dampened Momentum: Prevents false momentum breakouts by automatically filtering out brief liquidity sweeps and erratic market spikes.
Dual-Confirmation Signal Line: Incorporates an adjustable signal line alongside the primary RSI curve to confirm trend shifts through signal line crossovers rather than relying solely on raw levels.
On-Chart Candlestick Synchronization: Automatically morphs the main price chart's candle colors (vibrant green for bullish trends, pink for bearish trends) based on oscillator and signal line alignment.
Velocity Divergence Histogram: Features a integrated rate-of-change histogram centered at the 50 level to highlight subtle shifts in momentum speed before they show up in price action.
Input Parameters & Optimization Guide
Source: Selects the price series used for calculations (Default: Close).
Length: The lookback period for the main Relative Strength smoothing engine (Default: 14).
Correction Lookback & Threshold: Controls how aggressively the script identifies and dampens statistical noise spikes. Decreasing the threshold increases noise filtering for erratic markets, while increasing it lets more raw price action through (Default: 8 / 1.5).
Moving Average Length: The lookback window for the EMA signal line, used to confirm momentum direction and filter out chop (Default: 14).
Trading Strategies & Execution
Dual-Confirmation Trend Shifts
Instead of depending on simple 50-level mid-line crosses, the Noise Adaptive RSI combines level positioning with signal line interaction to define high-probability trends:
Bullish Regime: Confirmed when the Noise Adaptive RSI is above 50 AND trading above its EMA signal line (turning chart candles green).
Bearish Regime: Confirmed when the Noise Adaptive RSI is below 50 AND trading below its EMA signal line (turning chart candles pink).
Signal Line Reversals & Pullbacks
In a strong trend, the yellow EMA signal line acts as dynamic support or resistance for the RSI line. During pullbacks, look for the RSI curve to bounce off the EMA line in the direction of the dominant trend for low-risk continuation entries.
Outlier-Filtered Extreme Zones
Because extreme spikes are statistically dampened, readings above 80 (Overbought) or below 20 (Oversold) represent true structural market overextension rather than short-lived liquidity traps, providing dependable signals for mean-reversion setups.
Disclaimer: Trading financial markets involves high risk. This technical script is designed as an informational analytical tool to support your rule-based mechanical execution system and does not constitute financial advice. Wskaźnik

Innovation-Gated Hull Supertrend [BackQuant] Innovation-Gated Hull Supertrend
Overview
Innovation-Gated Hull Supertrend is an adaptive trend-following overlay that combines three distinct signal-processing components:
A Hull Moving Average projection for responsive trend estimation.
An innovation-gated recursive filter for adaptive noise reduction.
A volatility-based Supertrend applied to the filtered Hull estimate.
The indicator is designed to behave differently during quiet and active market conditions.
When the Hull estimate changes only slightly relative to recent volatility, the innovation gate restricts how much of that movement is admitted into the filtered trend estimate. The Supertrend bands can also expand during these quieter conditions, reducing sensitivity to minor fluctuations.
When a larger and statistically more meaningful change occurs, the gate opens. The recursive filter becomes more responsive, the Supertrend bands return closer to their base width, and the model is allowed to react more quickly.
The result is a trend framework that attempts to balance two competing requirements:
Remain stable when price movement is small and noisy.
Respond more quickly when new information produces a meaningful displacement.
The indicator does not predict future prices. It is a causal trend model that adapts its response according to the size of newly arriving information relative to the current volatility environment.
Core calculation chain
The complete calculation can be summarised as:
Calculate a Hull Moving Average projection from the selected price source.
Estimate current volatility using ATR, standard deviation, or a blend of both.
Compare the Hull projection with the recursive filter’s previous estimate.
Normalise that difference by volatility to calculate an innovation score.
Pass the score through a smooth logistic gate.
Use the gate to adapt the recursive filter’s measurement and process uncertainty.
Generate the innovation-filtered Hull estimate.
Optionally adapt the Supertrend band multiplier using the same gate.
Apply Supertrend logic around the filtered Hull estimate.
Generate bullish and bearish regime changes when the Supertrend changes sides.
Each stage solves a different problem.
The Hull projection provides a responsive directional input. The innovation filter decides how much of that input should be trusted. The Supertrend then converts the filtered estimate into a persistent trailing regime.
Historical background
The indicator combines ideas from several areas of technical analysis and signal processing.
Hull Moving Average
The Hull Moving Average was developed by Alan Hull as a method of reducing lag while preserving a smooth output.
Traditional moving averages face a basic trade-off:
Short averages respond quickly but contain more noise.
Long averages are smoother but react later.
The Hull Moving Average attempts to improve this balance by combining weighted moving averages of different lengths.
Its general construction is:
Fast WMA = WMA of price over approximately half the main length.
Slow WMA = WMA of price over the full length.
Raw Hull = 2 × Fast WMA - Slow WMA.
Final Hull = WMA of the Raw Hull over the square root of the main length.
The subtraction stage compensates for some of the delay introduced by the longer average. The final square-root smoothing stage reduces noise in the compensated series.
Recursive estimation and the Kalman-filter principle
The innovation filter is based on the general recursive-estimation framework associated with Kalman filtering.
The Kalman filter was developed by Rudolf E. Kálmán and became widely used in engineering, navigation, aerospace, robotics and control systems.
A recursive estimator typically follows two stages:
Predict the current state from the previous state.
Correct that prediction using the newest observation.
The correction depends on how uncertain the model is and how reliable the new observation is believed to be.
The difference between the observation and prediction is called the:
Innovation
In this indicator:
The observation is the current Hull projection.
The prediction is the previous filtered estimate.
The innovation is the difference between them.
A large innovation means the Hull projection has moved significantly away from the model’s prior estimate.
A small innovation means the new observation is close to what the model already expected.
Supertrend
Supertrend is a volatility-trailing concept built from an underlying price reference and ATR-based bands.
Its basic structure consists of:
An upper band above the reference.
A lower band below the reference.
One-sided trailing behaviour.
A regime switch when price crosses the opposing band.
In a bullish regime, the lower band acts as the active trail.
In a bearish regime, the upper band acts as the active trail.
This indicator modifies the conventional approach in two important ways:
The central reference is the innovation-filtered Hull estimate rather than a normal price midpoint.
The band multiplier can adapt according to the innovation gate.
Stage 1: Hull projection
The first stage calculates the Hull projection from the selected price source.
The script determines:
The full Hull length.
A half-length rounded to a valid integer.
A square-root length rounded to a valid integer.
It then calculates:
Fast WMA = WMA(source, half length)
Slow WMA = WMA(source, full length)
Raw Hull = 2 × Fast WMA - Slow WMA
Hull Projection = WMA(Raw Hull, square-root length)
The Hull projection is more responsive than many conventional moving averages of a similar nominal length.
However, responsiveness also means it can react to short-lived movements. For that reason, the Hull projection is not used directly as the final trend line. It becomes the observation supplied to the innovation filter.
Hull Length
The Hull Length controls the underlying trend horizon.
Lower values:
React more quickly.
Follow shorter trend legs.
Produce more local changes.
Admit more short-term noise into the next stage.
Higher values:
Produce a smoother projection.
Focus on broader trend structure.
Respond later to sudden reversals.
The Hull Length therefore controls the basic timescale of the model before any adaptive filtering or Supertrend logic is applied.
Stage 2: Volatility model
The innovation must be interpreted relative to current market conditions.
A movement of 10 points may be large in a quiet market but insignificant in a highly volatile market.
The indicator therefore normalises the innovation using a selectable volatility estimate.
Three modes are available:
ATR
Standard Deviation
Blend
ATR mode
Average True Range measures recent trading range while accounting for gaps from the previous close.
True Range is based on the greatest of:
Current high minus current low.
Absolute current high minus previous close.
Absolute current low minus previous close.
ATR then smooths True Range across the selected Volatility Length.
ATR is useful because it measures the realised movement range of the instrument.
It is sensitive to:
Wide candles.
Price gaps.
Range expansion.
Standard Deviation mode
Standard deviation measures how widely the Hull projection has varied around its recent mean.
It is a dispersion measure rather than a range measure.
Standard deviation responds to:
Variation in the selected series.
Directional displacement.
Changes in the distribution of the filtered input.
While ATR focuses on bar range, standard deviation focuses on dispersion of the Hull series itself.
Blend mode
Blend mode calculates the average of ATR and standard deviation.
Conceptually:
Blended Volatility = (ATR + Standard Deviation) / 2
This provides a combined estimate incorporating:
Observed range behaviour.
Statistical dispersion of the Hull projection.
Neither measure is universally superior. The blend attempts to reduce dependence on only one definition of volatility.
Volatility Length
The Volatility Length controls how quickly the normalisation baseline changes.
Lower values:
React faster to recent volatility changes.
Cause the innovation score to adjust more quickly.
May make the gate less stable.
Higher values:
Produce a slower volatility baseline.
Create more consistent normalisation.
May respond later when volatility changes abruptly.
The volatility estimate is prevented from falling below the instrument’s minimum tick size, avoiding unstable division during extremely quiet periods.
Stage 3: Innovation calculation
The filter begins each bar with a prediction.
In this implementation, the prediction is the previous filtered estimate.
The innovation is:
Innovation = Hull Projection - Previous Filter Estimate
The innovation may be positive or negative.
A positive value means the Hull projection is above the prior estimate.
A negative value means it is below the prior estimate.
The absolute innovation measures the size of the disagreement regardless of direction.
Innovation score
The raw innovation is normalised by current volatility:
Innovation Score = |Innovation| / Volatility
This expresses the new movement in volatility units.
For example:
A score of 0.25 means the innovation is approximately one quarter of the selected volatility measure.
A score of 1.00 means it is approximately equal to that volatility measure.
A score above 1.00 means the change is larger than the current volatility baseline.
The score is dimensionless, making it more comparable across instruments and price scales.
This is the key quantity used to determine whether the filter should remain cautious or become more responsive.
Stage 4: Logistic innovation gate
The innovation score is passed through a logistic function.
The logistic function has the form:
Gate = 1 / (1 + exp(-x))
Its output remains between zero and one.
In the indicator, the gate input depends on:
Innovation Score
Innovation Threshold
Gate Sharpness
Conceptually:
Gate Input = Sharpness × (Score - Threshold)
When the score is below the threshold:
The gate approaches zero.
The filter treats the new Hull movement cautiously.
When the score rises above the threshold:
The gate moves toward one.
The filter becomes more willing to admit the new movement.
The logistic function creates a smooth transition rather than a hard on/off switch.
This is important because a binary threshold could cause abrupt changes whenever the score moves slightly above or below one exact value.
Innovation Threshold
The Innovation Threshold determines where the gate begins moving from a quiet state toward an active state.
Higher values:
Require a larger volatility-normalised innovation.
Keep the filter conservative for longer.
Reject more moderate changes.
Lower values:
Open the gate sooner.
Increase responsiveness.
Allow smaller movements to influence the estimate.
The threshold should be interpreted in relation to the selected volatility model.
Gate Sharpness
Gate Sharpness controls how rapidly the logistic gate transitions around the threshold.
Lower sharpness:
Creates a gradual transition.
Produces a wider intermediate region.
Changes responsiveness smoothly.
Higher sharpness:
Makes the gate behave more like a hard switch.
Creates a faster transition near the threshold.
Produces stronger separation between quiet and active states.
An extremely high value can make the adaptive behaviour abrupt, while a low value may reduce the distinction between quiet and active conditions.
Admission Floor
The gate is converted into an admission value.
The Admission Floor ensures that the filter never completely ignores the Hull projection.
The admission calculation is:
Admission = Floor + (1 - Floor) × Gate
When the gate is near zero:
Admission remains near the selected floor.
When the gate is near one:
Admission approaches one.
A lower floor creates stronger filtering during quiet conditions.
A higher floor keeps the model more responsive even when innovation is small.
This setting prevents the estimator from becoming fully frozen.
Stage 5: Adaptive recursive update
The admission and gate values modify two uncertainty terms:
Measurement noise.
Process noise.
These terms control how the recursive filter balances its existing estimate against the new Hull observation.
Measurement Noise
Measurement Noise represents uncertainty in the incoming Hull projection.
Higher measurement noise tells the filter:
Trust the new observation less.
Remain closer to the previous estimate.
Produce more smoothing.
Lower measurement noise tells the filter:
Trust the Hull projection more.
Correct the estimate more aggressively.
Become more responsive.
The script adapts measurement noise using the admission value:
Adaptive Measurement Noise = Base Measurement Noise / Admission
When admission is low:
Measurement noise increases.
The new Hull movement receives less weight.
When admission is high:
Measurement noise moves closer to its base value.
The filter becomes more receptive.
Process Noise
Process Noise represents uncertainty in the filter’s current state model.
Higher process noise tells the estimator:
The underlying trend may be changing.
The previous estimate may no longer be reliable.
Allow faster adaptation.
Lower process noise tells it:
Assume the existing state remains relatively stable.
Change the estimate more cautiously.
The script increases process noise as the gate opens:
Adaptive Process Noise = Base Process Noise × (1 + Process Boost × Gate)
This creates a two-sided adaptive response.
During quiet conditions:
Measurement noise increases.
Process noise remains closer to its base level.
The filter resists small changes.
During high-innovation conditions:
Measurement noise decreases toward its normal value.
Process noise increases.
The filter becomes substantially more responsive.
Process Boost
Process Boost controls how strongly the process uncertainty expands when the gate opens.
Higher values:
Allow faster response to large innovations.
Increase the filter gain during active movement.
Can make the model more sensitive after shocks.
Lower values:
Keep behaviour closer to the base recursive filter.
Produce more controlled adaptation.
May respond more slowly to genuine regime changes.
Covariance and filter gain
The recursive filter maintains an internal covariance representing uncertainty in its estimate.
Before the new observation is processed:
Predicted Covariance = Previous Covariance + Adaptive Process Noise
The filter gain is then:
Gain = Predicted Covariance / (Predicted Covariance + Adaptive Measurement Noise)
The gain remains between zero and one.
A low gain means:
The previous estimate receives more influence.
The Hull observation receives less influence.
A high gain means:
The filter moves more strongly toward the current Hull projection.
The new estimate is:
Filtered Hull = Prediction + Gain × Innovation
The covariance is then updated for the next bar.
Why the filter is innovation-gated
A normal recursive filter may use constant process and measurement noise settings.
That means its responsiveness is broadly fixed.
This indicator changes those terms according to the size of the innovation.
The model therefore behaves differently under two broad conditions.
Quiet condition
When the Hull projection remains close to the prior estimate relative to volatility:
Innovation score is low.
Gate remains mostly closed.
Admission is limited.
Adaptive measurement noise rises.
Process noise remains lower.
Filter gain falls.
The filtered Hull changes more slowly.
Active condition
When the Hull projection moves meaningfully away from the prior estimate:
Innovation score rises.
Gate opens.
Admission approaches one.
Measurement noise decreases.
Process noise increases.
Filter gain rises.
The estimate adapts more quickly.
This allows the model to filter small movement without applying the same degree of resistance to every large move.
Stage 6: Innovation-adaptive Supertrend bands
The filtered Hull becomes the centre of the Supertrend calculation.
The initial raw bands are:
Upper Band = Filtered Hull + Factor × ATR
Lower Band = Filtered Hull - Factor × ATR
The Supertrend uses its own ATR Period, which is independent of the volatility length used by the innovation score.
This distinction is important:
Innovation volatility determines whether the filter should admit new information.
Supertrend ATR determines the distance of the trailing regime bands.
Adaptive band factor
When Adapt Bands With Innovation is enabled, the Supertrend factor changes according to the gate.
The adaptive factor is:
Adaptive Factor = Base Factor ×
When the gate is near one:
The adaptive factor approaches the base factor.
Bands become relatively tighter.
The Supertrend can respond more readily.
When the gate is near zero:
The factor expands above its base value.
Bands become wider.
Minor price fluctuations are less likely to cause a reversal.
This creates coordinated adaptation:
Quiet conditions produce stronger filtering and wider bands.
Active conditions produce faster filtering and narrower bands.
The same innovation state therefore influences both the centre estimate and the trailing threshold.
Quiet Band Expansion
Quiet Band Expansion controls how much wider the Supertrend factor becomes when the innovation gate is closed.
A value of zero disables the expansion effect even if band adaptation is enabled.
Higher values:
Create wider bands during low-innovation conditions.
Reduce quiet-market reversals.
Delay new signals until price moves further.
Lower values:
Keep the adaptive factor closer to its base setting.
Allow more responsive regime changes.
The expansion is greatest when the gate is near zero and fades as the gate opens.
Supertrend trailing logic
The raw upper and lower bands are converted into one-sided trailing bands.
The lower band is prevented from moving downward while price remains above its previous value.
The upper band is prevented from moving upward while price remains below its previous value.
This ratcheting behaviour creates:
A rising lower trail during bullish conditions.
A falling upper trail during bearish conditions.
A trend change occurs when price crosses the active opposing boundary.
In a bullish regime:
The lower band is the active Supertrend.
In a bearish regime:
The upper band is the active Supertrend.
ATR Period and Factor
ATR Period
Controls the volatility horizon used to construct the Supertrend bands.
Lower values:
React faster to current range changes.
Produce more variable band widths.
Higher values:
Produce a steadier range estimate.
Respond more slowly to sudden volatility changes.
Factor
Controls the base distance between the filtered Hull and the Supertrend bands.
Lower factors:
Create tighter bands.
Produce earlier regime changes.
Increase sensitivity to noise.
Higher factors:
Create wider bands.
Produce fewer regime changes.
Increase confirmation delay.
When adaptation is enabled, the selected factor acts as the minimum or active-condition factor. Quiet conditions may expand it further.
Trend signals
The indicator generates a long signal when the Supertrend changes into its bullish state.
It generates a short signal when the Supertrend changes into its bearish state.
The signal requires the completed calculation chain:
Hull projection.
Innovation filtering.
Adaptive band factor.
Supertrend regime change.
The plotted symbols are:
𝕃 for a bullish transition.
𝕊 for a bearish transition.
These markers identify regime changes. They are not complete trading systems and do not define stop placement, position size or profit targets.
Innovation impulse alert
The script also includes an Innovation Impulse alert.
This occurs when the innovation score crosses above the selected Innovation Threshold.
It indicates that:
The difference between the Hull projection and the recursive estimate has become large relative to volatility.
The gate is entering a more active state.
The filter is beginning to admit new information more aggressively.
An innovation impulse does not necessarily produce an immediate Supertrend reversal.
It can occur:
During acceleration within an existing trend.
At the beginning of a possible regime change.
During a temporary volatility shock.
It is therefore best interpreted as an information-arrival event rather than an automatic long or short signal.
Visual components
Hull Projection
Displays the unfiltered Hull Moving Average input.
This is useful for comparing:
The responsive raw projection.
The innovation-filtered result.
The final Supertrend.
The Hull projection will generally react first.
Filtered Hull
Displays the recursive innovation-gated estimate.
The distance between the Hull projection and filtered Hull helps illustrate the filter’s current behaviour.
During quiet conditions:
The filtered Hull may lag behind small changes.
During meaningful innovations:
It can move more rapidly toward the Hull projection.
IGH Supertrend
Displays the final volatility trail around the filtered Hull.
It is the primary regime output.
The line is coloured according to the persistent bullish or bearish trend state.
Candle colouring
Candles may be coloured according to the active Supertrend regime:
Bullish colour during the long regime.
Bearish colour during the short regime.
This provides immediate chart-wide directional context.
How to interpret the indicator
Bullish regime
A bullish regime indicates that price has crossed into the bullish side of the adaptive Supertrend structure.
The active trail is positioned below the market and can be interpreted as:
A dynamic trend boundary.
A possible pullback reference.
A regime invalidation guide.
Bearish regime
A bearish regime indicates that price has crossed into the bearish side of the adaptive structure.
The active trail is positioned above the market and may act as:
Dynamic resistance.
A rally reference.
A bearish regime invalidation guide.
Low innovation score
A low score means the current Hull movement is small relative to volatility.
The model responds by:
Filtering more strongly.
Reducing admission.
Using a lower recursive gain.
Potentially expanding the Supertrend bands.
This is intended to reduce reactions to small fluctuations.
High innovation score
A high score means the Hull projection has changed substantially relative to volatility.
The model responds by:
Opening the gate.
Increasing admission.
Increasing process uncertainty.
Raising the filter gain.
Reducing quiet-condition band expansion.
This allows a faster response when the incoming information is more significant.
Rising Hull without a trend flip
The Hull projection may turn before the filtered Hull or Supertrend.
This means:
The fast input has changed.
The adaptive filter has not yet admitted enough of that change.
The Supertrend boundary has not yet been crossed.
This is not an error. It demonstrates the staged confirmation design.
Innovation impulse without trend reversal
An innovation impulse can occur without a long or short signal.
This may indicate:
Acceleration in the existing trend.
A volatility shock.
An attempted reversal that has not crossed the Supertrend.
The Supertrend remains the final regime layer.
How to use the indicator
1. Trend regime filter
Use the active Supertrend state to filter another entry method:
Prioritise long setups during bullish regimes.
Prioritise short setups during bearish regimes.
2. Pullback framework
In a bullish regime, pullbacks toward the Supertrend may represent tests of the active trend boundary.
In a bearish regime, rallies toward the Supertrend may represent resistance tests.
A touch alone does not guarantee continuation.
3. Innovation monitoring
The innovation alert can be used to identify when the model detects a meaningful change in its input.
This may help direct attention to:
Fresh acceleration.
Breakout attempts.
Possible trend transitions.
4. Confirmation framework
The three optional lines can be read as a progression:
Hull projection changes first.
Filtered Hull adapts according to innovation.
Supertrend confirms the final regime.
This allows users to study the difference between early movement and confirmed structure.
5. Trailing risk reference
The final Supertrend may be used as a visual trailing reference.
However, it does not account for:
Account size.
Position size.
Slippage.
Liquidity.
Maximum acceptable loss.
It should not replace a complete risk-management process.
Parameter interaction
The settings should not be tuned independently without considering how they interact.
More responsive configuration
A more responsive setup may use:
Lower Hull Length.
Lower Innovation Threshold.
Higher Admission Floor.
Lower Measurement Noise.
Higher Process Noise or Process Boost.
Lower Supertrend Factor.
Lower Quiet Band Expansion.
This will generally produce earlier changes but more noise.
More conservative configuration
A more conservative setup may use:
Higher Hull Length.
Higher Innovation Threshold.
Lower Admission Floor.
Higher Measurement Noise.
Lower Process Boost.
Higher Supertrend Factor.
Higher Quiet Band Expansion.
This will generally create fewer transitions but greater delay.
Balanced interpretation
Changing several settings in the same direction can produce an extreme result.
For example:
A very low threshold, high admission floor, large process boost and tight Supertrend factor may overreact.
A very high threshold, low admission floor, high measurement noise and wide Supertrend factor may respond excessively slowly.
The appropriate balance depends on the instrument, timeframe and intended holding period.
How this differs from a standard Hull trend indicator
A standard Hull trend indicator normally uses:
Hull slope.
Price crossing the Hull.
A fast and slow Hull comparison.
This indicator instead:
Uses the Hull as an observation.
Measures its disagreement with a recursive estimate.
Normalises that disagreement by volatility.
Adapts the filter gain according to the innovation.
Applies a final Supertrend regime around the filtered result.
The Hull is therefore the beginning of the model, not the final signal.
How this differs from a fixed Kalman-style filter
A fixed recursive filter uses constant uncertainty settings.
Innovation-Gated Hull Supertrend adapts both measurement and process uncertainty according to the normalised innovation.
This means:
Small innovations are filtered more heavily.
Large innovations receive greater admission.
The response speed is therefore state dependent.
How this differs from a standard Supertrend
A standard Supertrend is commonly centred around a raw price reference such as HL2.
This indicator uses:
A responsive Hull projection.
An innovation-gated recursive estimate of that projection.
An optionally adaptive band multiplier.
The Supertrend is therefore built around a filtered trend estimate rather than raw price alone.
Strengths
Combines responsive and stable trend-processing stages.
Normalises new movement by current volatility.
Uses a smooth gate rather than a binary threshold.
Adapts measurement and process uncertainty.
Can widen trend bands during quiet conditions.
Can respond more rapidly to meaningful innovations.
Separates early movement from final regime confirmation.
Supports ATR, standard deviation and blended volatility models.
Provides trend, impulse and visual comparison outputs.
Limitations
The indicator is reactive rather than predictive.
Strong filtering can delay genuine reversals.
Responsive settings can increase whipsaws.
A large innovation may represent a temporary shock rather than a lasting trend.
Supertrend signals still depend on ATR and price crossing behaviour.
Parameter combinations can materially change the model’s behaviour.
The indicator may require different settings across assets and timeframes.
The recursive state develops from the available chart history.
Values can update while the current real-time candle is still forming.
Causality and real-time behaviour
The calculation uses current and historical observations without future-looking references.
However, like most indicators calculated on live candles, the current bar’s values can change before the candle closes.
This means:
The Hull projection may move intrabar.
The innovation score and gate may change intrabar.
A Supertrend transition may appear and disappear before confirmation.
Users requiring confirmed signals should evaluate the indicator at bar close or configure alerts accordingly.
Alerts
The indicator provides three alert conditions:
IGH ST Long: the adaptive Supertrend changes into a bullish regime.
IGH ST Short: the adaptive Supertrend changes into a bearish regime.
IGH Impulse: the normalised innovation score crosses above the selected threshold.
The impulse alert identifies increased information flow into the filter. It does not specify direction by itself because the innovation score uses the absolute size of the prediction error.
Summary
Innovation-Gated Hull Supertrend combines a responsive Hull Moving Average, a volatility-normalised innovation gate, an adaptive recursive filter and a volatility-trailing Supertrend.
The Hull projection provides an early estimate of directional movement. The recursive filter compares that projection with its prior state and measures the resulting innovation relative to ATR, standard deviation or a blend of both.
A logistic gate then determines how strongly the new movement should be admitted. During quiet conditions, the filter becomes more conservative and the Supertrend bands can expand. During meaningful displacement, the filter becomes more responsive and the bands move closer to their base width.
The final Supertrend converts the adaptive estimate into a persistent bullish or bearish regime.
The indicator is designed to make responsiveness conditional rather than fixed: small movements receive stronger filtering, while larger volatility-adjusted innovations are allowed to influence the model more quickly.
Wskaźnik

ATK/DEF MOM Momentum Motor AnalysisATK/DEF MOM Momentum Motor Analysis
ATK/DEF MOM Momentum Motor Analysis is a swing structure evaluation framework that combines momentum measurement with a multi-layer motor analysis model to examine the internal strength, speed, and condition of price movement around swing h and swing l.
Unlike traditional swing point indicators that only mark histo high and low locations, this indicator focuses on evaluating the momentum characteristics behind each detec swing structure.
The purpose of this framework is to analyze how momentum behaves around important price points by using momentum acceleration, velocity, strength, balance, and radar-based measurements to provide a deeper view of swing point conditions.
The system combines Swing H / Swing L detec with a Momentum Motor framework, creating a multi-dimel evaluation environment for stu histori price behavior.
Momentum Motor Framework
The Momentum Motor system is built around multiple momentum-based calcu designed to measure different characteristics of price movement.
The framework evaluates:
• Momentum direction
• Momentum strength
• Momentum acceleration
• Momentum speed
• Momentum stage condition
• Momentum balance
• Momentum activity intensity
These measurements are combined into a structured analysis model to describe the current state of momentum behavior.
The Motor concept represents the continuous evaluation process of momentum conditions, similar to monitoring the operating condition of a system by observing speed, power, and performance characteristics.
1. Momentum Engine Analysis
The Momentum Engine evaluates the relationship between basic momentum and momentum acceleration.
This module analyzes whether momentum activity is increasing, decreasing, or maintaining its current condition by examining:
• Momentum value changes
• Acceleration characteristics
• Momentum smoothing behavior
• Engine state variation
The purpose of this component is to describe the internal momentum condition beh price movement rather than simply measuring price direction.
2. Momentum Speed Rating Motor
The Speed Rating Motor evaluates the velocity of momentum changes.
This module measures how quickly momentum conditions are changing compared with recent momentum activity.
The evaluation includes:
• Momentum velocity
• Speed intensity
• Relative momentum acceleration
• Current activity level comparison
The rating framework categorizes momentum speed conditions into different grades to represent changes in market activity intensity.
This allo uss to stu whether a swing point developed during a high-activity momentum environment or a slower momentum condition.
3. Momentum Power Motor
The Power Motor evaluates the strength characteristics of positive and negative momentum.
This component analyzes:
• Momentum expansion
• Momentum weakening conditions
• Acceleration support
• Momentum pressure difference
The purpose is to provide additional context regarding the strength behind a swing h or swing l.
It does not classify future outcomes. Instead, it displays calculated momentum characteristics based on histori price da.
4. Momentum Market Stage Analysis
The Market Stage module evaluates momentum development conditions through the relationship between momentum values, smoothing measurements, and momentum changes.
The framework identifies different momentum states such as:
• Early momentum development
• Middle momentum expansion
• Late momentum condition
• Neutral / range condition
This provides a structural view of where momentum activity is currently positioned within the analyzed period.
5. Momentum Radar Evaluation
The Momentum Radar combines multiple momentum measurements into a unif analytical score.
The radar calculation considers:
• Momentum magnitude
• Momentum acceleration
• Momentum relationship with average momentum
• Momentum speed
The radar value represents the combined strength of measured momentum characteristics.
It is designed as a reference measurement for stu momentum conditions ac different swing structures.
6. Momentum Balance Analysis
The Balance Ind evaluates the relative relationship between positive and negative momentum forces.
This module studies:
• Bull momentum contribution
• Bear momentum contribution
• Momentum imbalance level
• Dominant momentum condition
The objective is to visualize the balan state of momentum activity rather than provide directional instru.
Swing High / Low Momentum Evaluation
Each detected Swing H and Swing L point is analyzed through the Momentum Motor framework.
Instead of treating all swing points equa, the indicator attaches momentum information to each structural point, including:
• Momentum speed rating
• Momentum power condition
• Momentum stage
• Motor operating status
This creates a momentum profile for histor swing structures.
A swing h or swing l is therefore viewed not only as a pric location, but also as a point containing momentum behavior information.
Key Features
• Swing High / Swing Low structural identification
• Momentum-based swing point evaluation
• Multi-layer Momentum Motor framework
• Momentum acceleration analysis
• Momentum speed rating system
• Momentum power evaluation
• Market stage analysis
• Momentum radar calculation
• Momentum balance measurement
• Analytical dashboard display
• Historical momentum condition labeling
Methodology
ATK/DEF MOM Momentum Motor Analysis combines swing structure analysis with quantitative momentum measurements to stu the relationship between pric movement and momentum behavior.
The framework focuses on analyzing the characteristics of momentum around histor price structures rather than relying on simple high/low marking.
All calcula are derived from histor price data and momentum measurements.
The displayed information is intended for technical analysis, market resear, and stu momentum behavior.
This indicator does not provide tra instruct, entry recommen, or guaran market outcs. Wskaźnik

Trend State Signals Trend State Signals is an adaptive trend-state indicator designed to identify changes in market direction while filtering out insignificant price fluctuations.
Instead of reacting to every short-term price movement, the indicator updates its state only when price travels far enough to exceed a dynamically calculated movement threshold.
The result is a step-like trend line that remains stable during periods of market noise and changes direction only after a meaningful price movement has occurred.
Unlike many traditional trend-following indicators that continuously track price, Trend State Signals intentionally ignores minor fluctuations, providing a cleaner and more objective view of whether the market is currently in a bullish or bearish state.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ How It Works
The indicator estimates the current level of market activity by measuring the average absolute price movement over a user-defined lookback period.
Unlike many similar indicators, ATR is not used. Instead, the calculation follows these steps:
✔️ The absolute price change is calculated for every bar.
✔️ These values are smoothed using a Running Moving Average (RMA).
✔️ The smoothed result becomes a dynamic estimate of current market volatility.
✔️ This value is multiplied by the Range Multiplier, defining the minimum distance price must travel before the filter is allowed to update.
This adaptive threshold determines how far price must move before the internal filter changes its position.
If price remains inside the calculated range, the filter stays unchanged.
Once price exceeds that range, the filter shifts toward price while maintaining the adaptive distance.
Because the filter only updates after meaningful price expansion, the indicator naturally filters out a large amount of random market noise and significantly reduces unnecessary trend changes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Trend State Detection
The market state is determined solely by the direction of the adaptive filter.
🟢 Filter moving upward → Bullish
🔴 Filter moving downward → Bearish
⚪ Filter unchanged → Previous market state is maintained
Signals are generated only when the filter changes direction.
Rather than producing continuous buy or sell signals on every candle, the indicator highlights transitions between bullish and bearish market environments.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Signal Confirmation
The indicator includes an optional signal confirmation mode.
When Confirm Signals On Bar Close is enabled, a new trend state is confirmed only after the current candle has closed.
When disabled, trend changes can appear immediately while the current bar is still forming.
This allows traders to choose between earlier signals or additional confirmation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎛 Settings
Sensitivity Length
Defines the lookback period used to calculate the average market movement.
• Lower values make the indicator more responsive.
• Higher values produce a smoother adaptive filter.
Range Multiplier
Controls how much price movement is required before the filter changes its state.
Higher values
✔️ Fewer trend changes
✔️ Stronger noise filtering
✔️ Smoother trend line
Lower values
✔️ Earlier reactions
✔️ More frequent state changes
✔️ Higher sensitivity
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 Visual Features
The indicator includes several independent visualization options, each of which can be enabled or disabled separately.
✔️ Adaptive Trend Line
✔️ Glow Effect
✔️ Gradient Ribbon Between Price and Filter
✔️ Bullish / Bearish Transition Labels
✔️ Optional Candle Coloring
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alerts
Two alert conditions are available.
🟢 Bullish Trend State
🔴 Bearish Trend State
Alerts are triggered only when a new trend state is confirmed according to the selected confirmation mode.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 Typical Use
Trend State Signals is primarily designed as a market state filter rather than a complete trading system.
It can be used to:
✔️ Identify the dominant market direction
✔️ Filter signals generated by other trading strategies
✔️ Trade only in the direction of the prevailing trend
✔️ Reduce trades caused by short-term market noise
Like any trend-following methodology, the indicator confirms trend changes only after the market has moved a sufficient distance. As a result, signals may appear after the initial turning point. This is an intentional design choice that helps reduce the impact of random price fluctuations while improving trend stability. Wskaźnik

Smart Money Volume Absorption Signals I EonMetricsSmart Money Volume Absorption Signals
Volume Absorption marks a specific situation as a LONG or SHORT setup, with an entry, a stop and two targets. But instead of only printing an arrow and leaving you to reconstruct what happened, it tracks that setup through four stages and shows you exactly how far along it is — how many conditions are met, which one is still missing, how many bars are left before the setup is discarded, and what the same sequence has already done on the history your chart has loaded.
🔶 THE SITUATION IT TRACKS
A bar trades far more volume than its own recent normal, and then closes at the wrong end of its own range. Heavy participation that failed to pay the side that pushed: effort without result. The direction is set against the side that was absorbed — a heavy bar closing in the bottom third of its range is a short premise, one closing in the top third is a long premise.
One thing has to be said plainly, because it decides how much weight this premise deserves: total volume cannot tell you who traded. It cannot separate buyers from sellers. What this gate actually measures is heavy participation combined with a failure to hold the direction the bar travelled. The absorption reading is an interpretation of that pattern, not a measurement of order flow. If you want that distinction to matter less, the remaining three gates are where the work is done.
Absorption on its own happens constantly and most of it leads nowhere. So the tool requires three further confirmations, in order, before it marks anything.
🔶 THE FOUR GATES
G1 · ABSORPTION — bar volume lands in an extreme percentile of its own recent history while the bar closes in the far third of its own range. This gate fixes the direction and nothing later can change it. It also plants the invalidation anchor at that bar's extreme. Optionally the direction must agree with a slow trend filter.
G2 · REACTION — a following bar closes in the direction G1 set. The absorption produced something instead of merely stalling.
G3 · EXPANSION — a candle body in the top percentile of its own recent history, pointing the setup's way. That candle's OPEN becomes the origin level, and the origin level is where entry would be.
G4 · HOLD — price returns to the origin level and closes without violating it. Only now does the signal print, on bar close.
This is a retest model, not a breakout model, and the consequence is worth stating before you use it. A setup whose expansion runs away and never comes back to the origin level will never complete, no matter how far the move goes. You will see setups sit at 3/4 while price travels past the drawn targets, and then expire. That is the design working as intended — the entry is the retest — but if you want a tool that chases the move instead, this is not that tool.
The dashboard reads: which stage the setup is in, the direction, which gate is being waited on, the expiry countdown, the entry and stop levels, and the record of every completed setup on the loaded history.
🔶 ORIGINALITY
Five design decisions separate this from a stack of conditions with an AND between them.
Percentiles instead of ATR multiples. A fixed "1.5 × ATR" or "2 × average volume" threshold means something different in a trending market than in a compressed one, so it has to be re-tuned per symbol and per period. Every threshold here is a percentile rank against the instrument's own recent history — "top 30% of the last 200 bars" keeps its meaning when volatility changes, without tuning.
Gates do not add up to a score. Each gate is a separate class of evidence and none substitutes for another. Three expansion bars in a row are still 1/4, not 3/4. A weighted-sum model can be outvoted by one loud condition repeating itself; this one cannot. There is deliberately no confidence percentage anywhere in this script — with four binary gates in a fixed sequence, the only honest information is how many of them have filled, and dressing that up as a percentage would add precision that does not exist.
The setup dies on its own. Every tracked setup carries an invalidation anchor (a close beyond the absorption bar's extreme) and a bar countdown that resets at each gate advance. When either fires, the setup is discarded immediately — it does not linger until an opposite signal replaces it, and it does not quietly stay on the books.
One setup at a time. While a completed setup is still resolving toward its target or its stop, a new setup will not complete — it waits at 3/4 and may still fire later if the first one resolves in time, or expire if it does not. This exists so that what the dashboard counts is what a person following the tool could actually have taken, one position at a time, rather than an overlapping stack of positions nobody could hold.
It shows its own record. The last two rows of the dashboard walk every completed setup on the chart you are looking at, bar by bar, and count which level price reached first — Target 1 or the stop. The stop is checked before the target, so a bar that spans both counts against the setup, and the bar the signal prints on is not counted at all. That number is whatever it is. It is not a claim, it is not tuned to flatter, and it will read differently on every symbol and timeframe you load — which is exactly the point. You are meant to check it on YOUR instrument before deciding what the tool is worth to you, instead of taking anyone's word for it. Most signal tools do not show this. That is a choice they made, and this is a different one.
🔶 HOW IT IS CALCULATED
Both percentile ranks are ta.percentrank() over one configurable window — one on bar volume (G1), one on the absolute candle body (G3). The close position is (close − low) / (high − low), so it describes where the bar finished inside its own range rather than relative to any external level.
The optional trend filter is a plain exponential moving average of the closing price on the chart's own timeframe, used as a slow-trend proxy: long setups are only allowed above it, short setups only below it. Set its length to 0 to switch it off. There are no higher-timeframe data requests anywhere in this script.
Entry is the open of the expansion bar. The stop is the absorption bar's extreme, plus an optional buffer in ticks. Both targets are multiples of that entry-to-stop distance, so they scale with the setup instead of with a fixed price amount. Target 1 is the level the record row measures against; Target 2 is drawn for reference only.
Every gate is evaluated and latched on confirmed bars only. There is no lookahead and there are no forward-looking references. A filled gate is never un-filled retroactively; the live bar can only be rejected, never rewritten. A bar that would satisfy two gates at once advances the setup by exactly one step — each gate has to be paid for with its own bar.
The chart geometry is redrawn from scratch on the last bar rather than accumulated, so what you see on the chart is always the setup the dashboard is describing, and closed setups do not leave debris behind.
🔶 ALERTS
Six conditions: setup reached 2/4, setup reached 3/4, signal LONG, signal SHORT, setup expired, setup invalidated.
The staged alerts follow from the same idea as the meter: being told a setup is one gate away is more useful than only being told after it is over.
🔶 HOW TO USE
1. Read the record row before anything else. Load your instrument and your timeframe and see what it says there. If it does not convince you, that is the tool telling you honestly that it is not for that market.
2. Check the sample size in the same row. A run of ten or twenty setups is an anecdote. The row flags small samples for exactly this reason.
3. Watch the meter, not the arrows. Most of the information is in setups that reach 2/4 or 3/4 and then die — that tells you what the market is refusing to do.
4. The stop sits at the absorption bar's extreme by default, which is tight. On fast intraday charts try the Stop Buffer input and watch how the record row responds.
5. The trend filter changes the population of setups substantially. Check the record row with it on and with it off on your own market before deciding which you prefer.
6. Set the 3/4 alert if you want to be at the chart before a setup completes rather than after.
🔶 SETTINGS
Volume (percentile window) · Gate Thresholds (G1 volume percentile, G1 close position, G3 body percentile, trend filter length, setup TTL) · Trade Levels (draw toggle, stop buffer in ticks, two R-multiple targets) · Display (dashboard and position, current-signal marker, all-past-signals marker, colors).
🔶 HONEST LIMITATIONS
Volume alone cannot be attributed to buyers or sellers. This tool reads total bar volume against the bar's close position. It does not know who traded, and it is not order-flow data. Treat the absorption premise as a reading of effort against result, which is what it is.
The volume itself is only as good as the feed. On spot forex and CFDs the exchange reports TICK volume rather than real traded volume, so the percentile ranks describe activity rather than quantity. On symbols with no volume data at all the gates cannot fill, and the dashboard says so in its top-right corner.
The retest requirement will cost you moves. As described above, setups that never return to the origin level expire unfilled even when price travels well beyond the drawn targets. This is structural, not a bug, and on strongly trending stretches it happens often.
Percentiles are relative to their window. After an abrupt change of volatility regime the ranks need a few dozen bars to catch up, and during that stretch the thresholds are still measuring the old regime.
The record row is an honest count, not a backtest. It assumes a fill at the exact entry price and it ignores fees, spread and slippage — all of which work against you in reality, and all of which matter a great deal when the outcome is close to even. A record that looks positive before costs can be negative after them. It also covers only the setups on the history your chart has loaded, which on intraday timeframes is a small sample.
Results vary far more between markets than between settings. The same script on the same timeframe can produce a very different record on two different symbols, and there is no timeframe this tool is generally "best" on. Any suggestion otherwise would be an invention. Check your own market.
This tool describes a sequence of conditions in price and volume. It does not forecast anything, it makes no claim about how often the sequence resolves favourably, and the drawn levels are the geometry of the setup, not a recommendation. It is published for analysis and education, it is not financial advice, and past behaviour of a pattern does not guarantee its future behaviour. Check the record on your own market, manage your own risk, and decide for yourself.
Part of the EonMetrics toolset.
Wskaźnik

HTF Power of 3 (PO3) with Trailing Stop🔵 OVERVIEW
The HTF Power of 3 (PO3) with Trailing Stop is a technical indicator created by BigBeluga to capture institutional market cycles based on Smart Money Concepts (SMC). Detecting market manipulation phases and structural accumulation zones has always been a major challenge in technical analysis, as traditional breakouts often lead to false signals and whipsaw trades. In order to provide a solution to this problem, this indicator maps higher timeframe (HTF) Power of 3 cycles—breaking price action down into Accumulation, Manipulation, and Distribution phases—combined with an advanced volatility-based trailing stop engine.
The indicator aims to visualize institutional order-building and subsequent expansions. The core element of its calculation involves tracking HTF session levels alongside a dynamic ATR-based trailing threshold defined as:
trailingStop = close ± currentAtr * trailMultiplier
where currentAtr is the standard Average True Range of period atrPeriod , and trailMultiplier is the sensitivity footprint multiplier. Higher values of accumMultiplier and trailMultiplier allow the indicator to adjust to longer consolidation periods and filter out minor market noise.
🔵 FEATURES
The system utilizes a multi-layered matrix structure to provide actionable market intelligence:
1 — Auto HTF Matrix Mode & Session Engine
Dynamic Timeframe Scaling: When enabled, the indicator automatically scales the higher timeframe matrix dynamically based on your current chart timeframe context.
Session Tracking: Continuously calculates local open, high, low, and close parameters across higher timeframe layers to project real-time structural candles on the right side of your chart.
2 — Power of 3 (PO3) Phase Breakdown & Peak Labels
Accumulation Phase: Maps the initial consolidation boundary lines over a defined accumMultiplier bar count, outlining the high and low thresholds where institutional orders cluster.
Manipulation Phase & Peak Labels: Triggers automatically when price breaks out of the accumulation boundaries, identifying fakeouts and plotting a peak manipulation label marked with an M at the extreme high or low.
Distribution Phase & Peak Labels: Transitions into the expansion phase once the trailing stop is breached, tracking the final leg of the institutional delivery cycle and plotting a peak distribution label marked with a D .
3 — Dynamic Trailing Stop & Cloud Fill
Volatility Boundaries: Employs a robust ATR trailing line that shifts dynamically to lock in profits and signal shifts in market bias.
Visual Cloud Fills: Dynamically colors and fills the space between price action and the trailing stop line to offer clear visual confirmation of trend direction.
🔵 HOW TO USE
Apart from the basic visualization of institutional market cycles, this tool can also act in alternative ways to support decision-making:
Identify Accumulation Zones: Monitor the orange accumulation channel during the early stages of an HTF session to spot tight consolidation ranges before an expansion.
Trade the Manipulation Breakout: Wait for price to sweep outside the accumulation boundaries to trigger a "Manipulation" label and an M peak marker, signaling an institutional run on liquidity before the true directional move.
Manage Risk with Trailing Stops: Use the dynamic trailing stop line, cloud fill, and subsequent D distribution peak markers as a trailing stop loss mechanism to guide entries, manage open positions, and catch the final distribution leg.
🔵 NOTES
Why this implementation is unique:
It automates complex multi-timeframe ICT concepts directly onto lower timeframe charts without requiring manual chart reconfiguration.
The right-aligned visual projection engine gives traders a clear look at the developing higher timeframe candle and session metrics without cluttering active price history.
The script is fully optimized for Pine Script version 6, integrating seamless label sizing and automated line management for maximum rendering performance.
Wskaźnik

SBP Market Levels NavigatorSBP Market Levels Navigator is a standalone market-level mapping tool designed to identify and display only the strongest qualified support and resistance references for the trading day positioned at the right edge of the visible chart.
The script is intended to reduce chart clutter. It does not display intermediate or minor levels. Only Major levels that satisfy the internal qualification threshold are selected for plotting.
The script does not place orders, calculate position size, provide profit targets, define stop-loss levels, or present performance statistics. It is an analytical aid for independent chart study and risk-managed decision-making.
Methodology
The script uses one integrated level-selection workflow. Confirmed swing pivots, previous-day high and low, and previous-week high and low create candidate price references. Nearby candidates are consolidated so that similar prices are treated as one area rather than as multiple unrelated lines.
Each retained level is evaluated using:
Confirmed occurrence count
Price interaction count
Confirmed rejection behaviour
Reference-source weighting
Level freshness
Confirmed support-resistance role change
Only candidates that meet the Major-level score requirement are eligible for display. The strongest qualified levels nearest to price are selected separately above and below the market.
Selected trading-day display
The displayed trading day is the exchange-calendar day containing the chart's rightmost visible candle. Moving another historical day to the right edge of the visible chart causes the indicator to rebuild its display for that day.
Lines begin at the first bar of the selected day and end at the configured label offset after that day. They do not extend indefinitely across unrelated trading days.
Pine Script cannot detect the candle under the mouse pointer, so the rightmost visible candle is used as the practical historical-day selector.
Major levels only
The indicator displays only Major levels.
Support and resistance levels use thick lines and plain-text labels.
Intermediate and Minor classifications are not displayed and are not available as user controls.
This design keeps the chart focused on the strongest internally ranked areas.
Level colours and role changes
Support is displayed in green.
Resistance is displayed in red.
A resistance level that changes into support remains green and is labelled Rev Sup.
A support level that changes into resistance becomes red and is labelled Rev Res.
Normal support and resistance lines are solid. Confirmed role-reversal lines are dashed so that the change in market function remains visually identifiable without adding extra colours.
A support changes into resistance only after the required number of confirmed closes below the level. A resistance changes into support only after the required number of confirmed closes above the level.
Round-number display
Displayed levels can use exact prices, automatic rounding, or a manual rounding step of 1, 5, 10, 25, 50, or 100.
Auto mode chooses a practical rounding interval according to the instrument type and price range. This is intended to produce readable levels for indices, stocks, futures, commodities, forex, and other supported symbols.
The internal scoring process retains the calculated candidate price. The displayed line and label use the selected rounded price.
Nearby-level control
The indicator suppresses duplicate rounded prices and closely spaced levels. The minimum spacing is measured as a user-defined multiple of ATR. When two selected candidates are too close, only the stronger qualified level is retained.
Previous-day-origin levels may contribute to the internal ranking and may be plotted when they qualify, but they do not receive text labels. This reduces repetitive labels around commonly watched daily reference prices.
Labels
Labels are plain text with no shaded background and no border.
The available texts are:
Support
Resistance
Rev Sup
Rev Res
Labels include the displayed rounded price and appear after the selected trading day. Text size and label offset remain user controlled.
Main settings
Maximum Stored Levels limits the number of candidates retained in memory.
Maximum Level Age removes stale candidates from active consideration.
Confirmed Closes for Role Change controls how many closes beyond a level are required before its role changes.
Levels Per Side controls the maximum number of Major supports and Major resistances displayed.
Round Level Prices selects exact, automatic, or manual price rounding.
Minimum Display Separation controls the minimum distance between displayed levels as an ATR multiple.
Label Text Size controls the plain-text label size.
Label Offset After Selected Day controls how many bars after the selected day the labels are positioned.
Alerts
Alert conditions are available for:
Support-level tests
Resistance-level tests
Confirmed bullish rejections
Confirmed bearish rejections
Confirmed resistance-to-support changes
Confirmed support-to-resistance changes
These alerts describe analytical events only. They are not trade instructions.
Suggested use
Place the script on a standard price chart.
Move the current or historical trading day you want to study to the right edge of the visible chart.
Use Auto rounding for general use or select a manual step suited to the instrument.
Adjust Levels Per Side to control how many Major supports and resistances are shown.
Increase Minimum Display Separation when displayed levels remain too close.
Treat the plotted levels as areas for further observation rather than guaranteed reversal or breakout points.
Limitations
The levels are derived from historical price structure and confirmed reference data. They do not predict whether price will hold, reverse, or break.
Confirmed pivots appear only after the required confirmation bars have completed.
The historical-day selector follows the rightmost visible candle, not the mouse pointer.
Calendar-day selection may not perfectly represent instruments whose trading sessions cross midnight.
Rounded displayed prices may differ from the exact internal candidate prices.
The script should not be used as the sole basis for a trading decision.
Educational notice
This script is an analytical charting tool. It does not provide investment advice, guarantee outcomes, or replace independent analysis and risk management. Wskaźnik

TEWMA Slope Oscillator - [JTCAPITAL]TEWMA Slope Oscillator - is a modified way to use a Triple Exponential Weighted Moving Average (TEWMA), normalized slope analysis, ATR volatility normalization, and exponential smoothing for Trend-Following and Momentum Analysis.
Unlike traditional oscillators that are derived directly from price, this indicator measures the rate of change (slope) of a custom TEWMA trend line. By normalizing this slope with the Average True Range (ATR), the oscillator becomes volatility-adjusted, allowing trend strength to be compared across different market conditions. This makes the indicator useful for identifying whether trends are merely moving, or accelerating with meaningful momentum.
The indicator works by calculating in the following steps:
Weighted Price Smoothing
The selected price source (Close by default, although any TradingView source can be selected) is first smoothed using a Weighted Moving Average (WMA). Unlike a Simple Moving Average, the WMA gives progressively greater importance to the most recent price bars while still considering historical data. This reduces market noise while allowing the moving average to react faster to recent changes.
Rather than relying on a single smoothing period, the script prepares two separate smoothing lengths:
The original TEWMA Length.
A second length calculated as the original length multiplied by the user-defined Length Multiplier.
This creates two trend measurements that represent both medium-term and slower market behavior.
Triple Exponential Processing (TEMA)
Each Weighted Moving Average is then processed using a Triple Exponential Moving Average (TEMA).
The Triple Exponential Moving Average is specifically designed to reduce lag while maintaining smoothness. Traditional moving averages often delay reactions because every layer of smoothing introduces additional latency. TEMA compensates for much of this lag mathematically by combining multiple exponential averages into a single result.
Applying TEMA on top of the Weighted Moving Average creates a very responsive yet smooth trend estimate that filters insignificant fluctuations while remaining sensitive to genuine trend changes.
Dual TEWMA Construction
Instead of relying on only one moving average, the indicator calculates two separate TEWMAs:
One using the original period.
One using the multiplied period.
The final TEWMA becomes the average of these two curves.
Averaging both trend estimates balances responsiveness with stability. The shorter TEWMA reacts more quickly to new market information, while the longer TEWMA filters larger amounts of noise. Combining both produces a smoother trend representation that avoids becoming overly reactive while still responding efficiently to changing market conditions.
Trend Direction Detection
The script continuously compares the current TEWMA with its previous value.
If today's TEWMA is higher than the previous value, the trend is considered bullish.
If today's TEWMA is lower than the previous value, the trend is considered bearish.
The indicator stores this direction internally and uses it for its visual coloring, making bullish periods immediately recognizable in blue while bearish periods appear in purple.
Slope Calculation
After constructing the final TEWMA, the script measures its slope.
Rather than measuring price itself, the oscillator calculates:
"The difference between today's TEWMA and yesterday's TEWMA."
This produces a measurement of how quickly the trend itself is changing.
Positive values indicate the trend is rising.
Negative values indicate the trend is falling.
Larger absolute values indicate stronger acceleration.
Smaller values near zero indicate slowing momentum or sideways conditions.
ATR Normalization
Instead of using the raw slope, the script divides the slope by the Average True Range (ATR).
This normalization is one of the defining characteristics of the indicator.
Without ATR normalization, identical price movements would appear much larger on low-priced assets than on expensive assets.
By dividing by ATR:
Large volatility environments become comparable with quiet markets.
Different assets become easier to compare.
Oscillator values represent trend strength relative to current market volatility rather than raw price movement.
The result is a dimensionless momentum measurement that remains much more consistent across instruments and timeframes.
EMA Signal Smoothing
Although the normalized slope already provides valuable information, short-term fluctuations may still produce rapid oscillations.
To improve readability, the script applies an Exponential Moving Average (EMA) directly to the slope values.
This smoothed line acts as a slower confirmation curve.
The raw slope reflects immediate momentum.
The EMA reflects sustained momentum.
Comparing these two allows traders to distinguish between temporary spikes and persistent trend acceleration.
Momentum Zone Detection
The indicator introduces user-defined upper and lower threshold levels.
When the normalized slope exceeds the upper threshold:
-The market is considered to have unusually strong bullish momentum.
When the normalized slope falls below the lower threshold:
-The market is considered to have unusually strong bearish momentum.
The same logic is independently applied to the smoothed EMA line.
Whenever either condition is satisfied, the background color changes to highlight periods of exceptional trend strength.
These zones do not generate trading signals by themselves, but instead emphasize moments where momentum has reached statistically significant levels relative to recent volatility.
Buy and Sell Conditions:
This indicator is intentionally designed as a momentum and trend-strength oscillator rather than a direct entry generator.
Typical bullish interpretation includes:
The TEWMA begins rising.
The normalized slope crosses above zero.
The smoothed EMA also moves above zero.
The oscillator continues accelerating toward or above the upper threshold.
Typical bearish interpretation includes:
The TEWMA begins falling.
The normalized slope crosses below zero.
The smoothed EMA confirms the move below zero.
The oscillator continues toward or below the lower threshold.
Because both the raw slope and its EMA are displayed simultaneously, traders can judge whether momentum is strengthening, weakening, or beginning to reverse before the underlying trend itself changes direction.
The threshold values can be adjusted depending on trading style:
Lower threshold values produce earlier but more frequent momentum alerts.
Higher threshold values require stronger momentum before highlighting extreme conditions, reducing market noise.
The smoothing period can also be increased or decreased depending on whether faster or more conservative confirmation is preferred.
Features and Parameters:
Source
Selects which price source is used for all calculations.
TEWMA Length
Controls the primary Weighted Moving Average and TEMA calculation period.
Length Multiplier
Creates the second TEWMA period by multiplying the original length, allowing the indicator to combine two different trend horizons.
Smoothed Length
Determines the EMA period applied to the normalized slope.
Upper Threshold
Defines the bullish momentum level where background highlighting begins.
Lower Threshold
Defines the bearish momentum level where background highlighting begins.
ATR Length
Controls the Average True Range period used to normalize slope values.
Dual Oscillator Display
Shows both the raw normalized slope and its EMA simultaneously.
Dynamic Coloring
Automatically colors bullish momentum blue and bearish momentum purple.
Background Momentum Zones
Highlights periods where either the raw slope or smoothed slope exceeds user-defined strength thresholds.
Specifications:
Weighted Moving Average (WMA)
The Weighted Moving Average assigns progressively larger weights to newer prices while assigning smaller weights to older observations. This allows the moving average to respond faster than a Simple Moving Average while still maintaining smoothness. Because recent market activity receives greater influence, the WMA provides an excellent foundation for responsive trend calculations.
Triple Exponential Moving Average (TEMA)
The Triple Exponential Moving Average is designed to significantly reduce lag compared to traditional moving averages. Instead of relying on a single exponential smoothing process, TEMA mathematically combines multiple exponential averages to compensate for the delay introduced by smoothing. This produces a trend line that reacts quickly while maintaining a clean appearance.
TEWMA (Triple Exponential Weighted Moving Average)
The TEWMA combines the advantages of a Weighted Moving Average with the lag-reduction properties of the Triple Exponential Moving Average. The result is a trend estimate that reacts rapidly to meaningful price movement while filtering much of the short-term market noise that can affect conventional moving averages.
Dual-Length Averaging
Instead of relying on one smoothing horizon, the indicator averages two independently calculated TEWMAs. Combining a faster and slower trend estimate helps reduce false directional changes while preserving responsiveness. This dual-length construction creates a more balanced representation of market structure than either length would provide individually.
Slope
Slope measures how quickly the TEWMA itself changes from one bar to the next. Rather than evaluating where price is located, the indicator evaluates how rapidly the trend line is moving. Increasing positive slope reflects accelerating bullish momentum, while increasingly negative slope reflects accelerating bearish momentum.
Average True Range (ATR)
Average True Range measures recent market volatility by considering both daily ranges and price gaps. ATR does not indicate trend direction but instead measures how much price typically moves. Dividing the slope by ATR converts raw movement into a volatility-adjusted measurement, making momentum readings far more consistent across different instruments and market environments.
ATR Normalization
Normalization removes much of the distortion caused by differing price scales and volatility regimes. A movement that appears large on one market may be insignificant on another. By scaling the slope using ATR, the oscillator expresses momentum relative to current market conditions rather than absolute price movement.
Exponential Moving Average (EMA)
The EMA applied to the slope acts as a momentum confirmation filter. Because exponential averages place greater emphasis on recent observations, the smoothed oscillator follows changes efficiently while filtering much of the short-term fluctuation present in the raw slope.
Momentum Oscillator
Unlike oscillators derived directly from price, this oscillator measures the strength and speed of the underlying trend itself. Positive readings indicate bullish trend acceleration, negative readings indicate bearish acceleration, and values near zero indicate weakening momentum or balanced market conditions.
Threshold Levels
The upper and lower thresholds define momentum zones where the normalized slope has become unusually strong relative to recent volatility. These levels are fully customizable, allowing traders to adapt the indicator to different markets, trading styles, and volatility environments.
Trend Momentum Confirmation
Displaying both the raw normalized slope and its smoothed EMA provides two perspectives on market momentum. The raw slope captures immediate changes, while the EMA reflects sustained movement. Together they help distinguish short-lived fluctuations from genuine trend acceleration, making it easier to evaluate the quality and persistence of directional momentum.
Enjoy! Wskaźnik

Colored ALMAALMA is the Arnaud Legoux Moving Average. Instead of weighting every bar in the lookback equally, it lays a bell curve over those bars and weights them by where they fall under that curve. The Offset decides where the peak of the curve sits. At 0.85 the peak sits near the newest bars, so the line hugs price with very little lag. Sigma controls how narrow the bell is, and a higher Sigma like 6 means fewer bars carry real weight, which smooths the line. So 14, 0.85, 6 gives you a fast line that still refuses to chase every tick.
How the color decides itself
In slope mode the script only asks one question each bar: is the ALMA higher or lower than it was on the previous bar. Rising paints green, falling paints red. The direction is stored in a variable that carries forward, so if the line goes perfectly flat for a bar it holds whatever color it had rather than blinking to something neutral. You only get a color change when the line genuinely turns.
That is why slope mode is quieter than price versus ALMA. Price can poke through a moving average a dozen times in a sideways hour, but the average itself has to actually roll over before slope changes.
The markers and the alerts
A small triangle prints under the bar when it turns green and above the bar when it turns red, so you can eyeball the history without hunting for the exact bar where the color switched.
For alerts you have four options in the dialog. Three of them are alertcondition entries: green only, red only, or any change. Those let you set your own trigger frequency in the alert window. The fourth is the built in alert call, which fires on bar close and sends a message with the direction and the price. Use the alertcondition ones if you want control over frequency, use the alert call if you want the message to carry the price with it.
To make slope the default
Change the first argument on the Color Rule input from "Price vs ALMA" to "ALMA Slope". Everything else stays as is.
One thing worth knowing before you lean on it: slope mode is calmer, but in tight chop a fast ALMA can still ripple up and down a few ticks and flip on you. If that shows up on your timeframe, raising Length or lowering Offset a little will kill most of it. This is a tool to give information about a price chart and is not financial advice. Wskaźnik

Echo Vector## Echo Vector
### Overview
Echo Vector is an open-source chart-analysis overlay that combines relative-volume candle classification, moving-average context, confirmed price structure, liquidity references, imbalance zones, trading sessions and higher-timeframe reference levels.
The purpose of the script is to organize several related areas of chart analysis within one configurable workflow:
- relative volume and candle behaviour;
- trend and volatility context;
- confirmed swing structure;
- liquidity references and mitigated zones;
- Fair Value Gaps and Balanced Price Ranges;
- daily, weekly and session-based reference levels;
- optional analytical condition markers;
- simplified historical condition-outcome statistics.
Echo Vector does not predict future price movement. Its colours, zones, lines and markers show when the configured analytical conditions have been detected. They should not be treated as automatic instructions to enter or exit a position.
### Open-source attribution
Echo Vector is an independent derivative that retains and adapts portions of the open-source Traders Reality MT4 Sessions framework and functionality associated with the Traders_Reality_Lib.
The original source credits:
- TradersReality;
- plasmapug;
- infernix;
- peshocore;
- xtech5192.
Retained or adapted areas include selected relative-volume vector-candle concepts, EMA references, market-session timing, daylight-saving handling, daily pivot calculations, M-level calculations, Psy-level concepts and selected daily and weekly reference levels.
This publication is not affiliated with, endorsed by or presented as an official TradersReality or Pattern Watchers publication.
The source is published under the Mozilla Public License 2.0.
This implementation expands the framework with additional liquidity-level management, volume-confirmed pivot zones, market-structure states, Fair Value Gap and Balanced Price Range processing, configurable condition markers, mitigation handling, Fibonacci references, timeframe presets and historical condition-outcome tables.
### What the script measures
Echo Vector examines how candle direction, candle range, candle body size and reported volume relate to their recent historical averages.
The script also examines:
- price position relative to several moving averages;
- confirmed pivot highs and lows;
- breaks of confirmed internal and external structure;
- price interaction with previously identified levels and zones;
- three-candle price imbalances;
- overlap between opposing imbalance zones;
- distance from statistical and moving-average references;
- session location and daily or weekly reference levels.
The individual modules measure different characteristics. A high-volume candle describes participation, while a structure break describes price progression. A liquidity level describes a previous pivot reference, while an FVG describes an imbalance between three candles.
No single component confirms the meaning of another component automatically.
### Relative-volume candle classification
The vector-candle engine compares current volume with a recent volume average.
It also calculates a volume-spread value by multiplying candle range by volume and comparing that value with recent bars.
The principal candle states are:
- Echo Pulse: volume exceeds the configured moderate relative-volume threshold.
- Echo Surge: volume exceeds the stronger threshold or the volume-spread value reaches the recent comparison extreme.
- Echo Peak: volume reaches the configured extreme relative-volume threshold.
- Blow-off condition: a bullish candle combines unusually high volume, an unusually large body and extension above an EMA-based deviation reference.
- Exhaustion condition: a bearish candle combines unusually high volume, an unusually large body and extension below the corresponding deviation reference.
These classifications describe unusual candle and volume relationships. They do not prove accumulation, distribution, institutional activity or an imminent reversal.
An Echo Cascade marker can appear when qualifying volume states occur for the selected number of consecutive bars.
### Moving averages and cloud
The script displays five configurable moving-average references representing fast, medium, baseline, long-term and very-long-term context.
The baseline average is also used as the centre of a volatility cloud. Cloud width is calculated from price standard deviation and can be adjusted with the multiplier and divisor settings.
When dynamic colouring is enabled, selected moving averages change colour according to price position relative to the baseline average.
Moving averages are delayed calculations based on historical prices. They do not identify exact support or resistance and can react slowly after abrupt market changes.
### Liquidity reference levels
The LQ module converts confirmed pivot highs and lows into horizontal reference levels.
- A level above a confirmed pivot high represents a possible high-side liquidity reference.
- A level below a confirmed pivot low represents a possible low-side liquidity reference.
The lines remain active until they are touched, hidden under the selected mitigation rule or removed because the maximum number of retained levels has been reached.
These levels are inferred from historical price structure. They do not display real resting orders or order-book liquidity.
### Volume-confirmed pivot zones
The zone module combines confirmed pivots with relative volume.
A zone is created when:
- a pivot high or pivot low has been confirmed;
- volume at the pivot meets the selected relative-volume threshold;
- the zone satisfies the configured display and storage rules.
Zone height can be based on a fixed tick value and may also be scaled by relative volume or ATR.
Mitigation can be evaluated using candle wicks or candle bodies. Mitigated zones may be removed or retained with a faded appearance.
The zones represent areas of prior price and volume interaction. They do not prove the presence of institutional orders.
### Market structure
Echo Vector maintains separate external and internal structure states.
External structure uses the major pivot lookback. Internal structure uses a shorter pivot lookback to detect smaller structural movements.
Depending on the previous stored direction, confirmed breaks may be labelled as:
- BOS;
- CHoCH;
- internal BOS;
- internal CHoCH;
- MSS.
The user can choose whether a break is evaluated using the candle close or the candle wick.
Structure labels are descriptive classifications based on confirmed pivots. Different pivot settings can produce different structure interpretations.
### Fair Value Gaps and Balanced Price Ranges
A bullish Fair Value Gap is detected when the current candle low remains above the high from two candles earlier.
A bearish Fair Value Gap is detected when the current candle high remains below the low from two candles earlier.
The gap must satisfy the configured minimum tick size.
When an active bullish and bearish FVG overlap, the overlapping section is displayed as a Balanced Price Range.
FVG and BPR zones are managed until their invalidation or fill condition is met.
These zones identify historical price imbalances. Price is not required to revisit, fill or react to them.
### Analytical condition markers
Echo Vector includes optional markers based on combinations of volume, candle body, wick structure, moving-average distance, RSI thresholds and recent price extremes.
Available modules include:
- swing-sweep conditions;
- stopping-volume-style conditions;
- high-volume displacement conditions;
- large-volume candle conditions;
- wick-rejection conditions;
- RSI extreme-threshold conditions;
- blow-off and exhaustion conditions.
These names describe the intended analytical category. The conditions are OHLCV-based heuristics and do not directly identify actual stop orders, passive absorption or order-book events.
Bullish and bearish markers indicate the directional interpretation assigned by the selected calculation. They are not buy or sell recommendations.
### Sessions and reference levels
The script can display selected market-session boxes and labels, including:
- London;
- New York;
- Tokyo;
- Hong Kong;
- Sydney;
- a combined Asia window;
- EU and US break windows.
Internal daylight-saving calculations adjust selected session times.
The script can also display:
- previous-day high and low;
- previous-week high and low;
- daily open;
- daily pivot levels;
- M0 through M5 midpoint levels;
- average-range references;
- Psy High and Psy Low references;
- dynamic Fibonacci retracement levels.
Session alignment can vary because of symbol trading hours, exchange calendars, chart timeframes, holidays and daylight-saving transitions.
### Fibonacci references
The Fibonacci module uses confirmed swing points maintained by the script.
When a new structural extreme is confirmed or the stored range is broken, the active swing range may be updated and the Fibonacci levels recalculated.
The user can control:
- pivot sensitivity;
- displayed ratios;
- line colours;
- line style;
- label visibility;
- standard or extended ratio sets.
Because the anchors depend on confirmed and changing swing structure, the displayed range can change as new information becomes available.
### Timeframe presets
Echo Vector provides Auto, Intraday, Daily, Weekly and Manual modes.
The presets adjust selected moving-average, RSI and volume parameters.
- Auto selects a parameter group according to the chart timeframe.
- Intraday, Daily and Weekly force a selected preset.
- Manual uses the user-defined values.
Preset values are starting configurations. They are not automatically optimized for the current symbol and do not guarantee suitable behaviour across all markets.
### How to use Echo Vector
Begin with the broader moving-average and market-structure context.
Next, examine where price is trading relative to:
- confirmed LQ levels;
- volume-confirmed pivot zones;
- FVG and BPR zones;
- session highs and lows;
- daily and weekly reference levels;
- the active Fibonacci range.
Then review the candle classification.
A Pulse, Surge or Peak candle shows that the selected volume criteria were met. It does not determine whether price will continue or reverse.
Finally, examine optional condition markers only after considering their location. A marker occurring near a relevant level or structural area may provide more context than the same marker appearing in the middle of an undefined range.
Users remain responsible for independently determining risk, position size, entry and exit rules.
### Minimal Mode
Minimal Mode reduces chart congestion by hiding selected condition markers and simplifying parts of the visual display.
It is intended for users who want to focus primarily on moving averages, the cloud, levels, sessions and broader structure.
Because individual modules also have separate visibility controls, users should confirm which elements remain active after enabling Minimal Mode.
### Historical condition-outcome table
The optional table applies fixed percentage target and stop distances to historical condition markers.
For each tracked condition, it counts whether the selected target or stop boundary was reached first.
The table is a simplified observational tool and is not equivalent to TradingView Strategy Tester.
It does not model:
- commission;
- spread;
- slippage;
- order type;
- execution delay;
- liquidity;
- position sizing;
- portfolio equity;
- all intrabar sequencing ambiguities.
Only one active observation is maintained for each tracked condition and direction. Historical results depend on the symbol, timeframe, available history, target distance, stop distance and selected settings.
Historical table values do not imply future performance.
### Settings
The main settings control:
- timeframe presets;
- moving-average periods and colours;
- volatility-cloud width;
- relative-volume thresholds;
- candle-state visibility;
- pivot sensitivity;
- liquidity-level retention;
- zone volume requirements;
- ATR and volume zone scaling;
- mitigation rules;
- internal and external structure sensitivity;
- close- or wick-based break evaluation;
- FVG minimum size;
- session visibility;
- daily and weekly reference levels;
- Fibonacci anchors and ratios;
- RSI thresholds;
- wick, volume and body filters;
- marker colours;
- alert conditions;
- table target and stop distances.
Lower thresholds and shorter lookbacks generally increase sensitivity and noise.
Higher thresholds and longer lookbacks generally produce fewer conditions and later confirmation.
### Alerts
Alerts are available for selected vector-candle states, FVG conditions, sweep-style conditions, stopping-volume-style conditions, wick conditions and Psy-level crosses.
Many conditions use values from the active candle. They can therefore appear, change or disappear before the candle closes.
For confirmed alerts, select Once Per Bar Close when creating the TradingView alert.
Pivot-based conditions are available only after the required right-side pivot bars have completed.
### Repainting and confirmation behaviour
FVG and BPR objects are created only after the relevant chart candle is confirmed.
Other current-bar conditions may change while the candle remains open.
Pivot highs and lows require bars on both sides of the pivot. A pivot is therefore confirmed only after the selected number of right-side bars has completed.
Once confirmed, a pivot marker, liquidity line, structure line, zone or Fibonacci anchor may be drawn at the earlier pivot location. The object was not available in real time on that earlier candle.
Current daily-open and session values can change as their active periods develop.
Users should evaluate signals according to the time at which they became confirmed rather than only by their final historical chart position.
### Limitations
- Volume quality differs between exchanges, brokers and symbols.
- Forex and CFD symbols may provide tick volume rather than centralized exchange volume.
- Relative-volume classifications do not show true bid-and-ask delta.
- Pivot confirmation introduces delay.
- Current-bar markers can change before candle close.
- High volume can accompany continuation, reversal or temporary volatility.
- Extreme conditions can persist.
- Liquidity levels do not show actual resting orders.
- Volume-confirmed zones do not prove institutional activity.
- FVG and BPR zones may remain unfilled or fail to produce a reaction.
- Structure classifications depend on the selected pivot settings.
- Moving averages lag price.
- Session timing can vary across exchanges and instruments.
- Lower timeframes generally generate more noise.
- Historical outcome tables do not reproduce realistic execution.
- Platform limits can restrict the number of retained boxes, labels and lines.
- The script should not be used as the sole basis for a trading decision.
------------
## HOW-TO: Use Echo Vector to Read Volume, Liquidity and Structure
Echo Vector combines relative-volume candles, moving-average context, confirmed market structure, liquidity references, imbalance zones, sessions and higher-timeframe levels.
This guide explains a structured way to read the indicator without treating any single marker as an automatic trade signal.
## Step 1: Choose the operating mode
Open the indicator settings and select an Optimization Mode.
- Auto applies a parameter group according to the chart timeframe.
- Intraday forces the intraday settings.
- Daily forces the daily settings.
- Weekly forces the weekly settings.
- Manual uses the values entered by the user.
The presets are starting configurations rather than symbol-specific optimizations.
When changing symbols or timeframes, review whether the pivot sensitivity, volume thresholds and moving-average lengths remain appropriate.
## Step 2: Establish the broader context
Begin with the moving averages and the baseline cloud.
Ask:
- Is price above or below the baseline average?
- Are the fast and medium averages moving in the same direction?
- Is price compressed inside the cloud or extended away from it?
- Is price above or below the long-term averages?
Moving averages provide context, not precise entries.
A strong move can remain extended for longer than expected, while sideways markets can cause repeated crossings.
## Step 3: Read the vector-candle states
Echo Vector classifies candles according to relative volume and candle behaviour.
- Echo Pulse marks moderately elevated volume.
- Echo Surge marks stronger relative volume or an elevated volume-spread relationship.
- Echo Peak marks an extreme relative-volume condition.
- Echo Cascade marks consecutive qualifying vector states.
- Blow-off and exhaustion conditions add body-size and statistical-extension requirements.
A coloured candle answers the question:
Did this candle meet the selected relative-volume criteria?
It does not answer:
Will the next candle move higher or lower?
Always compare a vector candle with its location and surrounding structure.
## Step 4: Identify confirmed liquidity references
LQ lines are created from confirmed pivot highs and lows.
A high-side line marks a previous confirmed high. A low-side line marks a previous confirmed low.
Use these lines to examine whether price is:
- approaching an earlier swing;
- trading through the level;
- closing back across it;
- accepting beyond it;
- reacting without reaching it.
The lines are historical price references. They do not show actual stop orders or order-book liquidity.
## Step 5: Examine volume-confirmed pivot zones
The shaded pivot zones require both a confirmed pivot and the selected relative-volume condition.
Zone height can be adjusted with:
- the base tick value;
- relative-volume scaling;
- ATR scaling.
A larger zone does not automatically mean stronger support or resistance. It means that the configured sizing calculation produced a wider reference area.
Watch how price interacts with the zone:
- wick interaction;
- body interaction;
- partial mitigation;
- complete mitigation;
- movement through the zone without reaction.
## Step 6: Read market structure
Echo Vector separates external and internal structure.
External structure describes larger confirmed pivots. Internal structure describes smaller movements inside the broader structure.
Labels can include BOS, CHoCH, internal BOS, internal CHoCH and MSS.
Use them in sequence rather than isolation.
For example:
- an internal bullish change inside an external bearish structure is not automatically a complete trend reversal;
- an external break can be more significant but will normally confirm later;
- wick-based confirmation reacts sooner but can produce more false breaks;
- close-based confirmation reacts later but requires the candle to finish beyond the level.
## Step 7: Use FVG and BPR zones
A bullish FVG appears when the current candle low remains above the high from two candles earlier.
A bearish FVG uses the inverse relationship.
A Balanced Price Range appears where active opposing FVG zones overlap.
Use these zones to study areas of historical imbalance.
Possible observations include:
- price returning into an FVG;
- partial filling;
- complete invalidation;
- reaction near a BPR;
- an imbalance aligning with a structural or liquidity reference.
Price is not required to fill every FVG.
## Step 8: Add session and higher-timeframe context
Enable only the sessions relevant to the market being studied.
Echo Vector can display London, New York, Tokyo, Hong Kong, Sydney, Asia and selected break windows.
The reference-level section can also display:
- previous-day high and low;
- previous-week high and low;
- daily open;
- pivot and M levels;
- average-range levels;
- Psy High and Psy Low;
- Fibonacci retracements.
These levels provide location context.
A condition occurring near a previous-day extreme may have a different context from the same condition occurring in the centre of the daily range.
## Step 9: Interpret condition markers carefully
The script contains optional markers based on combinations of:
- recent highs and lows;
- volume;
- candle bodies;
- wick ratios;
- moving-average distance;
- RSI thresholds;
- price extension.
Treat the markers as analytical filters.
Do not assume that names such as Stop Hunt, Stopping Volume or Liquidity Grab prove the presence of actual stop orders or institutional absorption.
They are OHLCV-based approximations.
Before using a marker, check:
- broader trend;
- external structure;
- internal structure;
- nearby LQ levels;
- active zones;
- session location;
- FVG or BPR location;
- candle-close confirmation.
## Step 10: Understand pivot delay
A confirmed pivot requires later candles.
When Pivot Strength is set to three, three bars to the right must complete before the earlier candle can be confirmed as a pivot.
The script may then place the marker or line on the original pivot candle.
This makes the historical chart easier to read, but the information was not available on the original pivot candle in real time.
The same principle applies to:
- liquidity lines;
- volume-confirmed pivot zones;
- structure pivots;
- dynamic Fibonacci anchors.
## Step 11: Use the outcome table as an observation tool
The table applies fixed target and stop distances to selected historical conditions.
It is useful for comparing how a condition behaved under one set of assumptions.
It is not a strategy backtest.
The table does not include commission, spread, slippage, realistic order fills, position sizing or portfolio equity.
Changing the symbol, timeframe, target, stop or signal filters can materially change the displayed results.
Do not interpret the historical percentage as a probability of future success.
## Step 12: Configure alerts
Select the condition in TradingView’s alert menu.
For conditions based on the active candle, use Once Per Bar Close when confirmed alerts are required.
Without bar-close confirmation, a condition may trigger while the candle is developing and disappear before the candle closes.
Pivot-based divergence or structure conditions naturally occur later because they require right-side confirmation bars.
## Example reading sequence
A structured analysis could follow this order:
- Determine whether price is above or below the baseline and long-term averages.
- Identify the latest external and internal structure direction.
- Mark nearby LQ levels and volume-confirmed pivot zones.
- Check whether price is inside or near an FVG or BPR.
- Identify the active trading session and daily or weekly location.
- Observe whether a Pulse, Surge, Peak or exhaustion condition appears.
- Review any optional marker only after checking its location.
- Wait for candle-close confirmation where required.
- Apply independent risk and execution rules.
The indicator is most useful as a context framework. It should not replace independent analysis or risk management.
## Open-source attribution
Echo Vector is an independent derivative of open-source work associated with TradersReality and the Traders_Reality_Lib.
The supplied original source credits TradersReality, plasmapug, infernix, peshocore and xtech5192.
This publication is not affiliated with or endorsed by TradersReality or Pattern Watchers and is published under the Mozilla Public License 2.0.
Wskaźnik

Fan Principle Signals [MarkitTick]💡 Maps out market structure using a sequence of ascending swing lows (or descending swing highs) to construct a three-legged trendline fan, then triggers actionable trade signals the moment price breaks through the steepest line in that fan. Rather than relying on a single moving average or oscillator crossover, this script builds its bias from the actual geometry of recent price swings, giving traders a structural, visually intuitive way to time entries around the exhaustion of a trend.
✨ Originality and Utility
Most breakout tools react to a single reference line, such as a moving average, a fixed channel, or a static trendline drawn from only two points. This script instead applies the fan principle, a technique that connects a common origin point to three successive pivots in the same trend, producing three lines of increasing steepness. The logic behind this approach is that the third and steepest line in the fan typically represents the most aggressive rate of trend continuation, and a decisive close beyond it has historically signaled that the prevailing trend has lost its structural support.
What makes this implementation useful in practice is that it does not stop at drawing the fan. It automatically identifies valid pivot sequences from raw price action, filters out insignificant micro-swings using a minimum leg percentage threshold, validates the freshness of the structure with a lookback cap, and then converts the break event into a complete trade plan, including entry, stop-loss, and three take-profit levels, all derived mathematically from the fan's own geometry and the market's current volatility. The optional volume and higher-timeframe filters allow traders to demand additional confirmation before a signal is accepted, and the built-in dashboard keeps the entire state of the system visible at a glance. The combination of automated structural fan detection, ATR-adaptive risk placement, and live trade monitoring is what distinguishes this from a simple trendline break script.
🔬 Methodology and Concepts
• Pivot Detection
The script continuously scans for swing highs and swing lows using a symmetrical lookback and lookforward window defined by the Pivot Len input. A bar qualifies as a swing high only if it is strictly greater than every other bar within that window on both sides, and a swing low only if it is strictly lower than every bar in that window. Each time a new pivot is confirmed, its bar index and price are stored in a rolling array, keeping the most recent twenty pivots in memory for both highs and lows.
• Fan Construction
Once at least four pivot lows (for an uptrend fan) or four pivot highs (for a downtrend fan) are available, the script selects the four most recent ones. The oldest of the four becomes the fan's origin point. The remaining three form Leg 1, Leg 2, and Leg 3 respectively, each connected back to that same origin. A slope is then calculated for each leg using simple rise-over-run between the origin and that leg's pivot. For the fan to be accepted, the price move between the origin and the first leg must exceed the Min Leg % threshold, which filters out fans built from statistically insignificant noise, and the origin must fall within the Max Fan Lookback window, which prevents the script from anchoring to structure that is too old to remain relevant.
• The Break Condition
Leg 3, the line connecting the origin to the most recent and steepest pivot, is treated as the trigger line. Its price value is projected forward on every bar using the slope calculated at formation. A bullish break requires the fan to currently be in an uptrend orientation, the previous confirmed bar's close to be above the projected Leg 3 value, and the bar before that to have closed at or below it, meaning the break itself happens on a confirmed, completed bar rather than an in-progress one. The bearish break condition mirrors this logic in the opposite direction for downtrend fans. This confirmed-close approach means the script never fires or removes a signal based on an incomplete, still-forming bar, so historical signals will not disappear or move once printed.
• Optional Confirmation Filters
Two independent filters can be layered on top of the raw break condition. The volume filter requires the breaking bar's volume to exceed a multiple of its recent moving average, screening out breaks that occur on unusually thin participation. The higher-timeframe filter compares the breakout bar's close against the prior, fully closed bar on a higher timeframe of your choosing, requiring the breakout direction to align with that broader trend context before a signal is allowed to fire.
• Trade Level Calculation
When a break is confirmed, the script builds an entry, stop, and three take-profit levels automatically. Entry is anchored to the close of the breakout bar. The stop-loss is placed beyond the nearest of the two most recent fan legs, offset further by a small ATR buffer to avoid being clipped by minor wicks, but it is also capped by a maximum ATR distance so a single outlier swing cannot produce an oversized stop. The distance between entry and stop becomes the base risk unit, and the three take-profit levels are placed at user-defined multiples of that risk unit, giving a consistent, R-multiple-based framework for managing the position rather than arbitrary fixed-price targets.
🎨 Visual Guide
Dotted lines connecting the origin point to Leg 1 and Leg 2 show the earlier, less steep sections of the fan structure and provide visual context for how the trend developed.
The solid, extended line represents Leg 3, the active trigger line. It is colored using the Bull Fan color when the fan is in an uptrend orientation and the Bear Fan color when it is in a downtrend orientation, and it projects forward in real time as new bars form.
A blue dashed line marks the Entry level once a signal fires, extending to the right for as many bars as the trade remains active or until a new signal replaces it.
A red solid line marks the Stop-Loss level, with a light red shaded zone (the Risk Fill) drawn between the entry and stop lines to make the risk portion of the trade immediately visible.
Three dashed lines in progressively deeper shades of teal mark Take-Profit 1, 2, and 3, moving from lightest (TP1, closest to entry) to fully opaque (TP3, furthest away). A light teal shaded zone (the Reward Fill) spans from the entry line to the TP3 line, visually contrasting the reward portion of the trade against the risk portion.
Small labels are anchored to each of these lines on the left, displaying the exact price of the Stop, Entry, and each Take-Profit level, and updating their horizontal position as the trade progresses.
An upward-pointing "▲ BUY" label appears below the breakout bar on a bullish break, and a downward-pointing "▼ SELL" label appears above the breakout bar on a bearish break.
An optional on-chart dashboard table displays the ticker and timeframe, whether the Lock Signal feature is active, the current fan orientation, the origin price, the live value of the Leg 3 trigger line, the current entry, stop, a live risk-to-reward progress bar showing how far price has travelled toward TP3 relative to the initial risk, the volume filter status, and the number of bars elapsed since the last signal.
📖 How to Use
A signal is generated only when price decisively closes beyond the Leg 3 trigger line of an established fan, so treat the fan's orientation, shown both by the line color and by the Fan State readout on the dashboard, as the prevailing structural bias before a break occurs. When a bullish break prints, the suggested plan is to consider a long entry near the displayed Entry line, with the Stop-Loss line defining the invalidation point below and the three Take-Profit lines offering staged exit levels as the move develops. A bearish break mirrors this in the opposite direction for short setups.
The R:R Progress bar on the dashboard is useful for monitoring an active trade at a glance: it fills from 0% toward 100% as price advances from entry toward the TP3 target, and its color shifts from red through amber to teal as the trade's risk-to-reward ratio improves. If the Lock Signal option is enabled, the script freezes the most recently confirmed signal and its levels in place rather than allowing a new one to overwrite them, which can help when you want to manage an open position without the on-chart levels shifting. Because signals are confirmed only on closed bars, always wait for bar close before acting on a fresh line break rather than reacting to an in-progress wick.
Enabling the optional Volume and HTF filters will typically reduce signal frequency while raising the bar for confirmation, so consider testing both configurations to see which better matches the behavior of the instrument and timeframe you trade.
⚙️ Inputs and Settings
Pivot Len — Controls how many bars on each side must confirm a swing high or low. Smaller values detect pivots faster but produce noisier, more frequent fan structures; larger values produce fewer but more structurally significant pivots.
Max Fan Lookback — The maximum age, in bars, that a fan's origin point can have and still be considered valid. Lowering this keeps the script focused on recent structure only.
Min Leg % — The minimum percentage price move required between the origin and the first leg for a fan to be accepted, filtering out fans built on insignificant price movement.
Use Vol Filt / Vol Avg Len / Vol Mult — Enables a volume confirmation requirement, comparing current volume against its moving average over the specified length, multiplied by the chosen factor.
Use HTF Filt / HTF — Enables a higher-timeframe trend alignment requirement, comparing the breakout close against the prior confirmed close on the chosen higher timeframe.
SL ATR Buf — The ATR-based buffer added beyond the nearest fan leg when placing the stop-loss, giving the stop room to avoid minor wick noise.
SL Max ATR — A ceiling, expressed in ATR multiples, on how far the stop-loss can be placed from entry, preventing outsized stops on unusually wide fans.
ATR Len — The lookback length used for the ATR calculation that feeds both the stop buffer and the stop cap.
TP1 R / TP2 R / TP3 R — The risk-multiple distances used to place the three take-profit levels relative to the initial risk unit between entry and stop.
Lock Signal — Freezes the current signal and its associated levels in place, preventing a new signal from overwriting them until manually disabled.
Show Fan Lines / Show Trade Levels / Show Labels — Independently toggle the visibility of the fan structure lines, the entry/stop/TP levels, and their accompanying price labels.
Show Dash / Dash Pos — Toggle the on-chart dashboard and choose which corner of the chart it is anchored to.
A full set of color inputs is available to customize the fan lines, trade level lines, fill zones, signal labels, and dashboard appearance to match your own chart theme.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The fan principle applied here descends from classical technical analysis literature on trendline construction, most notably the Gann fan and Andrews' Pitchfork family of tools, which share the premise that connecting a structural origin point to successive swing extremes produces a family of trendlines whose slopes carry predictive meaning about the trend's rate of change. Where this script departs from those older, largely manual techniques is in how the origin and legs are selected: rather than relying on the analyst's subjective choice of anchor points, pivot selection here is fully algorithmic, using a symmetric local-extremum test to ensure each point used is objectively the highest or lowest price within its surrounding window.
The core statistical assumption underlying any trendline-break system is that price trends exhibit a degree of serial correlation, meaning that the rate of ascent or descent between swing points tends to persist for some period before mean-reverting or reversing, and that a violation of the most recent, steepest rate of change is informative about a shift in that underlying process. This is conceptually related to the broader family of change-point detection methods used in time-series analysis, where a structural break in a fitted trend line is used as a signal that the data-generating process has shifted regime. The ATR-based position sizing layered on top draws from the well-established use of Average True Range as a volatility-normalized unit of risk, a concept popularized in behavioral and quantitative trading literature as a way of scaling stop and target distances to the instrument's own recent volatility rather than using arbitrary fixed-point distances, which do not generalize across different assets or market conditions.
⚠️ 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. Wskaźnik

Trend Channel Navigator [MQLSoftware]Trend Channel Navigator maps price action as a chain of trend phases, each drawn as its own channel: phase boundaries come from an adaptive swing scanner whose window breathes with the volatility regime, each channel side sits at a quantile of its own deviations instead of a symmetric envelope, a recency-weighted regression tracks the momentum slice inside the active phase, and an original Navigator Entry Score condenses channel position, momentum quality and higher-timeframe agreement into a single 0-100 confluence read - shown live on the panel together with its full component breakdown.
This is a visual analytical tool for chart reading and market-structure context. It does not execute trades and does not provide financial advice.
Key Features
Adaptive phase detection: the swing window scales with the volatility regime, so phases are recognized sooner in a heating market and noise swings are ignored in quiet tape
Asymmetric quantile channels: each side's width is a percentile of that side's own deviations, so one spike no longer inflates the whole envelope and the top and bottom bands are independent
Recency-weighted Micro regression: the newest bars dominate the fit, so the momentum read turns earlier than a uniform regression; a weighted R-squared gate hides it when the fit is poor
Navigator Entry Score: a 0-100 confluence read built from four weighted components - macro/micro alignment, channel position, regression fit quality and dual-timeframe agreement
Live Score Breakdown on the panel: every component's points are shown next to its budget, so the number is never a black box
Scored markers: every structural event (BREAK, PULLBACK, CONTINUATION) prints the matching side of the live score and passes a configurable minimum, and the dedicated ENTRY marker fires when the score crosses your threshold
Pullback Zone and Quarter Grid: the favorable quarter of the active channel is shaded and faint quarter lines make Channel Position readable on the chart itself
Self-explanatory chart language: markers and labels are written in plain words, every marker and pivot carries an explanatory tooltip, and a Compact mode switches to short codes
Non-Repaint Mode on by default: markers fire only on confirmed bars and the active structure is built from closed-bar data
Core Concept
Most channel tools on TradingView take one of two approaches. They fit a single regression channel over the latest N bars, or they draw one channel from manually chosen anchors. Both force all recent history into one line fit, so the chart cannot show where one trend phase ended and the next began.
Trend Channel Navigator treats price as a sequence of structural phases. The phase idea started in our earlier open-source script Anchored Trend Channels; Navigator rebuilds the engine around five mechanisms of its own - the detection, the channel geometry, the momentum fit, the score and its on-chart language all differ from that script.
1. Adaptive phase detection. Swings are found by a strict-extremum scan whose window is re-derived on every bar from the volatility regime - the ratio of short-term ATR to its long baseline. When the market heats up the window contracts and new phases are recognized sooner; in quiet tape it dilates and noise swings never become phases. Builtin pivot functions take a fixed window, which is why the scanner is written by hand. A swing is confirmed a window's worth of bars after it forms, exactly like a classic pivot. When a later swing confirms beyond a phase's endpoint in the same direction - a higher high in an up-phase, a lower low in a down-phase - the phase extends to that new confirmed swing instead of leaving an orphan stretch, so the chain of channels stays continuous.
2. Asymmetric quantile channels. The channel basis is the straight line between the two anchoring swings, which keeps clean joints between phases. The width is not a symmetric envelope: highs above the basis set the top band and lows below it set the bottom band, each at a configurable percentile of its own deviations with an ATR floor. A single spike no longer inflates the whole channel, and a phase that leans on one side of its basis shows that lean honestly.
3. Recency-weighted Micro regression. The inner channel is a weighted least-squares fit in which each bar back weighs a fixed fraction of the previous one, so the newest bars dominate and the momentum read turns earlier than a uniform regression of the same length. The fit quality gate and the residual band use the same weights. Setting the decay to 1.00 reproduces the classic unweighted fit.
4. Navigator Entry Score with a live breakdown. The score is computed independently for the long side and the short side on every bar. Macro and micro direction agreement contributes 35 points, channel position contributes up to 20 and rewards proximity to the favorable edge rather than chasing the far edge, the micro fit quality contributes up to 20, and each of the two higher-timeframe rows contributes 12.5 when it agrees with the side being scored. The panel shows each component's points next to its budget on every bar, so the number is never a black box. An ENTRY marker fires once when the winning side crosses the threshold on a confirmed bar, with its own cooldown; an optional strict mode caps the score below the threshold unless both higher timeframes agree. The other marker families pass through the same score: BREAK, PULLBACK and CONTINUATION print the matching side's value and respect a configurable minimum, so every event on the chart is a scored event.
5. Pullback Zone and Quarter Grid. The score's channel-position component is made visible: the favorable quarter of the active channel is shaded - near the base in an up phase, near the top in a down phase - and faint quarter lines split the channel into the quarters the Channel Position row reads. The channel does not only show where price has been; it shows where the next trend-side read matters.
Anatomy of the Display
Macro channels are the large structures between confirmed swing points. Historical phases are dimmed and frozen; the active phase is bright, carries the shaded Pullback Zone, and extends forward with a dashed projection.
The Micro channel is the smaller regression channel inside the active phase, labelled "Momentum" with its current direction. It shows whether the current momentum slice agrees with the larger phase or is pulling back against it.
Markers name their event in plain words and print the matching side of the live score. BREAK marks a confirmed close beyond the active channel boundary, PULLBACK marks a touch of the favorable edge in trend direction, CONTINUATION marks a micro breakout aligned with the macro phase early in the segment, and ENTRY belongs to the score engine and fires on a threshold cross. Every marker carries a tooltip that explains the event.
The status badge shows the Trend Bias of the recent phases and the live Entry Score with its stronger side.
The panel is the main readout: Trend Bias, active segment angle, direction and age, the chain of recent phases, Channel Position, anchor pivot, channel width in ATR, the last fired event, micro regression metrics, the two higher-timeframe rows, and the live Entry Score against your threshold - followed by the Score Breakdown, where each of the four components shows its current points against its budget.
Multi-Timeframe Panel
The two higher-timeframe rows are selected automatically from a standard ladder based on the chart timeframe, for example 240 and 1D on a 1-hour chart. Higher-timeframe values are requested without lookahead and read with a one-bar offset, so only closed higher-timeframe bars are used. Their agreement is not only displayed - it feeds the Entry Score directly.
Notes on Repainting
Historical channels do not repaint intrabar. They are anchored to confirmed swings, and one honest exception is stated openly: when a same-direction swing confirms beyond a phase's endpoint, the completed channel extends to that new confirmed swing and its width is recomputed - on closed data only, at confirmation time. It never moves otherwise.
Swing detection carries an inherent delay equal to the current window: a swing becomes visible only after that many bars close past it. With the Adaptive default the window typically resolves to 11-26 bars, tighter in heating markets. This confirmation contract is the same as for all pivot-based tools.
Non-Repaint Mode is on by default: the active channel and the micro regression are computed from closed-bar data, so the visible structure does not wobble intrabar. Turning it off lets the active structure update on the live bar for responsiveness; this affects display only.
All markers are gated by confirmed bars. ENTRY, BREAK, PULLBACK and CONTINUATION can only appear on the close of their bar and cannot appear or vanish intrabar.
Higher-timeframe rows use the standard non-repainting pattern: no lookahead, one-bar offset, closed bars only.
The panel and the live score update within the bar. This is display only; no marker or alert is created from an unconfirmed bar.
Typical Analysis Workflow
A common analytical workflow may include:
Reading Trend Bias and the active phase direction first to understand the current structure
Checking Channel Position to see whether price is near the favorable edge or already stretched toward the far edge
Waiting for price to reach the shaded Pullback Zone in the direction of the active phase
Using the Momentum channel and its fit quality to judge whether the current slice is clean enough to trust
Checking the higher-timeframe rows for agreement
Treating the Entry Score as the final confluence read rather than a standalone trade command, and raising the threshold when you want fewer, higher-confluence marks
Configuration
Pivot Sensitivity - Adaptive (default) scales the swing window with the volatility regime; the fixed presets from Short to Very Long and Custom Lookback pin it instead.
Min Segment Size (x ATR) / Min Segment Length (bars) - quality filters that skip noise phases.
Channel Width Multiplier / Min Band Width (x ATR) - how tightly the channel wraps price and the floor under each side's width.
Channel Quantile (%) - the percentile each side's width sits at. 100 reproduces a full envelope; lower values ignore single spikes and hug price tighter.
Max Segments Stored - how many historical phases stay on the chart.
Regression Length / Std Dev Multiplier / Min R2 to Show - the Micro channel window, its band width and its fit gate.
Recency Weight (decay) - how strongly the newest bars dominate the Micro fit. 1.00 = classic unweighted regression.
Segment Break / Macro Pullback / Micro Continuation Signals - enable each marker family independently. Signal Cooldown - minimum bars between same-family markers.
Min Signal Score - structural markers only fire when the matching side of the live score is at least this value. 0 = raw structural events.
Entry Score Threshold - the confluence level an ENTRY marker requires. Require MTF Confluence - strict mode: both higher timeframes must agree for the score to reach the threshold. Entry Cooldown - minimum bars between ENTRY markers.
Non-Repaint Mode - closed-bar data for the active structure (default on).
Line Width / Neon Glow - core line width and the layered glow tier (Off, Subtle, Balanced, Bright).
Show Channel Fills / Show Basis / Show MTF Mini-Screener - display toggles.
Marker Style - Descriptive markers in plain words, or Compact short codes.
Highlight Pullback Zone / Show Quarter Grid - the shaded favorable quarter of the active channel and the faint quarter lines.
Bull / Bear Colors - recolor the whole structure. Defaults are a dark-theme identity; pick deeper tones for light charts.
Markets and Timeframes
The indicator can be applied across multiple markets and timeframes:
Forex
Stocks and Indices
Commodities
Cryptocurrencies
Channel widths and segment filters are scaled in ATR rather than in fixed price units, so behaviour stays consistent across instruments. Defaults are tuned for 1H-4H charts; Pivot Sensitivity is the lever for faster or slower timeframes.
Alerts
Segment Direction Changed - the active phase flipped direction
Segment Break - a confirmed close beyond the active channel boundary
Micro Continuation - a micro breakout aligned with the macro phase
Entry Score - the score crossed your threshold on a confirmed bar
All alerts evaluate on confirmed bars and respect the same cooldowns and score gates as the chart markers, so an alert fires only when the corresponding marker event fires.
Wskaźnik

YURI Breadth Regime EngineAn index is capitalisation weighted. A handful of large members can hold the whole thing up while most of the list quietly breaks down underneath, and the price chart will not show you that, because the price chart is the weighted number. The count is a different number. This reads the count and tells you when the two have stopped agreeing.
THE TWO THINGS IT MEASURES
The level is how much of the list is participating right now. The default series is the percentage of S&P 500 members trading above their own 200 day moving average. Four bands: washout below 20, weak below 40, neutral below 60, strong above it. Below 20 has historically been forced selling rather than opinion, because most of the list is under its own annual average at the same time. Those readings cluster near the end of declines rather than the start. That is an observation about where they have occurred, not an instruction to buy them.
The participation read is a different question: is the index outrunning its own members. That is a question about speed rather than position, so each series measures how far it has moved over the same window and that move gets ranked against its own history. Percent for the index, because a 50 point move meant something different at 2000 than it does at 7000. Points for breadth, which is already bounded at 0 and 100. The gap between the two ranks is what gets read, and ranking is what makes a price and a percentage comparable at all.
Index in the top of its own distribution of moves while breadth is in the bottom of hers is thinning. Fewer names are carrying it. Breadth moving up harder than the index is broadening, and it is what the back end of a washout looks like.
Ranking positions instead of moves is the obvious way to build this and it does not work, which is worth saying because the failure is instructive. An index drifts upward, so its position rank pins at the top of its range for months at a time. That builds a permanent bias into the gap, and it quietly collapses the whole read into "breadth is low", which is something the level already tells you. A move measured over a fixed window is centred on its own history by construction, so it has neither problem.
WHY BOTH, AND NOT JUST THE LEVEL
The level tells you where participation is. It does not tell you which way it is going relative to price, so a level read is equally happy at 55 on the way up and 55 on the way down. The participation read tells you the direction of the disagreement but has no sense of absolute position, so it will call thinning at 75 and at 35 without distinguishing between them, and those are very different markets. Neither one is sufficient. Read together, the level says how much of the list is in, and the rank gap says whether that number is keeping up.
THE PART THAT ACTUALLY MATTERS
A new participation state has to hold for several bars before it replaces the current one.
Drop that and this becomes a threshold that flips every time the rank gap wobbles across the line, and within a month you have learned to ignore it. The hold period is the difference between a regime read and a flicker. It is exposed in the inputs. One bar makes it reactive and noisy, ten makes it stubborn and late, and there is no correct answer, only the one that matches how often you are willing to change your mind.
READING IT
The line is the breadth percentage, coloured by band. Red zone is washout, teal zone is strong.
Orange triangle near the top of the pane: participation just turned thinning.
Teal triangle near the bottom: participation just turned broadening.
The table carries the live reading, the current band, how many bars breadth has been sitting under the washout line, and the participation state with the raw rank gap in brackets. That bracketed number is worth watching on its own, because it moves before the label does. A gap climbing through the high twenties tells you the state is about to be named while the hold period is still counting.
SETTINGS THAT MATTER
The breadth series and the index have to be the same index or the comparison is noise. The default pairing is INDEX:S5TH against SP:SPX. If you switch to a Nasdaq or Russell breadth series, switch the index with it.
The move window sets what counts as "has moved". Shorter makes the participation read sensitive to swings inside a trend, longer makes it a read on the trend itself. The ranking window sets how much history each move is judged against, and nothing reads at all until both windows have filled.
The thinning and broadening gaps are separate inputs because there is no reason the two sides have to share a number. Left equal at 30 they fire about as often as each other, so if you want one side more sensitive, move that one and leave the other alone.
WHAT IT WILL NOT DO
It does not generate entries or exits, and it is not a forecast. It describes the state of participation as of the current bar, and what you do with that is your method, not mine.
The breadth series prints once a day and has no intraday history. On an intraday chart the daily value is pulled instead, so the line steps rather than curves and the current day's value keeps moving until the close. It settles when the day does. Daily or higher is where this is meant to run.
If the external series is unavailable on your plan or your symbol, the pane turns orange and the table reads NA rather than plotting a flat line that could be mistaken for a real value.
Breadth is a coincident measure of participation, not a leading one. Washouts are identifiable in hindsight far more cleanly than they are while you are standing in one, and a thinning read can persist for months in a market that keeps going up. This is context for a decision, not the decision.
Wskaźnik

YURI Session Regime Engine# Publication description: YURI Session Regime Engine
Paste into the TradingView publish dialog, page 1. Keep the bold headers, drop the
markdown hashes if the editor does not render them.
Categories used: Trend Analysis, Volume, Chart Patterns
Suggested keywords: day type, regime, opening range, session, intraday, VWAP
---
Most intraday losses I have looked at come down to running the wrong playbook for
the day. Buying pullbacks on a session that never trends. Fading the edges on one
that never comes back. By the time the character of a session is obvious on the
chart, the move it was going to give you has usually already happened.
This labels the session while it is still forming.
**How it decides**
Five checks vote on direction, and each one covers a blind spot in the others.
1. Which side of session VWAP price is trading
2. Whether VWAP itself is rising or falling, measured across the last 75 minutes
3. Whether the opening range has broken
4. Where the higher timeframe trend points, hourly close against its 20 period SMA by default
5. Whether price has cleared the prior day's high or low
Four votes out of five makes it a trend day. A gap larger than 2 percent that
trades back through the session open gets labelled a gap fill. Price still sitting
inside the opening range well after the open, with a quarter of the range width
allowed either side, is a range day.
Each of those five is weak on its own. VWAP position whipsaws in chop, the
opening range fails on gap mornings, and a higher timeframe read is always late by
construction. Prior day levels tell you nothing at all about today. What makes the
combination worth more than its parts is that they fail in different places, so
requiring agreement across all five stops any single one of them from driving the
label.
**The part that actually matters**
A new label has to hold for 25 minutes before it replaces the current one.
Drop that layer and this becomes every other conditional colouring script. Price
wicks back through VWAP, the label flips, it flips back ten minutes later, and
within a week you have learned to ignore it. The hold period is what makes the
output stable enough to be worth reading. Set it to 10 minutes if you want it
reactive, an hour if you want it stubborn.
**Reading it**
TREND UP / TREND DOWN: four or more of the five checks agree on direction.
RANGE: price is still inside the opening range plus a quarter of its width either
side, well after the open.
GAP FILL UP / GAP FILL DOWN: the session gapped hard and has since traded back
through its own open.
MIXED: the opening range has formed but nothing has agreed strongly enough to name
the day. Days that stay here are the ones worth trading small.
OPENING: the opening range has not finished forming and there is not enough
information yet.
The table carries the live vote count on both sides. Three votes up and rising
tells you more than the label does, because it shows a regime change building
before the hold period lets it commit. What you do with any of this is your
method, not mine. The label is an input to that decision.
**What it will not do**
It describes what has already happened. It is a classification of the session so
far, and it will not tell you where to enter or where to get out.
The first 15 minutes are always OPENING, by construction. Once the session ends
the day keeps whatever label it closed with until the next one starts, because
judging a finished day against a frozen VWAP would be meaningless.
If you set the context timeframe below your chart timeframe, that vote gets
dropped instead of being computed on partial bars. The table tells you when this
happens.
It assumes an instrument with a defined regular session. On 24 hour markets the
session logic loses most of its meaning.
Time thresholds are set in minutes and converted to bars internally, so the same
defaults behave the same way on a 1, 5 or 15 minute chart. It was built for US
equity index sessions. Every threshold is exposed in the inputs, including the
vote count needed for a trend day, so you can tighten or loosen it for whatever
you trade.
Wskaźnik

SBP Structural State DetectorSBP Structural State Detector is a rule-based analytical indicator designed to identify confirmed changes between bullish and bearish structural states. It does not attempt to predict exact market tops or bottoms. Instead, it evaluates whether current price behaviour provides sufficient evidence that the prevailing directional state has changed.
The script uses one integrated calculation process. It does not require another indicator, external script, higher-timeframe data source, or manual confirmation tool.
Core Method
The calculation begins by measuring price-path efficiency. This compares the net movement of price with the total distance travelled over the same period. A more direct price path receives a higher efficiency reading, while irregular movement produces a lower reading.
That efficiency value controls the response rate of an internal structural centre. The centre adapts more quickly when price movement is directional and more slowly when movement is noisy. The centre is used internally and is not drawn as a separate trendline.
A volatility-normalized structural band is then calculated around the internal centre. Its width expands when price behaviour is less efficient and contracts when movement becomes more orderly. This makes the visible band responsive to both volatility and market noise rather than relying on a fixed price distance.
Directional qualification uses five related observations:
1. Price location relative to the internal structural centre.
2. Normalized displacement from that centre.
3. Direction of the structural slope.
4. Volatility-normalized momentum.
5. Candle direction, body expansion, and closing location.
A bullish or bearish candidate must receive the required level of evidence and must exceed the evidence supporting the opposite direction. The condition must then persist before it can reach the final event process.
Signal Behaviour
All events are evaluated on confirmed bars.
The final event process enforces strict alternation. After a BUY event, another BUY cannot be accepted until a SALE event has occurred. After a SALE event, another SALE cannot be accepted until a BUY event has occurred.
The Minimum Signal Gap setting specifies the minimum number of confirmed bars required between accepted opposite-direction events. It is a spacing control and does not create same-direction re-entry signals.
Chart Display
The Structural State Band changes colour according to the last accepted directional state:
Green indicates that the last accepted event was bullish.
Red indicates that the last accepted event was bearish.
Gray indicates that no directional event has yet been accepted in the loaded chart history.
BUY and SALE triangles identify accepted state changes. They are placed outside the candle using an ATR-based visual distance so that the markers remain readable without changing their event bar.
Inputs
Minimum Signal Gap: Controls the minimum number of confirmed bars between accepted opposite-direction events.
Show Structural State Band: Shows or hides the volatility- and noise-adjusted state band.
Show BUY / SALE: Shows or hides accepted event markers.
State Band Transparency: Controls only the visual transparency of the band and does not affect calculations or events.
Alerts
Two alert conditions are available:
SBP Structural BUY Event
SBP Structural SALE Event
Alerts should be created through TradingView's Create Alert dialog. Alert behaviour follows confirmed BUY and SALE events generated by the script.
How to Use
Apply the indicator to a standard candlestick or bar chart. Observe the band colour together with accepted BUY and SALE events. The indicator is intended to provide a consistent structural-state reference that can be considered alongside the user's own entry, exit, position-sizing, and risk-management rules.
Limitations
This is an indicator, not a strategy. It does not place orders, calculate position size, provide stop-loss levels, provide profit targets, or report backtested performance.
Signals are based on historical and current confirmed price data. Confirmation introduces delay, especially when price changes direction rapidly. Sideways or volatile markets can produce alternating state changes. The Minimum Signal Gap can reduce closely spaced events but cannot eliminate false or late signals.
The indicator does not guarantee accuracy, profitability, or future market direction. Past chart behaviour does not ensure similar future behaviour. Use standard charts for signal interpretation and conduct independent analysis before making trading decisions. Wskaźnik

Untested Levels - PD Highs, Lows & GapsUntested Levels automatically maps the session prices futures traders commonly mark by hand: previous regular-session highs and lows, current and prior overnight highs and lows, previous closes and unfilled gap levels, plus the all-time high.
The purpose is simple: spend less time redrawing levels every morning and keep important price context visible as the market develops. Each line begins where its high, low, or close was established and is labeled with both its name and exact price.
The indicator is designed around the session structure of CME equity index futures, particularly Nasdaq futures (NQ/MNQ) and S&P 500 futures (ES/MES). Its session times are fully configurable, so the same framework can be used with other futures markets whose trading sessions are defined appropriately.
WHY IT IS DIFFERENT
Many session-level tools either show only the most recent day or remove a level as soon as price reaches it. This indicator maintains a structured history and treats a level's first breach separately from its display timing.
By default, a prior level that is breached during the current trading day remains visible until the day rolls over. This preserves the line for the rest of the session, allowing you to see whether a former high or low is subsequently respected, rejected, or used as support or resistance. If you prefer immediate removal, the "Hide breached levels immediately" setting is available.
Regular-session highs and lows, overnight highs and lows, and prior closes each have their own lookback setting. You can retain more history for one class of level without overcrowding the chart with every other class.
The calculations are session-defined rather than chart-defined. They are built from the symbol's extended-hours feed, so switching the chart between Regular Trading Hours and Electronic Trading Hours does not change the underlying levels. An RTH chart can therefore remain visually clean while still displaying the overnight high and low.
LEVEL NAMES
The numbering follows trading days, not calendar dates. The overnight session belongs to the same trading day as the regular session that follows it.
YD High / YD Low
Yesterday's regular-session high and low.
PD 2 High / PD 2 Low
The regular-session high and low from two trading days ago.
PD 3, PD 4, and later numbers continue in the same way.
YD is effectively the first prior trading day, so there is no separate
"PD 1 High" or "PD 1 Low" label.
ON High / ON Low
The current trading day's overnight-session high and low.
These update while the overnight session is forming.
ETH 1 High / ETH 1 Low
The overnight high and low associated with yesterday's regular session.
ETH 1 therefore pairs with YD.
ETH 2 High / ETH 2 Low
The overnight high and low from two trading days ago.
ETH 2 pairs with PD 2, ETH 3 pairs with PD 3, and so on.
YD Close
The most recent configured session close. This level always displays when
previous-close levels are enabled.
PD 2 Close, PD 3 Close, etc.
Older configured closes that remain unfilled by a later regular session.
These levels identify still-open historical gaps within the selected
gap lookback.
ATH
The all-time high. If a displayed high is also the all-time high, its
normal label receives an ATH prefix. If the all-time high is not one of
the displayed session levels, a separate ATH line is drawn.
SESSION CALCULATIONS
Each configured trading day is divided into three parts:
Overnight session:
Trading-day start to the regular-session open.
This produces ON and ETH highs and lows.
Regular session:
Regular-session open to regular-session close.
This produces YD and PD highs and lows.
Post-close tail:
Regular-session close to the next trading-day start.
This does not create a new session high or low, but its price action can
breach an existing level.
The default times are expressed in Pacific Time:
Trading day starts: 15:00
Regular session opens: 06:30
Regular session closes: 13:15
Close candle opens: 13:55
The time zone and all session boundaries can be changed in the settings. The "Close candle" input identifies the opening time of the candle whose closing price will be stored. If that exact candle is unavailable, the script uses the last available candle before the selected time.
WHAT COUNTS AS UNTESTED
A prior regular-session high remains unbreached until later price trades above it. A prior regular-session low remains unbreached until later price trades below it. The calculation considers price action after the level's own regular session, including that day's post-close tail, later overnight sessions, and later regular sessions.
An overnight high or low is evaluated only against price action after that overnight session ends. This prevents the price action that created the level from also invalidating it.
By default, an exact touch does not count as a breach; price must trade through the level. Enable "Exact touch counts as a breach" if you want a touch to invalidate it.
YD High, YD Low, ON High, ON Low, and YD Close remain available as current reference levels even when tested. Older PD and ETH levels are filtered according to their breach status and your selected display timing.
PREVIOUS CLOSES AND GAPS
YD Close always shows when enabled. Older closes appear as PD n Close only while their gap remains unfilled.
Gap status is based on later regular-session price action. Overnight and post-close-tail activity do not fill a close gap. This keeps the gap logic aligned with the cash-session context rather than allowing overnight movement alone to remove the level.
An alert condition is included for price touching or crossing YD Close during the regular session.
ALL-TIME HIGH
The ATH calculation combines available chart history, extended-hours intraday history, and extended daily history. If the ATH matches a displayed high, that label is prefixed with ATH and emphasized. Otherwise, the indicator creates a standalone ATH level so the price remains marked even when it falls outside the selected session lookbacks.
LOOKBACKS AND DISPLAY CONTROLS
The indicator provides independent controls for:
• Regular-session high/low lookback
• Overnight high/low lookback
• Prior-close and gap lookback
• YD, PD, ON, ETH, close, ATH, and label visibility
• Immediate or end-of-day removal of breached levels
• Exact-touch breach behavior
• Session times and time zone
• Colors, line style, line width, label size, and label offset
Separating the lookbacks makes it possible to retain a broad history of untested highs and lows while using a shorter window for overnight levels or gaps.
RTH AND ETH CHART BEHAVIOR
All session values are requested from extended-hours data, so the same calculated levels appear whether the chart is displaying RTH or ETH candles.
TradingView scripts only execute when the chart receives a bar. An RTH chart therefore cannot update live while its chart session is closed. To handle this, "Roll levels at the regular session close" is enabled by default. It advances the labels and removes levels breached during the completed day on the final regular-session bar, leaving a frozen RTH chart in the correct end-of-session state. The extended-hours feed completes the normal rollover when the next chart session begins.
For live overnight development of ON High and ON Low, use an ETH chart.
HOW TO USE THE LEVELS
These lines identify historically significant prices; they do not predict which level price will visit or how price will react when it gets there. Traders may use them as context for targets, breakouts, failed breakouts, support/resistance flips, gap fills, and confluence with their own trade setups.
The retained-line behavior is especially useful after a breach: instead of losing the reference immediately, you can observe whether price returns to the level and changes its behavior around it later in the same session.
LIMITATIONS
This indicator is intended for intraday charts. Its session calculations use an extended-hours intraday feed, set to five minutes by default. Available lookback depth depends on the amount of intraday history TradingView provides for the symbol and the user's plan.
Session defaults are designed for the stated CME equity index futures workflow. Confirm and adjust the time zone, trading-day start, regular-session boundaries, and close-candle time before using the indicator on another market.
Holiday schedules, shortened sessions, missing bars, exchange data differences, and delayed feeds can affect the levels. Use standard price charts and verify the settings for the instrument being traded.
Untested Levels is a charting and market-context tool, not a trading system. It does not provide entries, exits, profit targets, or guarantees of future support or resistance. Wskaźnik
