TIS_SwingOVERVIEW
TIS_Swing detects swing highs and swing lows and, unlike most pivot tools, publishes the last confirmed level as a continuous value that other scripts can read.
Standard pivot indicators return a number only on the bar where the pivot is confirmed and nothing on every other bar. That is fine for drawing a dot on the chart, but it makes the level unusable for comparison: on any given bar you cannot ask whether the current price is above the last confirmed swing high, because on that bar the pivot series holds no value. TIS_Swing keeps the level alive between pivots, so that question can be answered on every bar, by you visually or by another script through the source dropdown.
HOW IT WORKS
A bar qualifies as a swing high when its high is greater than or equal to the highs of the bars that follow it, and strictly greater than the highs of the bars that precede it. The number of bars checked on each side is set by Strength Left and Strength Right. Swing lows use the mirrored rule. The comparison on the right side is inclusive, so a candidate that ties with a later bar still qualifies; this produces slightly more pivots than a strictly greater definition, and is intentional.
A pivot can only be confirmed once the bars to its right exist, so a pivot is always confirmed Strength Right bars after it forms. It is never confirmed earlier and it is never revised afterwards, so nothing repaints.
Once a pivot is confirmed, its price becomes the current level for that side and stays there until the next pivot on the same side replaces it. When the series trades through the level, the level is marked as broken. What happens next depends on Remove Broken Pivot Lines:
- ON, the default: the visible level is dropped and no level is shown until a new pivot forms. This is the familiar behaviour of most pivot tools.
- OFF: the visible level stays where it was until a new pivot replaces it, so a broken level remains on screen as a reference.
Either way, a second pair of values keeps the last level regardless of the setting. Those are the plots marked (persistent), and they exist so that comparisons are always possible.
WHAT YOU CAN DO WITH IT
Market structure on price. With the level available on every bar, a higher high is simply the current price trading above the last confirmed swing high, and a lower low is the mirror. You can read it off the chart or compute it in your own script by selecting Last Swing High (persistent) as a source and comparing it against the close.
Divergence on an oscillator. Turn on Use Other Source, point it at a stochastic, an RSI or any other plotted series, and move the script to its own pane. The pivots are then detected on the oscillator instead of on price. A higher swing low on the oscillator while price is still making lower lows is a classic divergence, and here it is visible as a stepped level moving up while price moves down.
Breakout timing. With Remove Broken Pivot Lines on, the moment the level disappears is the moment the last swing was taken out. That transition is also available as an alert.
PARAMETERS
Parameters
- Strength Left: bars to the left of the candidate that must be lower for a high, or higher for a low. Default 5.
- Strength Right: bars to the right required to confirm the pivot. Also the confirmation delay, in bars. Default 2.
- Remove Broken Pivot Lines: drop the visible level once it is broken. Default on. Does not affect the (persistent) plots.
- Use Other Source: detect pivots on another plotted series instead of the bar highs and lows. Both sides then use the selected series.
- Source: the series used when Use Other Source is on.
Visual Settings
- Show Levels: opacity of the stepped level lines.
- Show Persistent Levels: opacity of the thin lines that always keep the last level. Off by default to keep the chart clean.
- Show Pivot Markers: diamonds drawn on the confirmed pivot bars.
- Extend to the Right: horizontal line projected forward from the last pivot on each side.
- Swing High Color, Swing Low Color, Line Width, Extension Line Style.
The Show options change opacity only. The four series are always published, so another script can read them even when they are not visible on the chart.
OUTPUTS
Four values are available in the source dropdown of any other indicator or strategy:
- Last Swing High and Last Swing Low: the level as shown, honouring Remove Broken Pivot Lines.
- Last Swing High (persistent) and Last Swing Low (persistent): the last confirmed level, kept regardless of that setting.
Four alerts are available: New Swing High, New Swing Low, Swing High Broken, Swing Low Broken.
LIMITATIONS
- A pivot is confirmed Strength Right bars after the bar that forms it. On the chart this looks like a delay, and it is one. It is inherent to any pivot definition that requires confirmation from the right, and it is the price of not repainting.
- These levels are reference points, not entry signals. Nothing here tells you which way to trade.
- With Remove Broken Pivot Lines on, the level is dropped on the same bar as the break. A comparison such as close above Last Swing High will therefore never be true, because the value is already gone by the time it would be. Use the (persistent) plots for that comparison, or detect the break as the transition of the visible plot to no value.
- Before the first pivot on a side is confirmed, that side publishes no value.
- Pine fixes the pane at compile time, so with a non-price source the script has to be moved to its own pane manually.
- Larger Strength values give fewer and more significant levels but a longer confirmation delay. There is no setting that avoids that trade-off. インジケーター

Smooths Heat Seeker Liquidity MapOverview
This indicator maps resting liquidity by detecting confirmed swing highs and lows at three independent lookback lengths, then rendering each one as a zone that visibly fades the longer it goes untouched. Instead of a static box that holds one shade until it's swept, each zone is built from small time-segments, and each segment locks in whatever color the zone's fade formula produces at the moment it's drawn — so a single zone shows a genuine gradient across its own lifetime, brightest where it formed and dimmer toward the present if nothing has happened to it since.
Concepts used
Tiered pivot detection: ta.pivothigh()/ta.pivotlow() run at three separate lookback lengths (Fast/Mid/Slow). A pivot only confirms after "Confirmation Bars" bars have passed with no higher high / lower low, which is what prevents repainting the level's location after the fact.
Age-based color decay: each level stores the bar index it was formed on. Every time a new segment is drawn, the indicator computes how many bars old the level is, runs that through a decay curve (fadeStrength input controls the curve's steepness), and converts the result into a transparency value for that segment only. Because past segments are never redrawn, the visual history of the fade is preserved rather than the whole zone jumping to one shade at once.
Mitigation vs. retest: a level is deleted the instant price crosses it (wick or close, user's choice) — that's treated as the liquidity being consumed. If price merely touches the level without crossing it, and "Refresh Fade On Retest" is on, the level's age resets to zero, so a level that keeps getting defended stays bright while one that's simply being ignored keeps fading toward removal.
Tier-priority merging: if a new pivot lands at the same price as an existing level, the indicator keeps the higher tier rather than creating a duplicate zone, so a level significant on the Slow lookback doesn't get visually diluted by a Fast-tier duplicate sitting on top of it.
How to use it
Add it to any chart/timeframe with default settings. Brighter zones are recent or actively-retested liquidity; dimmer zones are levels the market has drifted away from without touching. Use Fast/Mid/Slow tier colors to separate minor intraday levels from more structurally significant ones, and adjust Fade/Lifetime, Fade Strength, and Cell Width to control how far back the map looks and how coarse or smooth the fade appears.
Originality
This is not a combination of other publications — there's a single detection-and-rendering pipeline here (pivot detection → age tracking → per-segment decay → mitigation/retest handling), and every part of it was written for this script. No code, calculations, or visual techniques are reused from another publication.
Inputs
Fast / Mid / Slow — pivot lookback lengths for the three liquidity tiers
Confirmation Bars — bars required after a swing point before it's confirmed
Mitigate On — wick or close removes a level
Fade/Lifetime, Fade Strength, Cell Width — control how long a zone lives and how its decay curve is shaped
Refresh Fade On Retest — restarts a zone's age on an unmitigated touch
Box Height Multiplier — sets zone thickness as a multiple of ATR
Weak / Mid / Strong colors — one color per tier
This indicator has no signals, alerts, or trade markers — it's a pure visualization of where liquidity currently sits on the chart, and how fresh or stale each level is. インジケーター

Divergence Confirmation Oscillator [Pineify]Divergence Confirmation Oscillator
Overview
This RSI divergence indicator starts from one timing fact: a pivot is knowable only after its right-side bars close. It scores regular and hidden events, showing both the formation location and the later confirmation time.
Problem Definition
A divergence line drawn back to a pivot can look actionable there, although several bars were still required to confirm it. Binary markers also give equal weight to shallow disagreements and well-separated price/RSI moves. The failures are timing ambiguity and absent evidence quality. This script exposes the delay and ranks completed events; it does not assume divergence predicts reversal.
Design Rationale
Price pivots are the anchors, with RSI sampled on those exact bars. A solid diagonal shows formation; a dotted track from the second pivot to the confirmation bar shows knowledge time. Quality combines spacing, ATR-normalized price movement, RSI movement, threshold context, and RSI departure by confirmation. ATR avoids raw-point scale dependence. Unconfirmed turns would appear earlier, but would break the timing invariant. The chosen tradeoff is delay and selectivity for auditable events.
Key Features
Confirmed regular/hidden bullish and bearish divergence.
Adjustable 0–100 quality gate.
Pivot bridge plus confirmation wait track.
Bounded follow-through, invalidation, or expiry state.
Four close-confirmed alerts and optional dashboard.
How It Works
RSI uses closes. Price highs/lows become pivots only after the configured bars on both sides; processing occurs when the right-side bar closes.
Regular bullish means lower price low and higher RSI; hidden bullish means higher price low and lower RSI. Bearish definitions are symmetric at highs.
Only consecutive confirmed pivots inside the separation range interact. Each new pivot becomes the next reference even if no event passes.
The score weights spacing 25%, ATR-normalized price displacement 25%, RSI displacement 25%, threshold context 15%, and departure from the second pivot 10%. Price ATR and RSI delta inputs define full component scores.
Passing events receive a solid bridge, a dotted pivot-to-confirmation track, and a REG/HID label with Q at confirmation. Nearby labels rotate through three vertical lanes.
After confirmation, the watch records favorable ATR movement or RSI midpoint reclaim as follow-through, a buffered close beyond the pivot as invalidation, or the time limit as expiry. Circles and crosses mark these later outcomes without duplicate edge text; they are not alert signals.
Warm-up requires valid RSI, ATR, and pivot history; invalid spacing suppresses events.
How Multiple Indicators Work Together
Price pivots supply auditable anchors; RSI measures momentum there; ATR normalizes price distance; the score ranks the completed disagreement; and the lifecycle observes only later evidence. Removing any part changes the result: without pivots timing is undefined, without RSI divergence disappears, without ATR price scale leaks into quality, and without the wait track confirmation delay is hidden. This is one causal chain, not an unrelated mashup.
Trading Ideas and Insights
Regular events show price extending while RSI disagrees; hidden events show price holding structure while RSI pulls back. Compare the confirmation bar, Q, and lifecycle before forming a thesis. Repeated invalidation suggests retuning the pivot scale. The indicator supplies no entry, stop, size, or expected return.
Unique Aspects
Confirmation geometry is the structural contribution. The diagonal shows where the relationship formed; the dotted track and label show when it became knowable. Five score components rank evidence without altering RSI, and the bounded lifecycle keeps later behavior separate. A historical bridge is therefore created at confirmation, not proof of availability at the pivot.
How to Use
Start with defaults. Cyan/green lower labels show bullish confirmations; orange/red upper labels show bearish ones. Nearby labels rotate through three lanes. Follow the dotted track to confirmation and read Q. Triangles mark events; circles/crosses mark later outcomes named in the dashboard. Use the four close-confirmed alerts.
Customization
Short pivot sides reduce delay but admit noise; long sides select broader swings and confirm later. Separation limits choose pivots. Price ATR, RSI delta, quality, and context calibrate scoring. Follow distance, buffer, and window control lifecycle. Label spacing sets the clustering window. Visual layers and retained events are switchable.
Assumptions and Limitations
Confirmed does not mean correct or profitable. Pivots lag, and historical bridges are drawn only at confirmation. Events and lifecycle changes require a closed bar. ATR is scale, not probability. Consecutive-pivot logic can miss a relationship that skips an intermediate pivot. Trends may invalidate regular divergence; ranges may create many pivots; gaps, thin trading, parameters, and synthetic chart prices can distort results. The script uses chart OHLC only, requests no external or lower-timeframe data, infers no order flow, and performs no execution backtest.
Conclusion
The oscillator makes RSI divergence auditable through confirmed anchors, scale-aware quality, explicit knowledge time, and bounded follow-up. It exposes delay and evidence while preserving uncertainty.
インジケーター

Premium + Discount Ranges (M1D)Premium + Discount Ranges
Measures the range you are trading inside, the way it is read by eye from the newest swing point on a chosen timeframe across to the swing of the opposite kind, split into premium and discount either side of an equilibrium. Three ranges can run at once, each on its own timeframe, so an execution range can be read inside the higher one that frames it.
Two ways to bound a range
Period takes the timeframe's own high and low so far: one month is one range, it starts empty at the open and is gone at the rollover. It answers where price sits in the month.
Swing takes the newest confirmed swing high across to the newest swing low on that same timeframe, which owes nothing to the calendar and can run across many periods. It answers which structural range price is inside right now.
Each range picks its own mode, and the chart says which: "1M High" is this month's high, "1M Swing High" is the monthly swing high.
What counts as a swing
A swing is a level price actually turned at, not merely a high that sits above its neighbours while price kept running the same way. The candle has to hold the extreme against a chosen number of candles either side of it, and by default it also has to mark the change of direction — a swing high on the turn from an up candle to a down one, a swing low on the turn from down to up. That second condition can be switched off to accept any candle holding the extreme, regardless of what it turned into.
Every swing is read from candles already closed on its own timeframe, one bar clear of the newest bar, so nothing on a forming higher-timeframe candle can confirm or unconfirm it.
The raided edge
A confirmed swing is the last level price turned at, which is not always the edge of the range being traded right now — the moment a boundary is taken, the real range is already wider than the swings describe. Each boundary is carried out to the extreme price has actually reached since its swing confirmed, and draws dotted while it is out there: a level price has not yet turned at is a raid in progress, not structure. It settles back to solid the moment a new swing confirms behind it. This can be switched off to pin both boundaries to confirmed swings only, with price free to trade outside the range.
Direction and shading
The range is read from whichever swing formed most recently. A new swing low means price has already turned up away from it, so the leg is bullish and discount is the side being worked from; a new swing high reads the other way. The first range is shaded premium and discount by default; the shading can optionally lean toward the side being worked from, fading the other side back. Ranges two and three draw as bare levels by default so a bias range never muddies the range being traded.
Anchoring and labels
Every boundary starts at the candle that set it, never drawn back across bars that closed before that price existed. The equilibrium and the shading begin at the later of the two swings, because a range has no midpoint until both ends exist.
Each range's names can follow the global label settings or override them: centred over the range's own span, to the left, to the right, at the swing that set the level, or off. Two names landing on the same price are merged into one label rather than left stacked; two that land close together without being the same level are separated by a blank line rather than overlapping.
The readout
One panel, two blocks. The first names each active range's timeframe, whether it fits under the chart's own timeframe, which way it is working, which half of it price is trading in, and how far through it price has travelled. The second is a calendar statistic rather than a swing one: the average daily, weekly and monthly range over a chosen number of completed periods, how much of that average the current period has already used, and a countdown to the period's close.
Alerts
Six. Price crossing into premium, price crossing into discount, price trading the equilibrium, the range high taken, the range low taken, and a new swing redrawing the range. All six read the range being traded — range one.
Method and repainting
Swings on ranges two and three are read on their own timeframe via a higher-timeframe request; range one's swing test is likewise timeframe-bound to whichever timeframe is chosen for it. Every swing reads only candles already closed, one bar back, so nothing about it depends on lookahead revealing an unclosed bar.
A confirmed boundary moves only when a genuinely new swing prints. The one part of the drawing that is live by design is a boundary carried out to a raid in progress, and it draws dotted so that is visible rather than implied.
What it will not do
It places no entries, exits, stops or targets, and it does not size a position. It draws no trend line, no bias score and no target projection beyond the range itself. It does not identify order blocks, fair value gaps or liquidity pools — only the swing highs and lows that bound the range and the equilibrium between them.
Settings
Per range: on/off, timeframe, Period or Swing, label placement override, swing strength, premium/discount shading, boundary width. Swing definition: whether a direction turn is required, whether a raided boundary is carried out to price. Shading: premium and discount colours, transparency, whether the shading leans with direction and by how much. Lines: boundary and equilibrium colour and width, how far boundaries extend past the last bar. Labels: side and nudge for the high, low and equilibrium of each range, whether premium/discount get their own names, the collision distance that separates two close labels, whether price is shown in the label, label size and colour. Readout: show/hide, position, size. Average ranges: show/hide, lookback length for each of daily, weekly and monthly, and whether the close countdown is shown.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. インジケーター

Double Tap Double Top/Bottom [Viprasol]Double Tap — Double Top / Double Bottom
═══════════════════════════════════════════════════════════
WHAT IT DOES
═══════════════════════════════════════════════════════════
Double Tap finds the two most reliable reversal patterns in classic technical analysis —
the Double Top (M) and Double Bottom (W) — draws them as they FORM, and on a confirmed
neckline break projects a complete trade map: Entry, Stop, and measured-move Target, then
tracks the outcome to ✓ or ✗. It keeps a history of recent patterns on the chart, not
just the latest one, so you can see how the tool reads structure over time.
═══════════════════════════════════════════════════════════
HOW THE PATTERN IS DETECTED
═══════════════════════════════════════════════════════════
1. Two confirmed swing highs (Double Top) or lows (Double Bottom) are found via a pivot
length you control.
2. The two extremes must match within a tolerance — a percentage of the pattern's height —
so the "double" is genuinely level, not a random pair of swings.
3. A valley (top) or peak (bottom) between them becomes the NECKLINE.
4. The pattern must span between your min and max width (bars) to filter noise.
5. While these conditions hold, the pattern is shown FORMING (a dotted preview). If price
breaks back past the twin extreme first, the setup is invalidated and the preview clears.
6. TRIGGER: a confirmed bar close through the neckline solidifies the pattern and prints
the trade levels.
Non-repainting: swings are confirmed pivots and the trigger evaluates on closed bars.
═══════════════════════════════════════════════════════════
THE TRADE MAP (drawn on every confirmed pattern)
═══════════════════════════════════════════════════════════
• ENTRY — the neckline-break close.
• STOP — beyond the higher top / lower bottom, padded by an ATR buffer.
• TARGET — the measured move: pattern height projected from the neckline (adjustable %).
On the chart: two peak markers with prices, a shaded pattern box, a dashed neckline, an
Entry line, and green/red TP/SL zones — all extending forward until price resolves them.
The pattern label then flips to ✓ (target hit) or ✗ (stop hit).
═══════════════════════════════════════════════════════════
FEATURES
═══════════════════════════════════════════════════════════
• Live "forming" preview so you see a pattern building before it triggers.
• Tracks multiple patterns across history (configurable how many to keep).
• Detect tops, bottoms, or both; full control of tolerance, pivot length, min/max width.
• Measured-move target (% of height) + ATR stop buffer.
• Dashboard: current status, active Entry / Target / Stop with % distance, and a running
hit rate (how often target was reached before stop, on the patterns shown).
• Alerts on Double Top / Double Bottom confirmation, plus a webhook-ready alert() message
(Text or JSON) carrying entry / stop / target.
═══════════════════════════════════════════════════════════
HOW TO USE
═══════════════════════════════════════════════════════════
1. Set Swing Length to the pattern size you want (larger = bigger, cleaner patterns).
2. Watch the dotted "forming" preview; act only on the confirmed neckline break.
3. Use the drawn Entry / Stop / Target as your plan; scale or exit at the target.
4. Tune Tolerance (how level the two extremes must be) to your market's character.
5. Set an alert on "Any alert() function call" for automation, or use the built-in
Double Top / Double Bottom conditions.
═══════════════════════════════════════════════════════════
HONEST LIMITATIONS
═══════════════════════════════════════════════════════════
• Pattern recognition is inherently subjective; this uses one consistent rule-based
definition — it won't catch every double a human would draw, and vice versa.
• The dashboard's hit rate is a simple tally of the patterns currently shown (target-before-
stop), not a full backtest — use it as a feel, not a performance guarantee.
• Swings confirm after the fact (pivot lookback), so patterns appear with a natural lag.
• This is a decision-support tool, not financial advice. Manage your own risk.
═══════════════════════════════════════════════════════════
CREDITS & ORIGINALITY
═══════════════════════════════════════════════════════════
The double top / double bottom is public, classic technical analysis; ATR is J. Welles
Wilder's public concept. Every line of Pine here — the pivot-pairing detection, the
tolerance/neckline/measured-move logic, the forming preview, the multi-pattern tracker,
and all visualization — is original Viprasol work written from scratch. No third-party
Pine code is reused.
インジケーター

Confirmed Structure Transition Map [Pineify]Confirmed Structure Transition Map
Overview
This Pine Script v6 indicator separates confirmed swings, break-of-structure events, and direction candidates. A finite state appears as a stepped price corridor.
Problem Definition
A common baseline finds fractal highs and lows, then labels any crossing BOS or CHoCH. It hides the pivot bar, the later confirmation bar, and the still later break. One level may emit repeated labels, while one counter-break may be called a reversal. Label density replaces a distinction between swing formation, continuation, and transition. This script separates those events and never triggers an earlier break with future information.
Design Rationale
Confirmed pivots provide stable levels; a moving extreme has no fixed identity. Each high and low becomes a one-use rail. A break with the bias is BOS; the first qualified counter-break is only a potential CHoCH. Bias changes after a fresh rail breaks again in that direction. Crossing the frozen opposite rail or age limit cancels the candidate. This rejects immediate reversal on one counter-break. The tradeoff is lag for explicit evidence. ATR scaling filters tiny overruns but does not estimate probability.
Key Features
Optional confirmed HH, LH, HL, and LL labels.
One-use rails that suppress duplicate breaks.
BOS, potential CHoCH, shift, invalidation, and expiry states.
ATR displacement, state corridor, alerts, and dashboard.
How It Works
The script reads chart OHLC and a symmetric pivot window. A pivot is accepted after its right-side bars close. Its price and index are stored, compared with the prior same-type pivot, and armed as a rail. If price already exceeded the required displacement when it became knowable, that rail is consumed without a hindsight event.
Each confirmed bar compares the Close or Wick probe with both rails. Distance beyond a rail is divided by ATR and must meet Minimum Break Displacement. On a two-sided outside bar, the larger normalized wick defines one event. The first event sets bias; a same-direction event is BOS. A counter-event freezes break rail, invalidation rail, displacement, and start bar. Confirmation needs a fresh rail and second break in the candidate direction. Invalidation or expiry ends the candidate. The corridor shows bullish, bearish, pending, or neutral state; early bars stay neutral.
How Multiple Indicators Work Together
This is one dependent state model, not a mashup. Pivot confirmation supplies stable rails; otherwise levels move while tested. ATR displacement separates a tiny overrun from a range-scaled break. The ordered state machine consumes those qualified breaks; otherwise crossings remain a label stream. The corridor encodes the resulting state instead of adding an unrelated signal.
Trading Ideas and Insights
Read BOS as evidence that price cleared a rail with the established bias, not as an entry command. Violet marks a candidate; amber shows why it ended. A wide corridor requires a larger absolute move. Apply separate risk, liquidity, and execution rules: the map does not select stops, size positions, or forecast events.
Unique Aspects
The contribution is an ordered lifecycle. Rails arm only when knowable, each fires once, a counter-break stays provisional, and a second newly armed break is required before bias changes. Invalidation level and age limit freeze at candidate start, so later pivots cannot rewrite the test. One corridor carries bias and transition while labels, wash, bar colors, and table remain optional. This is more than a renamed fractal plot.
How to Use
Begin with Close and default pivots, then check swing density for the market and timeframe. Read rails first: BOS continues state, P-CH opens a candidate, and SHIFT completes the two-break transition. HH/HL locations are revealed after the right-bar delay, not known on their historical bars. Use BOS and shift alerts only within an existing process.
Customization
Pivot Left/Right Bars control granularity and delay: smaller values add noise; larger values add lag. Close requires settlement beyond a rail. Wick uses extremes and resolves outside bars by larger excursion. Minimum Break Displacement sets ATR clearance; Candidate Expiry limits age. Corridor, labels, wash, bar colors, and dashboard are independently configurable.
Assumptions and Limitations
Pivots need future bars for confirmation, so markers appear on pivot bars only after the right-side delay; breaks and shifts remain on confirmation bars. Probes move live, but state and alerts require bar close. ATR and pivot settings are market-sensitive. Gaps can jump rails, Wick mode reduces an outside bar to one event, and chop can repeat candidates. The model reads chart prices, not order flow, news, higher timeframes, or execution quality. A shift is an ordered event, not a guaranteed reversal or profitable trade.
Conclusion
The map turns delayed pivots and breaks into an auditable sequence: location, one-use break, provisional counter-break, then confirmation or invalidation. It provides structural context; interpretation and risk remain with the user.
インジケーター

Swing Anchored VWAP Deviation [Pineify]Swing Anchored VWAP Deviation
Overview
Swing Anchored VWAP Deviation maps volume-weighted equilibrium after a swing. Its line, field, marker, and dashboard encode origin, dispersion, zone, and volume status.
Problem Definition
Session VWAP resets by time even when the boundary is unrelated to a contextual swing. Manual anchors require hindsight; naive pivot automation can reset on small zigzags or imply knowledge before confirmation. Fixed-width bands also equate distances across tight and dispersed auctions. The invariant needed is a confirmed anchor, statistics beginning at the real swing without an early signal, and distance scaled by post-anchor volume.
Design Rationale
Confirmed left/right pivots provide structural origins. ATR-scaled distance from the latest opposing pivot filters small candidates; zero disables the gate. After acceptance, a finite replay covers pivot through confirmation, retaining the real statistical origin while delaying visible state until it is knowable. Online weighted moments reduce cancellation versus squared-price sums. Backward plots were rejected as misleading, and reset bars cannot trigger crosses caused only by the new frame.
Key Features
Confirmed swing anchors with an ATR prominence gate.
Online volume-weighted mean, variance, and nested bands.
Stable zone colors with optional markers, bar colors, wash, and dashboard.
Close-confirmed crosses and outer entries that ignore reset bars.
How It Works
HLC3 is the default source. On each closed bar, pivots use left/right windows. Distance from the latest opposing pivot is divided by ATR at the pivot bar; if both types confirm, the larger score wins.
Acceptance clears state and processes pivot through confirmation in order. Valid volume weights each sample. Online updates produce total weight, mean, and second moment; deviation is the square root of moment divided by weight. Later bars extend state once. Missing volume has zero weight, with no fallback.
Bands are AVWAP plus or minus selected deviation multiples. Close-to-AVWAP distance divided by deviation supplies sigma; a one-tick floor prevents zero division. Cyan/blue means positive deviation, orange/pink negative, and gray equilibrium. Low anchors are cyan and highs amber. Markers are placed on the swing after confirmation; bands start or jump at confirmation and never backfill.
How Multiple Indicators Work Together
This is one causal chain, not unrelated signals. Pivot confirmation defines origin; the ATR gate decides replacement; volume weights define equilibrium; weighted variance normalizes distance; and zone state drives visuals and alerts. Without confirmation there is hindsight ambiguity, without the gate there is reset noise, without volume equilibrium changes meaning, and without dispersion raw distances are incomparable.
Trading Ideas and Insights
Treat AVWAP as context for post-swing acceptance or rejection, not an entry command. Sustained closes on one side show where value is forming. An outer visit is large relative to volume-weighted dispersion, but does not choose continuation over mean reversion. Compare it with structure, liquidity, and holding period. Alerts are observation prompts, not orders or performance claims.
Unique Aspects
The contribution is confirmation-to-origin replay. Common automation either starts at the later confirmation bar or draws pivot history where the pivot was unknowable. This state includes genuine pivot-to-confirmation observations, yet changes visuals and alerts only after confirmation. Online weighted moments keep center and dispersion together; the opposing-swing gate limits trivial resets; reset suppression separates price movement from a changed frame.
How to Use
Begin with liquid stocks, futures, or crypto on roughly 15-minute to daily charts. Require Volume Weight ACTIVE in the dashboard. Read AVWAP as current equilibrium, the inner field as ordinary variation, and outer fields as larger normalized displacement. H or L marks the source swing but appears only after the right window completes. Configure each cross and outer-entry alert separately.
Customization
Left and Right Bars set swing scale and confirmation delay; larger values usually mean fewer, later anchors. Minimum Opposing Swing Distance filters in ATR units: raising it extends anchor life, while zero accepts all candidates. Source selects the weighted sample. Inner choices are 0.5, 1.0, and 1.5; outer choices are 2.0, 2.5, and 3.0. Field, markers, extreme wash, bar colors, and dashboard are independent switches, leaving AVWAP readable alone.
Assumptions and Limitations
Pivots arrive after Right Bars; marker location is not discovery time. The realtime bar can change AVWAP, variance, bands, colors, and dashboard, while anchors and alerts require a close. Volume must be reliable: absent, synthetic, delayed, or inconsistent data can remove output or distort the center. Results are path- and parameter-dependent because each anchor replaces the prior distribution. ATR gating can miss small turns or admit noisy large ones. Deviation is descriptive, not a probability guarantee, especially for skewed data. The script does not infer orders, profitability, or future price.
Conclusion
This indicator connects confirmed structure with volume-weighted distance while keeping timing auditable. Statistics originate at the swing, become visible only after confirmation, and expose volume, latency, reset, and realtime limits.
インジケーター

[SkuldX] SFP + Auto S&RSkuldX SFP + Auto S&R — Institutional Liquidity Sweep at Validated Structure
by SkuldX Trading Systems
What is it?
SkuldX SFP + Auto S&R combines two powerful concepts into a single indicator. It automatically identifies significant support and resistance levels by clustering historical pivot points — and then monitors those levels exclusively for Swing Failure Pattern events. The result is a significantly higher quality signal filter compared to standard SFP detection: every sweep you see on the chart is happening at a price level where the market has already demonstrated structural significance multiple times.
The problem with standard SFP detection
A basic SFP indicator sweeps any local high or low regardless of whether that level has any structural importance. This generates many signals at noise levels that institutions have no reason to target. The most powerful SFP setups occur specifically at levels where liquidity has accumulated over time — where stop orders from multiple previous reactions are clustered and waiting to be harvested.
SkuldX SFP + Auto S&R solves this by only triggering when a sweep occurs at an automatically validated S&R cluster.
How the S&R engine works
The indicator scans the configured history window and identifies all pivot highs and lows — price points where the market reversed direction with enough significance to form a clear swing. These pivots are then grouped into clusters: any two pivots within the cluster tolerance percentage of each other are merged into a single level, and their average price becomes the cluster center.
Each cluster is assigned a touch count — the total number of times price has visited that zone across both pivot formations and raw bar touches. Clusters that meet the minimum touch threshold become validated S&R levels and are drawn on the chart as horizontal lines.
The levels are sorted by touch count and only the strongest ones up to your configured maximum are shown. A label at the right edge of each line displays the price and touch count in brackets — for example 2415.50 means that level has been touched five times and carries significant institutional memory.
How the SFP detection works
On every bar the indicator identifies the nearest validated S&R level above price and the nearest validated S&R level below price. It then checks whether the current candle has swept through either of those levels while closing back inside them.
Bearish SFP fires when the candle wick extends above the nearest S&R resistance level but the candle closes below it. The upper wick must meet the minimum size threshold as a percentage of the total candle range, and the breach above the level must meet the minimum breach threshold. Both conditions together ensure the sweep was meaningful rather than a minor tick-through.
Bullish SFP fires when the candle wick extends below the nearest S&R support level but the candle closes above it, with the lower wick and breach both meeting their minimum thresholds.
What you see on the chart
Grey lines — validated S&R levels with touch count labels. These are your structural reference zones. The more touches a level shows, the more liquidity has accumulated there and the more significant a sweep of that level becomes.
SFP label — appears above or below the candle at the moment of detection. Shows the signal direction, the price of the swept level, and its touch count. Higher touch count at the swept level means higher probability of a sustained reversal.
Rejection zone (box) — shaded area between the wick extreme and the S&R level. This is the precise zone where stop orders were triggered and institutional positions were likely built. The zone extends to the right for a configurable number of bars.
Dashed line — marks the specific S&R level that was swept, making it easy to track which structural zone triggered the signal.
Settings reference
S&R Detection group
Pivot Lookback — how many bars on each side a pivot must be the extreme to qualify. Higher values find more significant swing points but confirm later. Default 10.
Cluster Tolerance % — maximum distance between two pivots to be grouped into the same cluster. Default 0.3%. Increase for volatile instruments where price rarely touches the exact same price twice.
Min Touches for Valid Level — minimum touch count required for a cluster to be drawn and used for SFP detection. Default 2. Increase to 3 or 4 for stricter structural requirements.
Max Levels to Show — limits the number of S&R lines displayed. The strongest levels by touch count are always shown first.
S&R History Lookback — how many bars of history to scan for pivots. Default 300. Increase for higher timeframes where significant levels form slowly.
SFP Filters group
Min Wick Size % of candle — the rejection wick must be at least this percentage of the total candle range. Prevents weak rejections from triggering signals.
Min Breach Size % of level — the wick must extend at least this percentage beyond the S&R level. Ensures the sweep was meaningful enough to trigger stop orders.
Show Bullish / Bearish SFP — independent toggles for each direction.
SFP Display group
Show Labels — toggles signal labels
Show Rejection Zone — toggles the sweep zone box
Zone Extend — how many bars right the zone and line extend
Label Size / Zone Transparency / Line Width — visual customization
Bullish / Bearish Color — independent colors for each direction
How to use it in practice
Reading the levels — scan the grey S&R lines before any signal appears. Levels with 4+ touches are the most significant targets. These are where institutions are most likely to engineer a sweep. When price approaches one of these levels, heighten your attention.
Reading the signal — when an SFP fires, check the touch count in the label. A sweep at a 2-touch level is interesting. A sweep at a 6-touch level is significant. The touch count is the single most important quality indicator for the setup.
Entry timing — the signal fires on candle close. The most direct entry is at the open of the next candle in the reversal direction. A more conservative approach waits for the following candle to confirm continuation before entering.
Stop placement — place the stop-loss beyond the wick tip, outside the rejection zone. The zone itself tells you where institutional positioning occurred — price returning beyond that zone invalidates the entire setup premise.
Take-profit targets — use the next S&R level in the direction of the trade as the primary target. The indicator shows you all significant levels simultaneously, making it straightforward to identify the next structural obstacle.
Calibrating for your instrument — start with default settings and observe whether signals appear at levels that look structurally significant to you visually. If too many signals appear at noise levels, increase Min Touches to 3 or raise the wick and breach thresholds. If signals are too rare, reduce Pivot Lookback or increase Cluster Tolerance.
Timeframe guidance — on 15m the lookback of 300 bars covers approximately 75 hours. On 1h it covers 12.5 days. Adjust S&R History Lookback proportionally to ensure the indicator scans enough price history to build meaningful clusters.
Part of the SkuldX Suite
SkuldX SFP + Auto S&R is designed to work alongside the full SkuldX indicator suite. The most reliable setups emerge when multiple layers of context align:
A bullish SFP at a 4+ touch S&R level that coincides with the Asian Low from SkuldX Sessions carries double structural significance — both the automated cluster and the session boundary agree on the level
A bearish SFP at a high-touch resistance zone with ADR Used % above 85% from SkuldX ADR Levels signals both a liquidity sweep and statistical range exhaustion simultaneously
An SFP confirmed by a Bullish or Bearish Trend reading in SkuldX OI Delta — new positions opening in the reversal direction — adds institutional conviction that the sweep was deliberate rather than random
The touch count shown in the SFP label directly complements the Touch Counter module in SkuldX Level Patterns, providing consistent structural analysis across both manual and automated level detection
インジケーター

Auto Fibonacci Fan - Confirmed Pivots [AFD]
A Fibonacci level without context is just another line. What happened when price reached it - and where is price now?
Auto Fibonacci Fan - Confirmed Pivots combines disclosed automatic anchors with a compact decision-context board. It shows the projected levels, retains each
level's last confirmed Tested, Rejected, Broken, or post-break Held event, and
reports whether the last confirmed close is below, inside, or above the current
0.618-0.650 Golden Pocket. These are descriptive chart states, not trade calls.
The anchor and lifecycle contract stays visible: how a leg qualifies, when it
becomes current, when it becomes an archive, and when current geometry freezes
as completed history. The result is recent fan context without an unbounded
field of permanent rays.
AT A GLANCE
Disclosed qualification - strict confirmed pivots, ATR-normalized displacement, and directional efficiency define which completed legs reach the chart.
Bounded history - up to four current/completed fans; the oldest leaves first.
Lifecycle projection - the current fan advances to the latest chart bar, while each completed fan locks at replacement or invalidation. Infinite projection remains optional.
Five configurable levels - color identifies ratio, not direction or trade quality. Ratio labels are intentionally absent.
Chart or higher-timeframe anchors - higher-timeframe fans use completed source bars.
Golden Pocket context - the default-on current-fan 0.618-0.650 projected wedge reports whether the last confirmed close is below, inside, or above it. The range is a convention, not a signal or proven edge.
Focused presentation - nine color schemes, stepped Gradient shading, one active-band spotlight, native line styles, and optional baselines.
Compact fan map - a Golden Pocket row plus five color-matched horizontal rails connect each ratio to its projected price and confirmed chart-bar Tested, Rejected, Broken, or post-break Held state, with the latest level event aged in completed bars.
HOW IT WORKS
A pivot is accepted only after the configured bars exist on both sides. An
opposite pivot forms a candidate leg. Its anchor-to-anchor move must pass both a
minimum ATR size and a minimum efficiency threshold. Efficiency is the direct
leg range divided by accumulated true range between the anchors. Passing these
filters means only that the numerical contract was met.
A qualifying opposite leg becomes current and archives the fan it replaced. A
confirmed source close strictly beyond the current origin ends current status
and freezes that fan as bounded history until the four-fan cap removes the
oldest.
Ratio 0 maps to the leg end and ratio 1 to the origin. Colour identifies the
ratio level, not direction, strength, or trade quality.
The Golden Pocket is a separate fixed 0.618-0.650 projected wedge on the
current fan only. The 0.650 boundary is a conventional buffer rather than a
Fibonacci-derived ratio. The pocket does not change qualification and is not
an entry, reversal, probability, or support/resistance claim.
WHY THE LIFECYCLE MATTERS
The default view separates current geometry from retained context without
extending every historical ray forever. Current rays continue to the latest
chart bar. Completed rays stop at replacement or invalidation. Age fading keeps
the bounded history readable without adding signals, scores, or price targets.
HOW TO USE IT
Start with the Swing preset on a standard time-based chart. It is the fresh default; Scalp, Intraday, and Custom change qualification sensitivity.
Use Chart or an equal-duration Anchor Timeframe for chart bars, or select a strictly higher timeframe for completed-source anchors.
Use Lifecycle projection for bounded rays. Fresh visual defaults are Dotted 1 px rays and Gradient fill at 20%; the current price-containing editable band receives bounded emphasis.
Read the GOLD row first: it reports whether the last confirmed close is BELOW ZONE, IN ZONE, or ABOVE ZONE for the current projected 0.618-0.650 pocket.
Then read the five level rows: each horizontal rail matches its chart ray and shows projected price plus the last confirmed level interaction. Compact is the default; Large expands it.
WHAT IT DELIBERATELY DOES NOT DO
No manual anchors, horizontal retracement grid, confluence, signals, targets,
scores, alerts, or backtests. Qualified means only that the disclosed numerical
filters passed; it is not a probability or recommendation.
DATA AND TIMEFRAMES
Confirmed pivots arrive after their right-side bars exist. Higher-timeframe
results also wait for a completed source bar. An equal-duration selection uses
chart bars. A lower timeframe or unknown interval draws no fan and displays the
specific problem plus correction rather than silently falling back.
Nonstandard charts can supply synthetic or approximate OHLC values, so parity
with standard candles is not claimed.
ORIGINALITY AND CREDIT
Fibonacci fan geometry is established. This clean-room implementation adds a
disclosed automatic anchor, two-filter qualification, bounded queue, and finite
lifecycle contract in one focused open-source fan. It does not claim unique or
predictive geometry.
Public open source under the Mozilla Public License 2.0. (c) Auction Foundry.
This indicator describes confirmed swing geometry from chart data. It is not a
forecast, a signal, or financial advice. インジケーター

[SkuldX] SFP Swing Failure PatternSkuldX Swing Failure Pattern — Institutional Liquidity Sweep Detector
by SkuldX Trading Systems
What is it?
SkuldX Swing Failure Pattern automatically detects one of the most powerful reversal setups in Smart Money and ICT trading. The Swing Failure Pattern occurs when price sweeps beyond a key swing level — triggering stop-loss orders clustered there — but then closes back within the previous range. This signals that institutional participants have absorbed the available liquidity and are now positioning in the opposite direction.
Unlike random false breakouts, the SFP has a precise structure: a meaningful wick beyond a swing high or low, a close that returns inside the range, and a visible rejection zone where the liquidity grab occurred. SkuldX SFP identifies all three automatically and displays them directly on the chart.
The mechanics
Every swing high and swing low acts as a magnet for stop-loss orders. Retail traders who are long place their stops just below swing lows. Retail traders who are short place their stops just above swing highs. Institutional participants know exactly where this liquidity sits.
An SFP forms when price is deliberately pushed beyond one of these levels to trigger those orders — collecting the liquidity — and then immediately reverses. The result is a candle with a long wick beyond the level and a close that returns inside the prior range. This is not a random failure. It is a deliberate liquidity grab followed by institutional repositioning in the opposite direction.
Two pattern types
🔴 Bearish SFP — price sweeps above a previous swing high with a wick but closes below it. The failed attempt to break higher signals that sellers have absorbed the bullish liquidity and are now in control. Expect a move downward.
🟢 Bullish SFP — price sweeps below a previous swing low with a wick but closes above it. The failed breakdown signals that buyers have absorbed the bearish liquidity and are now driving price higher.
What you see on the chart
Each detected SFP displays three visual elements simultaneously:
Label — appears above or below the candle with the signal direction and the exact price of the swept level. Instantly identifies the pattern without manual analysis.
Dashed line — marks the swing level that was breached. Extends from the beginning of the lookback window to the right, showing which structural level triggered the sweep. This level often acts as support or resistance in subsequent price action.
Rejection zone (box) — shaded area between the wick extreme and the swept level. This is the liquidity grab zone — the price range where stop orders were triggered and institutional positions were built. The size of this zone reflects how aggressively price was pushed beyond the level before reversing.
Quality filters
Two independent filters prevent low-quality signals from appearing on the chart.
Min Wick Size % of candle — requires the rejection wick to be at least a specified percentage of the total candle range. A small wick relative to the candle body suggests weak rejection. Default 0.5%. Increase to 2–3% on noisy instruments to require a more decisive rejection.
Min Breach Size % of level — requires the wick to extend at least a specified percentage beyond the swing level. A sweep that barely ticks beyond the level carries less significance than one that pushes meaningfully through it. Default 0.05%. Increase to 0.1–0.2% for stricter confirmation.
Both filters can be set to zero to show all detected patterns without filtering.
Settings reference
Swing Lookback (bars) — defines how many bars back to search for the swing high or low that gets swept. Default 10. Lower values find more local patterns, higher values require more significant swing levels. On 15m charts, 10 bars covers approximately 2.5 hours of price history.
Min Wick Size % of candle — minimum upper or lower wick as a percentage of the total candle range
Min Breach Size % of level — minimum distance the wick must extend beyond the swing level
Show Bullish / Bearish SFP — independent toggles for each direction
Show Labels — toggles the signal label above or below the candle
Show Level Line — toggles the dashed line at the swept swing level
Show Rejection Zone — toggles the shaded box between the wick and the level
Zone Extend — how many bars to the right the zone and line extend
Label Size — tiny, small, or normal
Bullish / Bearish Color — independent color control for each direction
Zone Transparency — opacity of the rejection zone fill
Line Width — thickness of the swept level line
Data Window
Hovering over any bar shows binary flags for Bullish SFP and Bearish SFP detection, the current swing high and swing low values used as reference levels, the upper and lower wick percentages, and the breach percentage of the swept level. These values are useful for calibrating the quality filters to your specific instrument and timeframe.
How to use it in practice
Entry timing — the SFP signal fires on the bar where the rejection occurs. The most aggressive entry is at the close of that candle. A more conservative approach is to wait for the next candle to confirm continuation in the reversal direction before entering.
Stop placement — place the stop-loss beyond the wick extreme, outside the rejection zone. The wick tip represents the furthest point of institutional manipulation — price returning beyond it invalidates the pattern.
Take-profit targets — common targets are the opposite swing extreme, a session High or Low from the current day, or the next significant structural level. The swept swing level itself often acts as resistance or support on the retest.
Timeframe selection — SFP signals are most reliable on 15m and above. On very low timeframes the pattern appears frequently but with lower conviction. On 1h and 4h the signals are rarer but carry significantly more institutional weight.
Confluence — the highest-probability SFP setups occur when the swept level coincides with a session boundary. A bearish SFP that sweeps the Asian High during London session is a classic institutional liquidity grab setup. A bullish SFP at Asian Low during the NY Overlap is one of the strongest intraday reversal signals available.
Volume context — a sweep accompanied by above-average volume confirms institutional participation. A low-volume sweep may indicate a thin market move rather than a deliberate liquidity grab.
Common mistakes to avoid
Entering immediately on the wick without waiting for the candle to close. The pattern is only valid after the close confirms the rejection — a candle that is still forming may yet close beyond the level as a genuine breakout.
Trading every SFP signal regardless of context. The pattern is significantly more reliable when it sweeps a level that has been respected multiple times previously, when it occurs during a high-liquidity session window, and when it aligns with the broader directional bias.
Using too small a lookback. A swing high from 3 bars ago carries far less liquidity than one from 10–15 bars ago. Increase the lookback if signals feel too frequent or structurally insignificant.
Built for SkuldX ecosystem
SkuldX Swing Failure Pattern is designed to work alongside the full SkuldX indicator suite. The most reliable SFP setups emerge when multiple layers of context align simultaneously:
A bullish SFP at the Asian Low after the Asian session closes — detected by SkuldX Trading Sessions — suggests institutional accumulation before London or NY drives price higher
A bearish SFP at the Asian High during London session with ADR Used % above 80% — from SkuldX ADR Levels — indicates both a liquidity sweep and statistical range exhaustion at the same level
An SFP confirmed by a Bullish Trend or Bearish Trend reading in SkuldX OI Delta adds institutional conviction — new positions opening in the reversal direction confirm the sweep was not random
An SFP that forms at a level already flagged by SkuldX Level Patterns as a multi-touch support or resistance zone carries significantly more weight than one at a fresh untested level
Each indicator in the suite adds an independent dimension of confirmation. Using them together reduces noise and improves the quality of setups without adding complexity to the decision process.
インジケーター

Pivot Scoreboard [AFD]**How many times has price tested R1 this session — and did it hold or break each time?**
If you trade off pivots, you already know where the levels are. What you don't have is their record. Was this the second test of S1, or the fifth? Has the CPR held the last three times price came back to it, or is it starting to give way? Every pivot tool on the shelf draws the same lines and then goes quiet — so you end up trading levels with no memory, where the first test and the fifth look exactly alike.
**Pivot Scoreboard keeps the record** . For the current period's pivot ladder and Central Pivot Range, it counts **how many times price has tested each level**, and whether each test **held** (price closed back on the side it came from) or **broke** (price closed through). The market draws the lines; this one records what happened at them.
### Why it matters###
A level nobody has tested is just a line on a chart. A level price has tested four times and held four times is one the market is actively defending — and the day it finally breaks, that's a change you had no way to see when every touch looked the same. The count is the context: it tells you whether a level is being respected or worn down, this period, on this symbol. It is a plain description of what has already happened — never a prediction, and never a signal to act.
### At a glance###
###Capability - What you get ###
**Touch scoreboard** A per-level count of tests this period — on the level's label (`R1 ·3`) and in the card
**Held / broke split** For each core level, how many of those tests held versus broke |
**Nine pivot formulas** Switch the whole ladder between nine conventions (table below) |
**Central Pivot Range** The TC/BC balance band, kept on the floor-pivot basis whichever formula you pick
**Five anchors** Daily · Weekly · Monthly · Quarterly · Yearly — or Auto, which picks the shortest sensible one
**Five neutral alerts** CPR entry, CPR exit up, CPR exit down, first R1 test, first S1 test — all on confirmed closes
**Location read** demoted line still names where price sits right now (secondary to the score) |
**Appearance** Ten palettes, per-zone custom colours, an optional active-zone glow, configurable labels and card
### Nine pivot formulas, one ladder###
Trade the convention you already use — the scoreboard counts touches on whichever levels it draws. "Tiers" is how many resistance/support steps each formula defines above and below the pivot.
### Formulas ###
**Floor Pivots** *(default)* // PP = (H + L + C) / 3; R/S from 2·PP
**Fibonacci** // R/S at 0.382 / 0.618 / 1.0 × range, off PP
**Woodie** // Weights the period's open: PP = (H + L + 2·Open) / 4
**Classic** // R/S at PP ± 1 / 2 / 3 × range
**DM** // A conditional sum keyed to prior open vs close
**Camarilla** // Close ± 1.1·range ÷ {12, 6, 4, 2}, plus a wide 5th tier
**Frank Dilernia** // R/S at ½ / 0.618 / 1.0 × range, off PP
**Shadow Trader** // The floor-pivot tiers (its own published basis)
**ACD Method** // PP ± the distance from PP to the H/L midpoint
The **Central Pivot Range** stays on the floor-pivot basis whichever formula you choose, so the balance band is a stable reference and does not shift when you switch lenses.
### How a test is scored###
The ladder is built from the *prior* completed period's high, low and close:
```
PP = (prior high + prior low + prior close) / 3
R1 = 2 × PP − prior low S1 = 2 × PP − prior high
CPR: BC = (prior high + prior low) / 2 ; TC = 2 × PP − BC (sorted)
```
Then, for each drawn level, on every **confirmed** bar:
**Touched** — the bar's range includes the level (low ≤ level ≤ high).
**Test** — counted when a bar touches a level the *previous* confirmed bar did not. This "leading edge" rule means a level price hugs for five bars counts **once**, not five times.
**Held / broke** — *held* when the bar closes back on the side it approached from (a rejection); *broke* when it closes through (an acceptance).
**Reset** — counts return to zero at each new period, because the levels are redrawn from the new prior high/low/close.
These are **descriptions of what the chart has already done** — counts of observed touches — not predictions, signals, or trade instructions. A high test count is a record, not a probability.
### How it differs from Pivot Matrix + Zones ###
The account also publishes `Pivot Matrix + Zones `, a pivot **workbench** — compare formulas across packs side by side, score confluence, read the current location. Pivot Scoreboard is a different job: **one ladder, and a running tally of how price has interacted with it.** They are complements, not versions of each other — run whichever fits the question you're asking.
### The visuals###
- **Levels and CPR band.** PP is the strongest line; the CPR is a neutral balance band; further tiers fade with distance. Each level's label carries its test count.
- **Scoreboard card.** The core levels — R1, PP, S1 and the CPR boundaries — with their tests and held/broke split; hover the header for a note on the `3 (1/2)` format. Below them a demoted **Now** line (the current location, its cell tinted the zone's colour with automatically legible text), the furthest tier reached this period, and the anchor in use.
- **Active-zone glow (optional).** The zone price is currently in can be filled with a soft gradient that follows price. It is secondary — the scoreboard is the point — and can be turned off.
### How to use it###
- Leave **Anchor** on Auto and it picks the shortest sensible higher timeframe, or set it directly. The anchor must be **strictly above** your chart timeframe.
- Use **Map depth** — Core shows R1/S1 and the CPR; Extended adds the outer tiers, each with its own count.
- Everything else (formula, palette, custom colours, labels, the card, the glow) is a setting — configure it once to taste.
### What it deliberately does not do###
It does not compare formulas side by side, score confluence, or rank anything. It draws one ladder and keeps score on it. It makes **no** accuracy, reliability, profitability, probability or future-result claim; a test count describes the past, not the future. Educational chart context, not financial advice.
### Data, timeframes and repainting###
- Prior high/low/close is requested from the symbol's exchange-default feed, offset by one completed period **and** with `lookahead_on` — the standard anti-repaint form — so the current, still-forming period never enters the ladder. Every test and event is evaluated on **confirmed bar closes**; nothing is back-placed.
- The above describes the **mechanism**. Confirm the behaviour with the bar-replay tool on your own chart and timeframe before relying on it.
- **Yearly is the highest anchor**, so a chart at or above 12 months has no valid anchor and the script says so.
- **Standard time-based candles only.** Heikin Ashi, Renko, Range and similar are rejected, because the tests read chart OHLC.
- A running alert keeps the inputs, symbol and timeframe it was created with — recreate an alert after changing any of them.
### Originality and credit###
Other pivot tools plot levels; this one turns a single ladder into a **running record of how price has tested it** — test counts with held/broke per level, reset each period — deliberately restricted to descriptive context. Open source under the **Mozilla Public License 2.0**. © Auction Foundry LLC. インジケーター

EMA/SMA Classics V1.0 by SRTEMA/SMA Classics V1.0 by SRT
The EMA/SMA Classics indicator was designed to answer one simple question:
"Which side of the market currently has the structural advantage?"
Instead of flooding the chart with buy and sell arrows, this indicator focuses on market structure, trend alignment, and high-quality price action, allowing traders to make their own execution decisions with greater confidence.
Whether you trade Forex, Indices, Commodities or Crypto, this indicator combines multiple market concepts into a clean workflow while remaining highly configurable through both EMA and SMA combinations.
What This Indicator Includes
• Flexible EMA / SMA Engine
Unlike traditional moving average indicators that are locked to one MA type, every moving average in this indicator can independently be configured as either:
EMA
SMA
Default settings:
MA 1 : 7
MA 2 : 40
MA 3 : 150
MA 4 : 200
You may use the default configuration or customise the periods to fit your own trading methodology.
• Dynamic Moving Average Stack Detection
The indicator continuously evaluates whether the visible moving averages are properly stacked.
Bullish Stack
Fast MA > Medium MA > Slow MA
Bearish Stack
Fast MA < Medium MA < Slow MA
When the moving averages lose their proper order, the market is treated as neutral instead of forcing a directional bias.
This helps reduce many false trend signals that occur during consolidations.
• ATR-Based MA Spacing Filter
One common problem with MA strategies is entering when all moving averages have already compressed together.
This indicator measures the spacing between moving averages using ATR.
When the moving averages become too compressed, trend quality deteriorates.
The spacing filter helps identify these lower-quality environments before momentum fully develops.
• Ladder Structure
One of the core concepts inside this indicator is the Ladder System.
Instead of only observing moving averages, the indicator also evaluates the market using multiple dynamic support and resistance structures.
Resistance
R9
R40
R70
R100
R150
Support
S9
S40
S70
S100
S150
These levels automatically update with market structure and are used to generate an additional Ladder Bias.
When both the moving averages and Ladder Bias agree, market structure is generally stronger than relying on moving averages alone.
• Flush Dot System
The indicator displays visual Flush Dots beneath or above candles whenever trend alignment exists.
Small Green Dot
Bullish MA alignment.
Small Red Dot
Bearish MA alignment.
Large Green Dot
Moving Average alignment + Bullish Ladder confirmation.
Large Red Dot
Moving Average alignment + Bearish Ladder confirmation.
The larger dots represent stronger structural agreement across multiple components.
• KeyBar Detection
The indicator automatically identifies two important price action patterns.
Engulfing Bars
Bullish Engulfing (EBull)
Bearish Engulfing (EBear)
These are filtered using ATR and minimum body size to avoid insignificant candles.
Long Tail Bars (LTB)
Bullish Long Tail Bars
Bearish Long Tail Bars
These identify strong rejection candles with defined tail proportions and body positioning.
An optional body-size filter is also available for traders wanting stricter candle selection.
Daily Pivot (DP)
Automatically plots the previous day's pivot.
Useful as:
Dynamic support
Dynamic resistance
Intraday reaction level
Weekly Pivot (WP)
Automatically plots the previous week's pivot.
Many swing traders use weekly pivots as major reaction zones throughout the trading week.
RSI Momentum Alerts
The indicator includes two independent RSI event types.
RSI Breakout
Signals when RSI breaks into extreme momentum territory.
Bullish breakout
Bearish breakout
RSI Retracement
Designed to identify momentum continuation after RSI exits an extreme condition while confirming with the RSI Moving Average.
These alerts can be useful for traders looking to participate after momentum has begun to recover instead of chasing extremes.
Information Panel
A compact table summarises the current market condition.
Displays:
Moving Average Bias
Ladder Bias
Long Tail Bar presence
This provides a quick snapshot without needing to inspect every component individually.
How To Use This Indicator
This indicator is not designed to generate automatic Buy or Sell signals.
Instead, it acts as a Market Context Indicator.
A typical workflow may look like this:
Step 1
Observe whether the moving averages are properly stacked.
A clean stack generally indicates directional order.
Step 2
Check whether the Ladder Bias agrees with the moving averages.
When both align, the market structure is generally stronger.
Step 3
Watch for KeyBars.
Examples include:
Bullish Engulfing
Bearish Engulfing
Bullish Long Tail Bar
Bearish Long Tail Bar
These often represent meaningful reactions within the prevailing structure.
Step 4
Use Daily Pivot and Weekly Pivot as areas where price may react.
These levels should be considered areas of interest rather than guaranteed reversal zones.
Step 5
Monitor RSI alerts for momentum shifts.
Momentum signals are generally more useful when they occur in the same direction as the prevailing market structure.
Suitable Timeframes
Although the indicator can be applied to multiple chart intervals, it generally performs best on:
M15
M30
H1
H4
Daily
The moving averages, Ladder System, and KeyBar detection adapt naturally across different timeframes.
Difference Between EMA/SMA Classics & H1 EMA/SMA + Higher Timeframe Analysis (Classic)
Although both indicators belong to the same ecosystem, they serve different purposes.
EMA/SMA Classics
Designed as a general-purpose structural trend indicator.
Features include:
Flexible EMA/SMA stacking
Ladder System
Flush Dots
Engulfing Bars
Long Tail Bars
Daily Pivot
Weekly Pivot
RSI Alerts
It can be used on virtually any timeframe and is ideal for traders who prefer to analyse the chart directly.
H1 EMA/SMA + Higher Timeframe Analysis (Classic)
The H1 version is a significantly more advanced market context engine.
In addition to everything above, it introduces:
Dedicated H1 Bias Engine
H4 Trend Analysis
Daily Trend Analysis
Higher Timeframe Bias Aggregation
H1TF Composite Bias
Overall Market Verdict Engine
Multi-layer Bias Table
Higher Timeframe Confirmation Workflow
Rather than focusing solely on the current chart, the H1 version continuously evaluates whether multiple timeframes are aligned before presenting an overall market verdict.
If the EMA/SMA Classics indicator answers:
"What is my current chart doing?"
Then the H1 version answers:
"What is the broader market structure telling me across multiple timeframes?"
The two indicators are complementary and can be used together depending on your preferred trading workflow.
Disclaimer
This indicator is designed to assist with market structure analysis and decision-making. It does not provide financial advice or guarantee profitable trades. Always combine indicator signals with sound risk management, personal analysis, and appropriate position sizing. インジケーター

H1 EMA/SMA + Higher Timeframe Analysis (Classic) V1.0 by SRT# H1 EMA/SMA + Higher Timeframe Analysis (Classic) V1.0 by SRT
## Overview
H1 EMA/SMA + Higher Timeframe Analysis (Classic) V1.0 by SRT is a complete market context indicator designed to help traders read trend, structure and execution quality from a single chart.
Instead of relying on one indicator alone, this script combines multiple layers of market information into one unified framework:
• H1 Moving Average Bias Engine
• Higher Timeframe (H4 & Daily) Trend Confirmation
• Ladder Market Structure Analysis
• Dynamic Daily & Weekly Pivot Levels
• VWAP Bias Filter
• Engulfing & Long Tail Bar (LTB) Detection
• RSI Breakout & Retracement Alerts
• Composite Bias Dashboard
• Smart Alert System
The objective is simple:
Reduce subjectivity by helping traders identify when multiple independent factors agree before looking for trade opportunities.
This indicator is designed for traders who prefer trading with trend and market structure rather than relying on a single crossover or oscillator.
---
## Main Features
### ① H1 Bias Engine
The H1 Bias Engine evaluates the alignment of up to four configurable EMA/SMA lines.
Unlike traditional MA crossover indicators, this engine considers:
• Moving average order
• Price position relative to the moving averages
• MA spacing quality
• Trend strength
Bias is classified into:
• Strong Bullish
• Bullish
• Neutral
• Bearish
• Strong Bearish
An ATR-based spacing filter automatically ignores signals when moving averages become compressed, helping reduce false trend readings during consolidation.
---
### ② Higher Timeframe Bias
The script automatically evaluates both:
• H4 Trend
• Daily Trend
using a dedicated EMA40 / EMA150 / SMA200 structure.
These two higher timeframes are combined into a Higher Timeframe (HTF) Bias.
This allows traders to quickly determine whether H1 signals are aligned with the broader market direction.
---
### ③ Ladder Market Structure
The Ladder System measures how support and resistance levels evolve over multiple lookback windows.
Support Levels
S9
S40
S70
S100
S150
Resistance Levels
R9
R40
R70
R100
R150
The relative positioning of these levels produces a Ladder Bias ranging from:
Strong Bullish
Bullish
Neutral
Bearish
Strong Bearish
This provides an additional market structure confirmation independent of moving averages.
---
### ④ Composite H1TF Bias
One of the core components of the indicator.
H1TF combines:
• H1 Moving Average Bias
• Ladder Bias
to generate a stronger consensus trend.
Rather than reacting to a single condition, H1TF requires agreement between trend and structure before producing stronger directional confidence.
---
### ⑤ Final Verdict Engine
The Final Verdict combines:
Higher Timeframe Bias
*
H1TF Composite Bias
Only when both higher timeframe trend and H1 composite trend strongly agree will the dashboard produce:
Strong Bullish
or
Strong Bearish
This helps traders focus on higher probability market conditions instead of reacting to every market fluctuation.
---
### ⑥ Key Bar Detection
The indicator automatically detects two important price action patterns.
Bullish / Bearish Engulfing Bars
Long Tail Bars (LTB)
Each signal includes:
ATR size validation
Minimum body filters
Tail quality checks
Momentum confirmation
These are designed to highlight significant candles instead of every basic engulfing or pin bar.
---
### ⑦ Daily & Weekly Pivot Levels
Built-in pivot calculations include:
Daily Pivot (DP)
Weekly Pivot (WP)
These levels provide additional context for potential support, resistance and reaction zones.
---
### ⑧ VWAP Bias
The indicator includes a built-in VWAP filter.
Price above VWAP
Bullish
Price below VWAP
Bearish
This offers another layer of institutional-style market context that complements the moving average analysis.
---
### ⑨ RSI Momentum Alerts
Four RSI-based alerts are included.
Bullish RSI Breakout
Bearish RSI Breakout
Bullish RSI Retracement
Bearish RSI Retracement
These alerts are designed to identify momentum expansion as well as potential continuation opportunities after retracements.
---
### ⑩ Smart Alert System
The alert engine supports multiple event types.
H1 Bias changes
Higher Timeframe Bias changes
H1TF Composite changes
Ladder Bias changes
Bullish Engulfing
Bearish Engulfing
Bullish Long Tail Bar
Bearish Long Tail Bar
Optional filters allow alerts to trigger only when aligned with:
H1TF
Higher Timeframe
Strong Bias only
This helps reduce unnecessary alert noise.
---
## Reading the Bias Dashboard
The dashboard summarizes the complete market picture.
Daily
Daily Trend
H4
H4 Trend
HTF
Combined Higher Timeframe Trend
H1
Current H1 Moving Average Bias
Ladder
Market Structure Bias
H1TF
Combined H1 Trend
VWAP
Current VWAP Position
Verdict
Final Consensus
The strongest trading environments generally occur when multiple components point in the same direction.
---
## Typical Workflow
A simple workflow may look like this:
1. Check the Final Verdict.
2. Confirm H1TF agrees with the Higher Timeframe.
3. Observe whether VWAP supports the direction.
4. Wait for a qualifying Engulfing Bar or Long Tail Bar.
5. Use Daily Pivot, Weekly Pivot and Ladder levels for trade management.
This approach encourages waiting for confluence rather than entering solely because one indicator changes direction.
---
## Notes
This indicator is intended as a market context and decision-support tool.
It does not predict future prices and should not be considered a standalone trading system.
Like any technical tool, it performs best when combined with sound risk management, proper trade planning and disciplined execution.
---
Thank you for using H1 EMA/SMA + Higher Timeframe Analysis (Classic) V1.0 by SRT
I hope this indicator helps simplify chart analysis and encourages traders to focus on market structure, trend alignment and disciplined decision making.
— SRT
インジケーター

Fibonacci Retracement [AFD]Fibonacci levels that find their own two points, and keep finding them.
THE PROBLEM WITH DRAWING THEM BY HAND
A retracement is two clicks and a judgement call. The judgement is the hard part - which high, which low, and whether the leg you just measured is one move or two glued together. Then the session rolls over and the answer changes, so you do it again.
This draws the grid from the chart's own data instead. You tell it which range matters and it finds the two points itself, every bar, forever. Come back after the open and it has already re-anchored to the new day.
PICKING THE RANGE
Four choices, and they are all self-maintaining.
Current Day is the default and it is the one most intraday traders want - today's high and low, re-anchoring at each session open. Previous Day is yesterday's, and it draws from yesterday's start rather than today's, so the geometry sits over the data it came from. Current Week is the same idea one period up.
Latest Swing is the interesting one. It takes the last confirmed swing high and low, and it insists they alternate.
That insistence matters more than it sounds. ta.pivothigh() and ta.pivotlow() are independent detectors, and a real chart prints two, three, four highs in a row with no qualifying low between them. Take the most recent of each and you get a "leg" whose high end is simply the latest high, not the highest one in the span - so the grid measures a move that never happened as a single push, and 0.618 lands somewhere with no relationship to anything. Here, a pivot on the same side as the last one replaces it only if it is more extreme, and a pivot on the opposite side starts the next leg. On clean impulses this changes nothing at all. On ragged ones it pulls the anchor back to the extreme the leg actually reached.
Swing Strength sets how many bars have to print either side of a pivot before it counts. Higher means fewer and more significant swings, and a longer wait.
WHICH WAY THE LEG RUNS
Fib Direction is Auto, Long or Short, and it is the one control that stays live no matter what else you switch off - because it governs both grids, not just the near one.
Auto works out the direction from the range you actually chose. It looks at the two extremes that range uses and puts 0.00 at whichever one printed later, on the reasoning that the more recent extreme is the one the move ended on. So on Current Day, a day that made its low at 10:15 and its high at 15:50 gets 0.00 at the high and a grid you read downwards. Force it with Long or Short when you disagree.
THE MINUS SIGN, AND WHY THE EXTENSIONS HAVE ONE
Everything on this chart is numbered from the leg end. 0.00 sits at the recent extreme that finished the move, 1.00 at the point it started from. That way the number you read is retracement depth, and it means the same thing whichever direction the leg ran.
The extensions continue that same line past 0.00, which is why they are negative. -0.618 sits 0.618 of the leg's range beyond the 0.00 line, in the direction the leg was travelling - exactly the way 0.618 sits 0.618 of the range on the other side of it. One ruler, and the sign tells you which side of the origin you are on.
If that looks unfamiliar, put TradingView's own Fib Retracement tool on the same two points. Its tags read the same: -0.618, not 1.618. The 1.618 reading belongs to the Trend-Based Fib Extension tool, which measures from the leg origin instead - a perfectly good convention, but putting both on one chart gives you two rulers running opposite directions from the same 1.00 line, and sooner or later you read the wrong one.
Six ratios are on offer - -0.272, -0.414, -0.618, -1.00, -1.618, -3.236 - and they ship switched off. They are levels, not targets. They are arithmetic on the leg. This script says nothing about whether price gets to one, marks no entry or exit, and has no alerts of any kind.
THE SECOND GRID
Switch on Show HTF Context and a second grid draws behind the first, anchored to the latest confirmed swing on a higher timeframe and dimmed so it stays context rather than competing for your attention. It ships off, so a fresh add gives you one clean grid.
HTF Mode is where this differs from most higher-timeframe overlays. Adaptive , the default, does not hold a fixed interval - it takes the next one up from whatever chart you are on. A 5-minute chart anchors to the 15-minute swing, a 1-hour chart to the 4-hour. Change timeframe and it follows you, and because it always resolves to something strictly higher, it cannot silently resolve to nothing.
Custom lets you name the timeframe instead, which is what you want when a specific one matters - the 4-hour swing while you scalp the 5, say. The catch is that it has to be strictly higher than the chart. Set Custom to 240 and drop to a 4-hour chart and the grid disappears with no warning label, because 240 is not higher than 240.
Both grids keep their own level checkboxes, line width, label size and text colour, so you can make the context layer as quiet as you like. The extension ratios are the exception: which ratios get drawn is shared by both grids, while which grids draw them is not. Each layer has its own extension toggle. The tooltips say which is which, because a control that looks global and is not is worse than one that plainly is.
THE SETTINGS ACTUALLY WORTH YOUR TIME
Most of the 63 inputs are the ordinary colour-and-width kind. These are the ones that change how the thing reads.
Color Mode defaults to Gradient, and it is doing real work. Each level takes its colour from its own ratio, so hue states depth - the shallow end and the deep end are different colours, and the 0.618-0.786 span reads as a region instead of two more identical lines. There are five presets plus Custom. Single Color reverts to one colour per grid if you prefer the classic look, and either way whatever transparency you pick in the colour picker is the transparency you get.
Enable Glow draws every level twice - a wide, near-transparent halo under a thin bright core. It costs nothing but line objects and it is the difference between a grid you can see on a busy chart and a set of hairlines you lose against the candles. Turn it off when the chart is crowded.
Fill Between Levels shades the intervals. OTE Band, the default, shades only 0.618-0.786. All Bands shades everything, Custom Bands lets you pick, and Off is off. The fills are independent of the line checkboxes, so you can shade a band whose boundary lines are hidden.
Highlight Golden Zone at Price is the one piece of reactive styling here. While the last close is between the 0.618 and 0.786 prices, that band draws more opaque and lifts off the chart. It creates nothing new - no box, no zone object, no centre line, no label - it just restyles the band the fill control already drew, and Highlight Strength sets by how much. It is arithmetic on two numbers already on your screen.
HTF Layer Dimming adds transparency to the whole context grid on top of whatever its colours already carry, which is how the second grid stays behind the first instead of doubling the clutter.
Extension Fade fades each extension a little further as it travels away from the leg, so the near ones read as more prominent than the far ones. It counts only the extensions you actually enabled, not their slot in the ladder - so if you turn on just the far ones, the nearest of them is still drawn at full strength rather than arriving pre-dimmed.
Ratio Label Format switches the tags between decimal and percent - 0.618 or 61.8%, minus signs intact either way. Show Price Labels adds the actual price beside each ratio; it is off by default because eight prices is a lot of text.
Line Extension Left/Right and Label Right Offset control how far the grid reaches and how far past it the tags sit. The defaults keep the tags in the empty margin, clear of both the candles and the price scale.
One last thing: any control that cannot do anything greys itself out. Switch the context grid off and its settings dim. Switch to Gradient and the single-colour pickers dim. There is no control in this script that looks live, takes a value, and quietly does nothing.
GETTING STARTED
Add it. You get one grid on today's range, gradient-coloured, golden zone shaded.
Want a different range? Anchor Range. Leave Fib Direction on Auto until it tells you something you disagree with.
Want context from above? Show HTF Context, and leave HTF Mode on Adaptive unless a specific timeframe matters to you.
Want the extensions? Turn them on for whichever grid you want them on, then pick your ratios.
Too busy? Glow off, Fill Between Levels off. You are back to plain lines.
THINGS THAT WILL LOOK LIKE BUGS AND ARE NOT
Swing anchors arrive late. A pivot is not a pivot until Swing Strength bars have printed after it, so on Latest Swing and on the context grid you are always looking at the last confirmed pivot, not the bar in front of you. When a newer one confirms, the anchor moves. That is the price of anchoring to something you can only recognise in hindsight, and it is the same trade every swing-based tool makes.
The day and week ranges are live. Current Day and Current Week use the period's running high and low, so the grid re-scales when the session makes a new extreme. It is showing you the range as it stands, not a finished one.
It draws one grid, not a history of them. You get the current grid, redrawn as things move. There is no trail of old ones behind you.
Higher-timeframe data uses the documented confirmed-value form - the expression is offset by one bar and the request passes barmerge.lookahead_on. Together, that is the pattern the Pine Script documentation gives for reading a higher timeframe without pulling unclosed data into historical bars. The source is open, so you can read the call rather than take my word for it.
Custom HTF at or below the chart timeframe draws nothing at all , and says nothing about it. Worth remembering before you conclude the context layer is broken.
A 12-month chart draws no context grid. 12M is the top of TradingView's interval list, so Adaptive has nothing left to step up to. 3-month and 6-month charts both work.
Prices come from standard OHLC via ticker.standard(), so your levels are the same on Heikin Ashi, Renko, Kagi, Line Break and Point and Figure as they are on candles. The synthetic geometry of those chart types can still put the lines somewhere you would not expect.
WHAT IT DELIBERATELY DOES NOT DO
No alerts. No signals. No scores, ratings or probabilities. No zones, no nested zones, no centre line. It draws Fibonacci levels, labels them honestly, and stops. If you want something that tells you when to act, this is not it.
WHY IT IS DIFFERENT
Four self-maintaining ranges instead of a two-point drag you place today and replace tomorrow. Two independently configured grids on one continuous number line, with the higher one dimmed to sit behind rather than on top. Extensions numbered on the same ruler as the retracements, matching the tags TradingView's own tool gives those prices, rather than a second scale running the other way. A swing range that is genuinely one leg, because the pivot pair is kept alternating. And colour that carries information - a level's hue states its depth - instead of a palette applied to identical lines.
Open source under the Mozilla Public License 2.0. インジケーター

Swing Persistence Profile - Pivot Width SurvivalSwing Persistence Profile ranks every swing high and swing low on the chart by the widest pivot
window it survives. It is also explicit about the exact bar on which that rank becomes knowable,
and it shades the region where it is not knowable yet.
THE IDEA
A pivot is not a property of a bar on its own. It is a property of a bar together with the width
of the window it was compared against. The same high is a swing high when you look two bars either
side, and is not a swing high when you look thirteen. Tools that ask you to pick one width and
then draw the result bury that choice inside a single number.
This script evaluates up to five widths at once - 2, 3, 5, 8 and 13 bars each side by default -
and records, for every bar, the widest width at which that bar is still the extreme of its window.
That number is the bar's persistence depth.
Because widening a window can only add constraints, the widths are strictly nested: a bar that is
the highest of its 13-bar neighbourhood is necessarily also the highest of its 8, 5, 3 and 2-bar
neighbourhoods. Depth is therefore a single ordered rank rather than five separate opinions that
have to be reconciled. A depth-13 swing is a depth-3 swing that kept going.
TIMING
A pivot of width w cannot be identified until w bars have closed after it. That is arithmetic, not
an implementation detail, and it means a bar's persistence depth is not final until the deepest
active width has passed.
There is one further subtlety that most pivot scripts leave in place. The w-th bar after the
candidate is itself still forming while it is the live bar, and its own high or low can still
invalidate the pivot. A script that reads the verdict during that bar will show a marker that
changes, or vanishes, before the bar closes.
This one waits one bar longer. Every verdict it reads comes from a bar that has already closed, so
the confirmation lag is the deepest active width plus one bar. A marker is created once, on the
bar it describes, and is then left alone: it is not moved, recoloured or deleted on later bars,
and it does not flicker intrabar either.
The bars still inside that delay are shaded, so the region where the answer can still change is
visible on the chart instead of being left to inference. Nothing inside the shaded region has been
ranked yet, so an empty shaded region means "not decided," not "no swings here."
WHAT IS DRAWN
A marker on each qualifying swing, placed on the bar that made the extreme, coloured and sized by
depth, optionally printing the depth as a number.
An optional structure line joining swings at or above one chosen depth, alternating between highs
and lows. The most recent segment extends if a later bar sets a more extreme value in the same
direction; once a swing in the opposite direction closes a segment, that segment is fixed.
An optional higher-timeframe reference: the price of the most recent confirmed swing high and
swing low measured on a higher timeframe, drawn as a stepped level. The requested expression is
offset by one bar and the request uses lookahead, which is the pair the Pine Script documentation
specifies for confirmed higher-timeframe values, so historical and realtime bars receive the same
series. The level therefore lags by the reference width plus one bar of the reference timeframe,
and that lag is the point rather than a defect.
Optional alerts on a swing reaching a chosen depth. The alert fires as many bars after the swing
as the deepest active width plus one; the swing itself is on the earlier bar. Because every
verdict is read from a closed bar, "Once Per Bar" and "Once Per Bar Close" fire on the same bar.
THE TABLE
"Swings" counts how many swings reached at least that depth across loaded history, highs and lows
together. "Kept" is the share of the previous row's swings that survived into this row. "Bars ea"
is the average number of bars per swing at that depth. The footer reports the confirmation lag in
bars and how many bars have been rated.
The survival ratios describe the instrument and timeframe you are looking at, not any particular
trade. If most depth-2 swings die at depth 3, the chart is producing many local extremes that do
not extend. If they survive, the same series is producing fewer and longer swings. Comparing that
profile across timeframes or across symbols is a way of choosing a swing width that matches how a
market actually moves, rather than choosing 5 because 5 is a common default.
Counts cover every bar of history the chart has loaded, so they are comparable between symbols
only when the loaded history is comparable.
SETTINGS
Depths in use activates between two and five of the width slots. Reducing it also shortens the
undecided region at the right edge, because that region is as long as the deepest active width
plus one settling bar.
Every depth threshold in the script - minimum depth to mark, minimum depth for the structure line,
and the alert depth - is stated in BARS EACH SIDE, not as a slot number. With the default widths,
"minimum depth 3" means the second of the five slots. A threshold set above the deepest active
width produces nothing, by design.
Enter the widths in ascending order. The ranking itself does not require it, but the table only
reads as a survival sequence when they ascend, and "Kept" can exceed 100% if they do not.
The higher-timeframe reference width is counted in bars of that timeframe: a width of 5 on a daily
reference means five daily bars each side.
WHO IT IS FOR
Anyone who uses swing points as an input to something else - reading structure, choosing the
lookback for a range or a channel, deciding how far back a level should be considered relevant -
and would rather see how sensitive those points are to window width than settle it by habit. It is
also usable as a calibration step before fixing a pivot length in another tool.
WHAT IT DOES NOT DO
It produces no entries, exits, targets, direction or bias, and nothing in it should be read as
one. It measures the geometry of the price series and stops there. Persistence depth describes
what has already happened; a deep swing is not evidence about what happens next.
NOTES
Highs and lows come from the chart series. On non-standard chart types - Heikin Ashi, Renko, Kagi,
Point and Figure, Range - those values are synthetic, and the depths will describe the synthetic
series rather than the market. The script declares alert conditions, so it should be used and
presented on a standard chart type.
TradingView permits 500 labels and 500 lines per script. On long histories the platform drops the
oldest drawings as newer ones are created, so the left edge of a deep history may be bare. This
does not affect the table, which counts every rated bar.
Persistence depth for highs and lows, and the bar index each verdict refers to, are available in
the Data Window. Those values describe the bar named by "Swing bar index," not the bar the cursor
is on.
One data request is made for the higher-timeframe reference whether or not it is displayed, so
enabling it costs nothing extra.
ORIGINALITY
The built-in ta.pivothigh() and ta.pivotlow() functions are used as the primitive, as they are in
a great many scripts. Everything above them is written for this script: running several widths in
parallel, aligning their verdicts onto a common bar so that they can be compared, reducing them to
one nested rank, deferring every drawing until that rank is final on closed data, marking the
region where it is not yet final, and reporting the survival ratios between widths.
Open source under the Mozilla Public License 2.0. The logic is described above in enough detail to
be checked line by line against the source. インジケーター

Market Structure + Swing Levels [AFD]Market Structure + Swing Levels organizes confirmed swing highs and
swing lows into configurable price Zones. Its default ATR mode sizes each
individual Zone from volatility at the Swing origin Bar; Tick, Point, and
Currency modes provide fixed-distance alternatives. It then describes
confirmed continuation Breaks, direction-changing Shifts, and the initial
direction assignment without trade instructions or predictive claims.
## Publication and license
- Publication type: Open-source.
- Pine version: 6.
- License: Mozilla Public License 2.0 (MPL 2.0).
- The open-source publication setting, this description, and the MPL 2.0
notice in the Pine source header must remain aligned.
The source is available for inspection and modification under MPL 2.0. This
summary identifies the applicable license; the notice in the Pine source
header remains the authoritative license reference.
## Capabilities
- Confirms Swing Highs and Swing Lows using the same selected strength on both
sides of the candidate Bar.
- Shows classifications by default: `H`, `HH`, `EH`, and `LH` for highs, and
`L`, `HL`, `EL`, and `LL` for lows.
- Builds ATR-, Tick-, Point-, or Currency-width Zones around confirmed Swings.
- Merges transitively overlapping same-side Zones into exact-union clusters.
- Evaluates Structure on confirmed Bars using selectable Close or Body
clearance.
- Lets Zone breaks use that Structure rule or an inclusive High/Low Touch of
the far edge.
- Retains broken Zones by default with configurable memory and color.
- Reports current direction, latest Structure event, active Zones, and
nearest-Zone distance in the Dashboard.
- Provides four fixed Structure alert conditions plus an optional combined
dynamic alert that can include Zone breaks.
## How to use it
1. Select a Preset Profile or choose Custom and set Swing Strength. The default
Swing profile uses a strength of 7 Bars on each side.
2. Choose the Zone Width Mode and width appropriate for the chart.
3. Choose how Structure confirms a clearance. Close is the default; Body
requires both the Open and Close to clear the reference.
4. Zone Break Basis follows the Structure rule by default. Touch (High/Low)
instead breaks a Zone when the wick reaches or passes its far edge.
5. Swing High and Swing Low Zone labels start at the oldest Swing Origin
represented by each Zone. Select Right Edge when current-Bar alignment is
preferred.
6. Swing High and Swing Low text have separate color controls. Both default to
white and also color the matching Swing classification labels. Zone Age,
Break, Shift, and Dashboard text also start white.
7. The Dashboard starts with all five rows visible. Disable nearest-Zone
distance when only Direction, Last Event, and Zone counts are needed.
8. Show Broken Zones starts on with a 20-Bar memory. Turn it off for an
active-Zones-only chart.
9. Zone Age starts off. When enabled, its unit starts in Days.
## How to interpret Zone cluster counts
The `×N` suffix is a cluster membership count. `Swing High ×3` means three
confirmed Swing High Zones are represented by that merged cluster.
It does not mean price tested one exact price three times. Zones merge when
their price bands overlap or meet at an edge. Merging is transitive, so one
connected Zone can bridge two other Zones even when those outer Zones do not
directly overlap each other. The displayed cluster preserves the full union of
those connected bands, and `×N` reports how many confirmed Swing Zones
contributed to it.
## Broken Zones
Show Broken Zones is the explicit on/off control:
- On by default — the Zone freezes at its break-confirmation Bar, changes to
Broken Zone Color, and remains visible for the selected Broken Zone Memory.
- Off — a Zone is deleted as soon as it breaks.
- Up to 20 broken Zones are retained. If more accumulate before their memory
expires, the oldest retained Zone is removed first.
This display choice does not change how Zone breaks are detected and does not
change alert behavior.
## Limitations and evidence
- Swings require the selected number of Bars on both sides, so confirmation
occurs after the origin Bar.
- ATR Zone width uses volatility from the Swing origin Bar.
- Currency-width mode creates no Zone when the symbol does not provide a valid
Point Value.
- Active Zones are capped at 40 per side. When the cap is reached, the oldest
active Zone on that side is removed first.
- Hours and Days shown for Zone Age are timeframe-based approximations and do
not correct for session gaps.
- Cluster membership describes connected Zone bands, not repeated reactions at
one exact price.
- Repository checks pass for the working source. TradingView compilation and
runtime verification of the latest working source have not yet been
recorded.
- This indicator is educational chart context and does not provide trade
instructions. インジケーター

Fibonacci Levels Engine [StrixEDGE]What It Does
Fibonacci Levels Engine automatically detects the most recent swing high and swing low within a configurable lookback window, draws the standard Fibonacci retracement grid (0 %, 23.6 %, 38.2 %, 50 %, 61.8 %, 78.6 %, 88.6 %, 100 %) plus the 127.2 % and 161.8 % extensions, and projects every level into the future so you can see where price is heading relative to the structure.
What separates this indicator from a plain Fibonacci overlay is the Edge Analysis layer — three original components that work together to tell you how meaningful a given Fibonacci zone is right now, not just where it sits on the chart:
1. Edge Score (0–100) — A composite confluence gauge displayed in the dashboard.
2. Proximity Heatmap — Dynamic line opacity that makes levels glow as price approaches them.
3. ATR Volatility Band — A band around the Golden Zone midpoint that adapts to current volatility.
How It Works
Core: Swing Detection & Fibonacci Grid
The indicator scans the last N bars (default 20, configurable 5–300) to find the highest high and lowest low. It determines trend direction by comparing which extreme occurred first: if the swing low is further back in time than the swing high, the structure is bullish (price moved from low to high); otherwise it is bearish. Fibonacci ratios are then calculated from that range and drawn as horizontal levels from the swing origin to a user-defined projection length (default 30 bars into the future).
Two shaded zones highlight areas of interest:
- Golden Zone (0.618–0.786) — the highest-probability retracement area in classical Fibonacci theory.
- Deep Zone (0.786–0.886) — often the last line of defense before a full retracement.
Both zones, the 50 % midline, and the extension levels can be toggled on or off independently.
Edge Score — Confluence Gauge
The Edge Score combines three independent measurements into a single 0–100 reading:
RSI Momentum Alignment | 0–35 | In a bullish structure, a low RSI (below 35) scores highest because it signals oversold conditions near support. In a bearish structure, a high RSI (above 65) scores highest. Intermediate RSI values receive proportionally lower scores. |
| Proximity to Golden Zone | 0–35 | Measures the absolute distance between the current close and the Golden Zone midpoint as a ratio of the total Fibonacci range. The closer price is to the midpoint, the higher the score. |
| EMA Trend Alignment | 0–30 | Checks the stacking order of the 8, 21, and 55-period EMAs. A fully aligned stack (e.g., EMA 8 > EMA 21 > EMA 55 in a bullish structure) scores 30; partial alignment scores 20; misalignment scores 10. |
The resulting score is classified as STRONG (≥ 75), MODERATE (≥ 50), WEAK (≥ 25), or LOW (< 25) and displayed with a color-coded label in the dashboard. A high Edge Score means RSI, price proximity, and trend direction are all converging at the Fibonacci zone — not just that price touched a line.
Proximity Heatmap
Every Fibonacci level's line opacity is recalculated on each bar based on how far the current close is from that level. When price is near a level, the line becomes more opaque (visually brighter); when price is far away, the line fades. This is computed as a transparency value derived from the ratio of (distance to level) / (total Fibonacci range), scaled between 10 and 75. The effect lets you instantly see which levels are "active" without scanning numbers — the relevant lines stand out on their own.
ATR Volatility Band
A translucent band is drawn around the Golden Zone midpoint, extending ± 0.5 × ATR (default 14-period). This addresses a practical problem: a Fibonacci level is a single price, but real entries need a buffer that accounts for market noise. The band widens in volatile conditions and contracts in quiet ones, giving you a dynamic "fair value area" inside the Golden Zone rather than a fixed line.
Dashboard Panel
A compact table in the top-right corner of the chart displays:
- Trend — Current structural direction (Bull / Bear) with color coding.
- Edge — The composite Edge Score and its label.
- RSI — Current RSI value, color-coded for overbought/oversold extremes.
- G-Zone — Live status showing ✅ with the midpoint price when the close is inside the Golden Zone
or ⏳ Waiting when it is outside.
- ATR — Current Average True Range value.
- Range — The total Fibonacci range (swing high minus swing low).
Dashboard text size is adjustable (Tiny / Small / Normal / Large).
How to Use It
Identify the structure — Add the indicator to your chart. The dashboard immediately tells you whether the current swing structure is bullish or bearish and shows the Edge Score.
Watch the Golden Zone — When price pulls back toward the 0.618–0.786 area, check the dashboard: a high Edge Score (50+) means RSI and trend EMAs are aligned with the retracement, which increases the odds of a bounce. The G-Zone row will switch from ⏳ to ✅ when price enters the zone.
Use the Volatility Band for entries — Rather than placing a limit order on the exact 0.618 or 0.786 line, use the ATR band as your entry zone. It automatically adjusts to current volatility, giving you a wider buffer in choppy markets and a tighter one in clean trends.
Read the heatmap — Glowing lines tell you which levels price is currently interacting with. If a line is bright and the Edge Score is high, that level carries more weight. If the line is faded, price is far away and the level is not in play.
Settings Overview
- Pivot Lookback (5–300, default 20) — Number of bars scanned for swing high/low detection.
- Right Projection (5–200, default 30) — How far levels extend into the future.
- Golden Zone / Deep Zone / 50 % / Extensions — Toggle individual level groups.
- Edge Score Panel — Show or hide the dashboard.
- ATR Volatility Band — Show or hide the dynamic band.
- Proximity Heatmap — Enable or disable the distance-based line opacity effect.
- ATR / RSI Length — Periods for the ATR and RSI calculations used in the Edge Score and Volatility Band.
- Style — Full color customization for bullish/bearish, zones, bands, levels, labels, and line width.
Set alerts — Four built-in alert conditions are included:
- Price enters the Golden Zone (0.618–0.786)
- Price enters the Deep Zone (0.786–0.886)
- Edge Score reaches 75 or above (strong confluence)
- Price crosses the 0 % or 100 % level (breakout / full retracement) インジケーター

Bedaiwi's Smart PivotsBedaiwi's Smart Pivots is a three-level market-structure indicator that classifies price turning points as Minor, Intermediate, and Major highs and lows.
HOW IT WORKS
Minor Pivots
A Minor High is confirmed when the middle bar of a three-bar formation has a high that is strictly higher than the highs immediately before and after it.
A Minor Low is confirmed when the middle bar has a low that is strictly lower than the lows immediately before and after it.
Equal highs and equal lows are not treated as Minor pivots.
Intermediate Pivots
Intermediate pivots are derived from confirmed sequences of Minor pivots.
An Intermediate High is identified when a higher Minor High is followed by a lower Minor High.
An Intermediate Low is identified when a lower Minor Low is followed by a higher Minor Low.
Major Pivots
Major pivots apply the same hierarchical logic to confirmed Intermediate pivots.
A Major High is identified when a higher Intermediate High is followed by a lower Intermediate High.
A Major Low is identified when a lower Intermediate Low is followed by a higher Intermediate Low.
SYMBOLS AND COLORS
- Red diamond: Intermediate High
- Green diamond: Intermediate Low
- Red exclamation mark: Major High
- Green exclamation mark: Major Low
Optional Minor pivots use the same High and Low color settings.
When the replacement option is enabled, an Intermediate symbol is removed and replaced with an exclamation mark if the same point is later promoted to Major status.
HISTORICAL PLOTTING AND CONFIRMATION DELAY
Pivot identification requires subsequent price information.
A Minor pivot is confirmed only after the following bar closes. Intermediate and Major pivots require additional confirmed pivot sequences, so their confirmation occurs later.
After confirmation, the indicator places the symbol on the historical bar where the relevant high or low occurred. Therefore, a symbol displayed on an earlier bar was not necessarily available in real time on that bar.
Historical placement is used only to show the actual location of the confirmed turning point. It should not be interpreted as a signal that was known on the historical pivot bar.
SETTINGS
Users can:
- Show or hide Minor pivots
- Show or hide Intermediate pivots
- Show or hide Major pivots
- Replace an Intermediate symbol when it becomes a Major pivot
- Customize High and Low pivot colors
PRACTICAL USE
Smart Pivots can help users:
- Study market structure
- Identify significant historical swing highs and lows
- Separate short-term fluctuations from higher-level price structure
- Review possible support and resistance areas
- Add context to discretionary price-action analysis
LIMITATIONS
Smart Pivots is an analytical indicator. It does not place trading orders and does not define entries, exits, stop-loss levels, profit targets, position sizing, or expected returns.
Pivot confirmation is delayed by design because later price action is required. Results may vary between symbols, timeframes, sessions, and data feeds.
The indicator does not identify final market tops or bottoms with certainty. Historical observations do not guarantee future market behavior.
This script is provided for research and educational purposes only. It is not financial or investment advice. インジケーター

NSE/BSE Key Support & Resistance | MTF Pro-3.1Advanced pivot-based Support & Resistance with multi-timeframe confluence, strength scoring, volume-confirmed breaks, and adaptive zone visuals — built specifically for Indian stock market (NSE/BSE).
Overview
Most S&R indicators draw every pivot as an equal horizontal line and extend it infinitely to the right — creating cluttered, unreadable charts. This indicator solves that by scoring every level based on how strongly price rejected it , merging overlapping levels from different timeframes into a single confluence zone, and only showing the levels that actually matter.
Built and tuned specifically for NSE and BSE stocks, indices (Nifty 50, Bank Nifty, Sensex), and F&O instruments.
Key Features
🔷 Multi-Timeframe Support (4 TFs)
Enable up to 4 independent timeframes simultaneously. Each timeframe's pivots are detected separately and tagged in the label — , , , . You choose which timeframes to activate.
🔷 Cross-TF Confluence Merge
When two different timeframes produce a pivot at nearly the same price (within ATR proximity), they automatically merge into a single stronger zone instead of drawing two overlapping boxes. The label shows both sources — — and the level receives a confluence strength bonus. These merged zones are your highest-priority trade levels.
🔷 Advanced Strength Scoring
Every level carries a live strength score (★) that accumulates over time. Each touch is scored individually based on:
Wick size relative to candle range (how strongly price rejected)
Distance of close from the level (how convincingly price pulled back)
Whether volume was above average on that candle
Whether a strong body / engulfing candle formed
A barely touching wick scores ~0.5. A high-volume hammer rejection scores ~5–6. The score drives both zone opacity and zone width — strong levels appear bold and wide, weak levels fade visually.
🔷 Volume-Based Break Filter
A level is only invalidated when price closes beyond it and volume meets a configurable threshold (default: 1× average volume). Low-volume spikes through a level are ignored as false breakouts — the zone remains valid. Break alerts include the volume ratio so you know the conviction behind the move.
🔷 Adaptive Zone Visuals
No right extension — zones terminate at the current bar (valid) or the break bar (broken). No infinite lines cluttering the right side of your chart.
Opacity scales with strength — strongest levels are most visible, weakest levels are nearly transparent.
Zone width scales with strength — high-confidence zones are wider, giving a visual sense of the price area's importance.
🔷 Clean Labels
Each label shows the full picture at a glance:
21450.00 ★6.5 ×3
Timeframe source | Price | Strength score | Touch count
Settings Guide
SettingWhat it doesPivot LengthBars each side to confirm a pivot. Higher = fewer, stronger levelsMin StrengthHide levels below this score. Raise to show only confirmed levelsATR Merge DistanceHow close two levels must be to merge into oneInvalidationClose-based (reliable) or Wick-based (faster) break detectionVolume Break FilterRequire above-average volume to confirm a breakoutMin Volume MultiplierHow many times average volume needed to confirm a breakMax Active LevelsCap total zones shown on chartStrength → Zone OpacityToggle adaptive opacity based on strength score
How to Use
Bounce trades — price enters a green (support) zone → wait for a rejection candle with volume → enter above the rejection candle high, SL below zone bottom.
Rejection trades — price enters a red (resistance) zone → wait for a bearish candle with volume → enter below candle low, SL above zone top.
Breakout trades — price closes beyond a zone with high volume (break alert fires) → wait for pullback to the broken level → trade in the direction of the break.
Highest priority setups — zones tagged or with ★ score above 5 and multiple touches. These are the levels institutional money respects.
Alerts
The indicator fires alert() calls for:
Break confirmed — includes ticker, price, and volume ratio
Retest — includes ticker, price, and touch quality score
Set alert condition to "Any alert() function call" in TradingView's alert dialog.
Notes
Designed and tested on NSE/BSE equities and F&O stocks
Works on any timeframe from 1 minute to Weekly
All calculations are original — pivot detection, strength engine, confluence merge, and volume filter are built from scratch in Pine Script v6 インジケーター

インジケーター

EMA Ride Scanner V2.a (Toggle) - AshishShort Description
A dual-mode EMA9/21/50 trend-ride scanner with volume classification and a relative-strength "Grinder Mode" for stocks that trend without ever coiling tight enough to trigger a squeeze. Use alongside its companion, SQZ_SCAN, for momentum timing.
What it does
EMA Ride Scanner V2.a finds stocks in a clean, established uptrend and flags healthy pullback zones to buy — instead of chasing breakouts after the move has happened. Built on ideas from Qullamaggie's Episodic Pivot framework, Stockbee's price-neglect filter, and VCPSwing's 10/20-MA ride philosophy.
It checks: EMA9>21>50 stack alignment, minimum ride duration, distance from 52-week low, and volatility contraction. Volume bars are color-coded as EP surges, distribution, or healthy dips.
Two modes (single toggle)
Standard Mode (toggle OFF) — for stocks that coil and release. Flags a 0-5% pullback to EMA9, ideally on light volume. Pair with SQZ_SCAN for the breakout-timing signal.
Grinder Mode (toggle ON) — for stocks that never coil. Some strong trends have such low, steady volatility that they never compress enough to trigger a squeeze — by the time SQZ_SCAN fires, they've already run too far from EMA9 to count as a dip. Grinder Mode drops the squeeze requirement and instead checks: low ATR, long ride above EMA21, and meaningful outperformance vs a benchmark index (momentum begets momentum). If price is also near EMA9/21, it flags a Grinder Setup.
Note: cloud-bounce count is shown for visual reference only, not used as a filter — low-ATR stocks often show very few bounces simply because they ride EMA9 continuously rather than dipping and recovering.
Companion: SQZ_SCAN
SQZ_SCAN shows when volatility compression releases into a confirmed move — WATCH (squeeze building), EARLY FIRE (just released), or BUY (released + volume confirmed). NOTE: As with most indicators, this is a lagging indicator on a daily timeframe, and accuracy reduces significantly on lower timeframes.
Workflow:
Screen with EMA Ride Scanner (Standard Mode) for clean pullback candidates.
Check SQZ_SCAN on each — prioritize WATCH/EARLY FIRE/BUY.
Separately, screen Grinder Mode for low-volatility names — don't require SQZ confirmation here, it structurally won't fire for this archetype.
Sanity-check on hourly before entry — only to rule out an active breakdown, not as a hard gate. Both indicators are daily-timeframe tools; hourly readings are noisy and shouldn't override a valid daily setup.
What this isn't
A screening tool, not a full trading system — no buy/sell signals, no risk management built in. Combine with your own entry timing, sizing, and stops. インジケーター

Liquidity Sweep Retracements [MarkitTick]💡An advanced analytical framework designed to decode market micro-structure by evaluating the depth, speed, and statistical probability of price pullbacks. Rather than relying solely on static Fibonacci levels, this tool dynamically tracks the historical characteristics of an asset's swing behavior, alerting the user to structural anomalies and shifts in momentum. By intersecting retracement analysis with liquidity sweep detection and a built-in heatmap, this framework offers a comprehensive lens into market behavior, isolating environments where trend continuation is highly probable versus areas prone to exhaustion.
✨ Originality and Utility
Standard market analysis often relies on rigid tools that do not adapt to changing volatility conditions. This script introduces a highly original dynamic evaluation method by actively saving the characteristics of recent price swings into an internal array and establishing a moving statistical baseline.
The primary utility of this script lies in its multidimensional analysis. It does not just measure how far price has pulled back; it calculates how fast the pullback occurred and compares this velocity to the asset's recent historical baseline. This enables the framework to categorize price action not merely as a "pullback," but as a statistically significant "Anomaly" or an "Aggressive" move. Furthermore, by weaving Higher Timeframe (HTF) trend alignments and localized liquidity sweep detections into a single, cohesive dashboard and visual charting environment, it reduces chart clutter while exponentially increasing the depth of available data.
🔬 Methodology and Concepts
● Swing Structuring and Pivot Detection
The foundational logic relies on identifying structural pivot highs and lows through a localized lookback and look-forward window. The algorithm requires a definitive peak or trough isolated by user-defined left and right bars, establishing the anchor points for all subsequent mathematical measurements.
● Dynamic Retracement Scoring
Once a swing structure is confirmed, the script calculates the exact percentage of the retracement relative to the preceding impulse. These percentages are continuously categorized into defined behavioral zones:
Impulse (Less than 23%)
Shallow (Less than 38%)
Healthy (Up to 61.8%)
Deep (Up to 78.6%)
Reversal (Beyond 78.6%)
● Retracement Momentum Velocity (RMV)
Time and price are merged to extract velocity. By dividing the total percentage of the retracement by the number of bars it took to form, the script generates a velocity reading. This reading is dynamically compared against an array of historical velocities to determine if the current counter-trend move is unusually aggressive.
● Statistical Anomaly Detection
The script manages historical arrays of past retracement data, calculating a rolling mean (average) and standard deviation. An anomaly is triggered when a live retracement deviates significantly from this moving baseline, determined by a user-defined standard deviation multiplier. This mathematically highlights structural shifts before they mature into full trend reversals.
● Liquidity Sweep Verification
The indicator actively monitors price interactions with localized structural extremes. A bullish sweep occurs when price pierces a recent significant low but closes decisively above it, creating a structural trap. Bearish sweeps apply the inverse logic to structural highs.
🎨 Visual Guide
● Heatmap Candles
The script overrides standard candle colors with a dynamic heatmap that visually translates the health and speed of the current retracement:
Green indicates a healthy, standard retracement zone.
Orange highlights a weak zone, suggesting the trend is losing foundational strength.
Red warns of a deep structural violation bordering on a reversal.
Purple explicitly signifies an aggressive Retracement Momentum Velocity (RMV), warning of high counter-trend momentum.
● Price Action Overlays and Labels
Pivot Highs and Lows are marked precisely with small red and green crosses. (Note: These appear retroactively once the defined right-side bars confirm the pivot).
Data Labels are plotted at swing extremes. These carry a dark blue-gray background with dynamic text colors. They display the exact retracement percentage alongside quality badges, anomaly alerts (orange for opportunity, red for danger), and RMV warnings.
● Liquidity Markers
When a sweep is detected, small distinct shapes appear. "LS" text markers are plotted in bright green below bullish sweeps and bright red above bearish sweeps, visually anchoring liquidity traps directly onto the price action.
● The Analytical Dashboard
Located in the top right corner, this panel serves as the central intelligence hub. It utilizes shaded backgrounds to organize critical data natively on the chart.
Retracement and Health bars utilize block characters (█/░) to visualize strength out of 100%.
HTF Alignment displays the macro bias via clear text and color codes (Green for Bullish, Red for Bearish).
The dashboard aggregates averages, velocities, and quality metrics into a readable, high-contrast matrix.
📌 Note : the best way to resolve visual overlap is to navigate to the Object Tree and drag the indicator above the main chart layer, or simply hide the native candles in your chart settings.
📖 How to Use
Traders should monitor the dynamic relationship between the visual candle heatmap and the dashboard metrics.
Trend Continuation: Look for retracements that remain within the "Healthy" or "Shallow" zones (highlighted by green candles and positive dashboard health scores) that align with a bullish HTF signal.
Anomaly Exploitation: If an anomaly label appears marking a shallow retracement (orange text warning), this historically suggests an unusually strong impulse where standard deep pullbacks may not materialize.
Exhaustion Warnings: If the candles shift to purple, indicating an RMV Aggressive state, the counter-trend velocity is statistically high. Traders may use this to delay entries until momentum normalizes, or to identify structural traps if this aggression ends in a marked Liquidity Sweep (LS marker).
⚙️ Inputs and Settings
• Swing Settings
Controls the sensitivity of pivot detection. Higher values filter out market noise for major swing structures, while lower values react quickly to micro-trends.
• Retracement and Anomaly Parameters
Dictates the maximum number of historical retracements held in the memory array. The Standard Deviation Threshold allows users to expand or contract the mathematical boundary for what qualifies as an anomaly.
• RMV (Velocity) Limits
Controls the aggression threshold. Adjusting the multiplier determines how much faster a retracement must be compared to the historical average to trigger the purple heatmap and aggressive warnings.
• Liquidity Sweeps
Defines the lookback length for identifying local highs and lows that act as liquidity pools.
• Alerts and Dashboard Configuration
Enables fully customizable JSON-formatted alerts based on statistical deviations, and allows users to toggle or completely restyle the visual dashboard and heatmap components.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
This indicator is heavily anchored in statistical mechanics and kinematics principles applied to financial time-series data.
• Gaussian Distribution and Variance
Instead of utilizing fixed geometric sequences (such as the Golden Ratio), the framework treats market swings as a dataset exhibiting normal distribution characteristics. By calculating the variance and extracting the standard deviation of historical swing depths, the script establishes mathematically sound confidence intervals. When price action breaches these standard deviation bands, it represents a statistically significant outlier, formally alerting the user to a fat-tail market event.
• Financial Kinematics
The integration of Retracement Momentum Velocity (RMV) introduces physics-based kinematic principles to price action. In traditional mechanics, velocity is the rate of change of position with respect to a frame of reference. The algorithm defines the frame of reference as the structural swing, calculating velocity as the percentage of displacement per unit of time (bars). By tracking the rolling average of this velocity, the script can algorithmically determine when kinetic energy in a counter-trend direction is statistically abnormal, independent of the actual price level reached.
⚠️ 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. インジケーター

インジケーター
