Advanced Support and Resistance with Reversal [AlphaPine]Advanced Support and Resistance with Reversal | AlphaPine
I built this indicator for a simple reason: a breakout line on its own does not tell me enough. I also want to know whether price comes back, holds the level from the other side, and later loses it again.
The script starts with confirmed swing highs and lows. Those become resistance and support. It then follows each level through three possible events: breakout, retest, and failure. Nothing here predicts the next move. It is a way to keep market structure organised without redrawing the same levels by hand.
The image below shows the full level lifecycle in one view, including the symbols that appear at each stage:
How a level is created
A resistance level comes from a confirmed pivot high. A support level comes from a confirmed pivot low. If zones are enabled, the zone uses the wick range of the pivot candle rather than an arbitrary fixed width.
Pivot confirmation takes time. With Pivot Length set to 10, for example, the script needs ten bars on the right side of the pivot before the level exists. This delay is intentional.
Pivot Length controls how selective the swing detection is. A larger value usually gives fewer levels and confirms them later.
Lookback Period sets how long a level remains in the script's working history.
Maximum Levels per Type limits stored resistance and support records so the chart does not keep growing indefinitely.
Wick Dominance Filter keeps only pivot candles whose rejection wick is larger than the body and opposite wick.
Merge Nearby Active Levels removes clutter by skipping a new pivot when an active level of the same type is already nearby. Broken levels do not block a fresh one.
The merge distance uses ATR-14, so it adjusts to the instrument instead of relying on one fixed price interval.
Breakouts
The default breakout mode is Close . Resistance must close above its boundary, while support must close below it. This avoids counting every small wick through a level.
Wick mode reacts earlier. It triggers when the high or low crosses the boundary during the live candle. The recorded extreme cannot retract, but price can still close back inside the level, so Wick mode will naturally include more intrabar fakeouts.
Breakout Buffer adds an optional ATR-based distance beyond the level. Leave it at zero for the exact boundary, or raise it if very small breaks are not useful for your chart.
By default:
A resistance breakout prints an upward blue triangle below the candle.
A support breakout prints a downward orange triangle above the candle.
The marker colours are fully adjustable.
Retests and role reversals
After resistance breaks, the script waits to see whether price can retest it as support. After support breaks, it watches for the same level to act as resistance.
RS means old resistance has been confirmed as new support.
SR means old support has been confirmed as new resistance.
Reversal Confirmation controls what counts as a retest:
Close (default) requires the retest candle to touch the original zone and close back beyond the whole zone on the new-role side.
Touch accepts any later overlap with the zone. It is more sensitive and less strict.
Once confirmed, the new role stays fixed. An RS level remains tracked as support; it does not turn red merely because the latest candle happens to sit below it.
When a flip fails
A flipped level is removed when a confirmed candle closes through the far side of its zone. In other words, RS support fails below the zone and SR resistance fails above it.
If Show Reversal Failures is enabled, an ✕ marks the failure candle. The flipped line stops there, but the cross stays on the chart as a record of where the level died. That is why a failure cross can appear without a continuing line.
Breakout triangles and failure crosses use the original pivot as their Lookback anchor. This keeps their expiry on the same structural clock as the level they came from instead of giving every marker a new lifetime from its event candle.
Reading the chart
R1 is the nearest active resistance above price, followed by R2, R3, and so on.
S1 is the nearest active support below price, followed by S2, S3, and so on.
RS marks a confirmed resistance-to-support flip.
SR marks a confirmed support-to-resistance flip.
Triangles mark breakouts. Crosses mark failed flips.
A breakout marker is an event, not an entry instruction. I find the retest more useful than the first break, but how it is traded still depends on trend, execution, and risk rules outside this indicator.
Lines, zones, and historical placement
Historical Level Start decides where an original level begins:
Confirmation (default) starts it on the bar where the pivot became known in real time.
Pivot extends it back to the swing candle. This is useful for visual context, but the level was not available on that earlier candle.
Display as Zones replaces the single-price lines with the original pivot-wick range. If that level flips, the same price range is preserved; the zone is not moved to the opposite side of the price.
Colours
The Colors group separates colours by purpose, so changing a label does not force the matching line to use the same colour.
Resistance and support lines/zones.
RS and SR lines/zones.
Resistance, support, RS, and SR price labels.
Resistance and support breakout triangles.
Support and resistance failure crosses.
Zone fills and borders use transparent versions of the selected line colour so candles remain visible underneath.
Alerts
Seven alert conditions are included:
Resistance Breakout
Support Breakout
Resistance to Support Flip
Support to Resistance Flip
Flipped Support Failed
Flipped Resistance Failed
Any S/R Event
The combined alert is useful when one alert should cover every structural event. Separate conditions are available when different actions are needed for breaks, flips, or failures.
A sensible starting setup
The defaults use Close confirmation for both breakouts and retests. Start there if you prefer signals that wait for the candle to finish. Wick breakout and Touch retest are available when earlier, more sensitive reactions are more important.
If the chart feels crowded, try increasing Pivot Length, increasing Merge Distance, enabling the Wick Dominance Filter, or reducing Maximum Levels per Type. Settings should be adjusted for the instrument and timeframe rather than treated as universal values.
Important limitations
Confirmed pivots always arrive late by Pivot Length bars. That is how pivot confirmation works, not a hidden predictive signal.
Pivot historical placement back-draws a confirmed level for context. Use Confirmation placement when real-time availability matters.
Wick mode can mark a breakout that later closes back inside the level.
The current-bar drawings rebuild while the candle updates.
The script uses chart data only. It does not request higher-timeframe data or use lookahead.
It does not place orders, calculate position size, or guarantee that a level will hold.
Use it as a structure tool, then apply your own trade plan and risk management.
指标

Advanced Fibonacci Golden Zone [HexaTrades]Advanced Fibonacci Golden Zone automatically finds the market's significant swing legs and projects the Fibonacci Golden Zone, the 0.5 – 0.618 retracement pocket of the latest leg. That band is where trend-continuation entries are classically hunted. No manual fib drawing: the script detects the swing, anchors the retracement correctly for both directions, draws the zone the moment the swing confirms, manages the setup's whole lifecycle, and drives a duplicate-free alert stream.
⭐️How it works
True late-zone detection:
When a swing confirms, the script scans every bar from the actual pivot through the confirmation bar (wicks or closes, per Zone Touch Source). If the price has already reached the zone's near edge anywhere in that window, the zone is late and is skipped; no zone is ever painted behind a reaction that already happened. Strict rule: exactly touching the edge counts as late.
Superseded setups :
A skipped candidate retires the previously active setup immediately: status “Superseded”, zone frozen/faded, and total silence no false “Invalidated” alert (that one is reserved for setups price actually broke).
Invalidation frozen ATR buffer:
A setup dies when a bar closes beyond the protective swing by more than the Invalidation Buffer (× ATR). The buffer is measured once, at setup creation, and the invalidation price stays fixed for the setup's lifetime; later ATR changes can't move it. Dead zones gray out instantly and can never alert again; a broken leg is “poisoned” so its later extensions can't spawn a fresh setup.
Zone anchoring retracements vs projections
Bullish (up-leg): Retracement anchored at 0.0 at the high, 1.0 at the low → the 0.5–0.618 band sits below price as potential support.
Bearish (down-leg) : Mirror-anchored → the 0.5–0.618 band sits above the price as potential resistance.
Retracements (0–1.0) and continuation projections (1.272× / 1.618× of the impulse, beyond the extreme) are computed by separate functions and labelled separately projections are targets, not retracement ratios.
True late-zone detection :
When a swing confirms, the script scans every bar from the actual pivot through the confirmation bar (wicks or closes, per Zone Touch Source). If the price has already reached the zone's near edge anywhere in that window, the zone is late and is skipped; no zone is ever painted behind a reaction that already happened. Strict rule: exactly touching the edge counts as late.
Superseded setups:
A skipped candidate retires the previously active setup immediately: status “Superseded”, zone frozen/faded, and total silence no false “Invalidated” alert (that one is reserved for setups price actually broke).
Invalidation frozen ATR buffer:
A setup dies when a bar closes beyond the protective swing by more than the Invalidation Buffer (× ATR). The buffer is measured once, at setup creation, and the invalidation price stays fixed for the setup's lifetime; later ATR changes can't move it. Dead zones gray out instantly and can never alert again; a broken leg is “poisoned” so its later extensions can't spawn a fresh setup.
⭐️ Features
- Automatic Golden Zone (default 0.5 – 0.618, both ratios configurable)
- Optional fib levels: retracements 0 · 0.236 · 0.382 · 0.5 · 0.618 · 0.786 · 1.0 + separately labelled 1.272× / 1.618× projections
- ZigZag + HH / HL / LH / LL structure labels with live structure bias
- Historical zones stay frozen & softened; optional “One zone per leg” replaces same-leg drafts in place (off by default)
- Zone lifecycle: Waiting → Inside Zone → Rejected / Broke Out → Invalidated / Superseded dead zones gray out and go permanently silent
⭐️How to use it
- Wait for a fresh zone in the direction of the structure (HH+HL → longs, LH+LL → shorts).
- Let price come into the zone covered by the “Price Enters Golden Zone” .
- Look for the rejection: a candle that gets into the zone and closes back out in the trend direction.
- Targets & invalidation: Target 1 = the 0.0 level (the impulse extreme), Target 2 = the 1.272× projection, Target 3 = the 1.618× projection; status “Invalidated” (close beyond the protective swing + buffer) is the classical exit.
⭐️Alert
1 · Golden Zone Invalidated: close beyond the protective swing + frozen ATR buffer — kills the setup
2 · 1.618× Projection Reached: continuation target hit (also completes 1.272× if reached directly)
3 · 1.272× Projection Reached: continuation target hit
4 · Bullish / Bearish Rejection: candle gets into the zone, closes back out in trend direction (completes the entry latch too)
5 · Zone Breakout: price closes straight through the zone
6 · Price Enters Golden Zone: first touch of the zone
No zone-interaction alert can fire on the candle that creates a setup; signals are eligible from the following confirmed candle.
Bar-close confirmation is enforced in code (barstate.isconfirmed is part of every alert condition); alerts cannot trigger intrabar regardless of the frequency you pick. Still select “Once Per Bar Close”.
Advanced Fibonacci Golden Zone combines confirmed market structure, automatic Fibonacci mapping and complete setup management in one tool. It helps traders identify fresh retracement opportunities without manually drawing Fibonacci levels while keeping invalidation, projections and alerts consistent. Use it alongside trend context, price action and proper risk management—not as a standalone entry signal.
We would love to hear your suggestions. If you have ideas for new features, indicators, analytics, or improvements, please share your feedback. Your input helps guide future updates and improve the indicator for all traders.
Wedge pattern detector indicator is for educational and analytical purposes only. It is not financial advice. Trading involves risk. Always use proper risk management and combine this indicator with your own analysis before taking any trade.
指标

Liquidity Sweep Hunter [BigBeluga]🔵 OVERVIEW
The Liquidity Sweep Hunter is a smart, volume-aware charting tool that automatically detects major support and resistance levels.
Unlike basic horizontal line indicators that just draw lines on every swing high or low, this script filters levels based on volume strength . It identifies the "heavy" levels where big money has clearly participated, projects them forward as active boundaries, and alerts you the exact moment price "sweeps" through them.
🔵 FEATURES
The system works by tracking the relationship between price pivots and real-time volume:
1 — Volume-Weighted Level Detection
Smart Pivot Filtering: The engine identifies price pivots ( Length ) but only confirms a level if the volume at that pivot exceeds your defined Filter threshold. This ignores "weak" pivots and keeps your focus only on high-conviction zones.
Dynamic Intensity Engine: The indicator automatically changes the look of the lines based on volume. Levels created with higher volume activity get thicker lines ( Max Line Width ) and higher opacity, making them visually stand out more on your chart.
2 — Automated Liquidity Sweep & Break Logic
Sweep Alerts (✔): When the price briefly dips below a support level (or spikes above a resistance level) and then closes back inside, the indicator plots a checkmark (✔) to identify the "liquidity sweep."
Smart Self-Cleaning: If the price candles break directly through a support or resistance line, the indicator detects the structural breach, changes the line to a dotted style, and removes it from your active list. This keeps your chart free of outdated, broken levels.
🔵 HOW TO USE
This tool is designed to help you trade based on where market participants have placed their stops and orders:
Identify High-Volume Anchors: Use the thick, bold lines to spot the most important support and resistance levels on your timeframe. These are the zones where the script detected significant institutional interest.
Look for Sweep Confirmations: Watch for the (✔) checkmarks after a line is tagged. A liquidity sweep often signals that the market is grabbing "stop-loss" liquidity before reversing in the opposite direction.
Manage Trade Exit Points: Use the lines as your target zones. Since the script automatically turns lines into "dotted" style when they are broken, you have a visual trigger to cut a position if a key structural level fails.
🔵 NOTES
Why this implementation is unique:
It combines two powerful concepts—volume analysis and pivot structure—into a single, lightweight tool that doesn't overwhelm your chart.
The "Dynamic Intensity" settings allow you to see at a glance which levels are mathematically the most significant based on the volume data behind them.
It is a "self-managing" system; by automatically deleting broken levels, it ensures your screen stays clear for your actual trade execution.
指标

Top & Bottom Finder XL# Top & Bottom Finder XL
## User's Guide
---
# Overview
**Top & Bottom Finder XL** is a market exhaustion indicator.
Its purpose is **not** to predict every swing high and swing low.
Instead, it attempts to identify **high-probability exhaustion points** where price has become statistically extended and has a greater chance of reversing.
Unlike traditional pivot indicators, this indicator combines several independent filters:
* Structural pivots
* Momentum (RSI)
* Trend extension
* Volume
* Range expansion
Only when the selected filters agree does the indicator produce a **Confirmed Top** or **Confirmed Bottom**.
---
# How the Indicator Works
Every signal goes through the following process:
### Step 1 — Find a Pivot
The indicator first looks for a legitimate swing high or swing low using TradingView's pivot algorithm.
A pivot is not confirmed until the required number of right bars has completed.
Example:
Left = 100
Right = 5
means:
* current high must be higher than the previous 100 bars
* and remain the highest point for the next 5 bars
Only then is it officially a pivot.
---
### Step 2 — Apply RSI Filter (Optional)
Purpose:
Avoid taking pivots that occur without momentum extremes.
A top requires
RSI ≥ Top Threshold
A bottom requires
RSI ≤ Bottom Threshold
Default:
Top = 65
Bottom = 35
Disabling this filter means RSI is ignored completely.
---
### Step 3 — Apply Trend Extension Filter (Optional)
Purpose:
Avoid taking pivots that are too close to the trend.
The indicator measures:
Distance from EMA
using ATR.
Formula:
Distance =
Price − EMA
divided by ATR
Example
EMA = 100
ATR = 2
Price = 110
Distance =
10 ÷ 2
= 5 ATR
If Minimum ATR Extension = 5
the signal passes.
Otherwise it is rejected.
This filter is extremely effective at removing mediocre signals.
---
### Step 4 — Confirmation Filter
This determines whether the pivot occurred with unusually strong participation.
There are four modes.
## Off
No confirmation required.
Every pivot that passes the other filters becomes confirmed.
Produces the most signals.
---
## Volume Only
The pivot bar must have
Volume >
Average Volume × Multiplier
Default
50-bar average
Multiplier = 2
---
## Range Only
The pivot candle must have
Range >
Average Range × Multiplier
This looks for unusually large candles.
---
## Volume + Range
The strictest mode.
Requires BOTH:
* high volume
* large candle
Produces the fewest signals.
Usually the highest quality.
---
# Timeframe Settings
## Calculation Timeframe
Allows calculations on another timeframe.
Example
Chart = 15 minute
Calculation = 1 hour
Signals are calculated from hourly data but displayed on the 15-minute chart.
Leave blank to use the current chart timeframe.
---
# Pivot Settings
## Pivot Bars Left
Controls how significant the pivot must be.
Small values
More signals
Less significant
Large values
Fewer signals
More important turning points
Default
100
---
## Pivot Bars Right
Controls confirmation delay.
Larger values
Later signals
Higher confidence
Smaller values
Earlier signals
More false signals
Default
5
---
# Signal Filters
## Use RSI Filter
Enable or disable RSI completely.
---
## RSI Length
Default
14
Controls how RSI is calculated.
---
## Top RSI Threshold
Minimum RSI required for tops.
Default
65
Higher values
Fewer signals
---
## Bottom RSI Threshold
Maximum RSI allowed for bottoms.
Default
35
Lower values
Fewer signals
---
## Use Trend EMA Filter
Turns EMA distance filtering on or off.
---
## Trend EMA Length
Default
200
Long-term trend reference.
---
## ATR Length
Default
14
Used to normalize volatility.
---
## Minimum ATR Extension
Default
5 ATR
Controls how far price must stretch away from the EMA.
Higher values
Only extreme exhaustion
Lower values
More frequent signals
---
## Confirmation Mode
Options:
* Off
* Volume Only
* Range Only
* Volume + Range
Determines final confirmation.
---
## Volume / Range Average Length
Default
50
Average period used for volume and range comparisons.
---
## Volume Multiplier
Default
2
Required increase above average volume.
Example
Average volume = 100,000
Multiplier = 2
Required volume
200,000
---
## Range Expansion Multiplier
Default
0.5
Required increase above average candle range.
Higher values
Require larger candles.
---
# Display Settings
## Show Trend EMA
Displays the EMA used for trend extension.
Useful for visualizing how stretched price became.
---
## Show Watch Signals
Displays every confirmed pivot before filtering.
Watch signals represent:
"Potential reversal areas."
Confirmed signals represent:
"Filtered, higher-probability reversal areas."
---
## Color Settings
Customize:
* Watch Tops
* Watch Bottoms
* Confirmed Tops
* Confirmed Bottoms
* EMA
---
# Label Controls
These options determine what information appears inside Confirmed labels.
---
## Show Price
Displays pivot price.
Example
Price
145.32
---
## Show Pivot Settings
Displays
Left / Right
Example
100 / 5
Useful when comparing settings.
---
## Show RSI
Displays RSI at the pivot.
Example
RSI
72.5
---
## Show Volume
Displays pivot volume.
Useful when Volume confirmation is enabled.
---
## Show ATR
Displays ATR at the pivot.
Important:
This is **not** the distance from the EMA.
It simply displays the market's volatility (ATR) at the time the pivot formed.
Higher ATR means a more volatile market.
Lower ATR means a quieter market.
---
## Show EMA Distance
Displays
Distance from EMA
measured in ATRs.
Example
EMA Dist
5.82 ATR
This is arguably the most useful statistic on the label because it quantifies how extended price was when the reversal occurred.
---
## Show Confirmation Type
Displays how the confirmation filter was satisfied.
Possible values:
* Volume
* Range
* Volume + Range
* None
---
# Alerts
The indicator includes four alerts:
### Confirmed Top Found
Generated when a filtered top is confirmed.
---
### Confirmed Bottom Found
Generated when a filtered bottom is confirmed.
---
### Top Watch
Generated for every structural pivot high before filtering.
---
### Bottom Watch
Generated for every structural pivot low before filtering.
---
# Understanding Signal Timing
This is important.
The indicator **does not repaint**, but it is intentionally delayed by the **Pivot Bars Right** setting.
Example:
Right Bars = 5
A top occurring today will only be confirmed after five additional bars have closed without a higher high.
This is necessary because the indicator waits for confirmation that the pivot is truly established.
---
# Suggested Starting Settings
## Swing Trading (Daily)
* Left Bars: 100
* Right Bars: 5
* RSI: On
* EMA Filter: On
* Minimum ATR Extension: 5
* Confirmation: Volume Only
---
## Position Trading (Weekly)
* Left Bars: 150–250
* Right Bars: 5–10
* ATR Extension: 6–8
* Confirmation: Volume + Range
---
## Short-Term Trading (15–60 Minute)
* Left Bars: 30–60
* Right Bars: 3–5
* ATR Extension: 3–4
* Confirmation: Volume Only
---
# Strengths
* Adapts to market volatility using ATR.
* Filters out many insignificant pivots.
* Uses multiple independent confirmation methods.
* Supports higher-timeframe calculations on lower-timeframe charts.
* Does not repaint after pivot confirmation.
* Highly configurable for different trading styles.
---
# Current Limitations
* Signals are intentionally delayed by the selected Right Bars value.
* The indicator identifies **exhaustion points**, not trend direction.
* Strong trends can continue after a confirmed top or bottom, especially during momentum-driven markets.
* Volume confirmation may be less reliable for markets where reported volume is limited or synthetic (such as many forex CFDs).
---
# Best Use Practices
The indicator performs best when used to identify **areas of elevated reversal probability**, not as a standalone buy or sell trigger. Higher-quality setups occur when a confirmed signal aligns with higher-timeframe support or resistance, trendline breaks, divergence, or other independent forms of technical confirmation. Treat confirmed tops and bottoms as locations to focus attention rather than automatic entry points.
指标

Key Daily Levels by Flip On DipKey Daily Levels marks the reference points most intraday traders watch: the previous day high and low, and the high and low of a session you choose.
Sessions cover New York, London, Tokyo and Sydney, plus a custom option for any other window. Each preset uses the session's local exchange hours and adjusts for daylight saving on its own, so the times stay correct through the year instead of drifting an hour twice a year.
When a session extreme sits at the same price as the previous day high or low, the two are combined into one line instead of being drawn twice. The label then reads something like PDH (NY High), so both are kept without doubling up on the chart.
Each level is drawn from the bar where it formed and runs until price takes it out. The line stops on the exact bar that crossed it. The wick counts, so it doesn't wait for a close. A level still holding is shown solid; once it gets taken it turns dashed and fades, and a small check is dropped on the bar that swept it. A small table in the corner lists each level and whether it has been swept.
Cross detection accounts for gaps, and the trading day is read from each symbol's own calendar rather than a fixed clock, so levels stay accurate on crypto, futures and stocks, on continuous charts and gapped ones alike.
Colors, line styles and width, label options, the sweep marker and the table are all configurable.
Open source, free to study or extend. 指标

[ A L P H A X ] BASTION - Support & Resistance PatternsAlphaX BASTION — Support & Resistance Lattice Engine: Touch-Clustered Zone Detection, HTF Level Blending, Four Interaction Playbooks & Level-to-Level Target System
AlphaX BASTION is a professional-grade support and resistance system built around the concept of a lattice — a dynamic, self-updating grid of strength-scored price zones that are continuously constructed from fractal pivot clusters, blended with higher timeframe levels, decayed over time as they lose relevance, and scored by touch frequency and institutional significance. Unlike static horizontal line indicators or basic pivot systems, BASTION treats every support and resistance level as a living structure with a birth date, a touch history, an HTF weight, and a decay clock. Where most S/R systems simply identify levels and leave the trader to decide what to do, BASTION goes one step further: it monitors every active level for four specific micro-pattern interactions — DEFEND, SWEEP, RETEST, and COIL — and fires precision entry signals when those interactions occur at qualified levels with sufficient confluence. The target for every signal is not an arbitrary ATR multiple or measured move — it is the next Bastion level in the signal direction, the natural institutional delivery destination from one defended wall to the next. Designed for traders across crypto, forex, gold, and indices on any timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏰 The Lattice — A Self-Building Defended Price Map
The word "lattice" captures the core concept precisely: BASTION constructs an interconnected grid of defended price levels that represents the current institutional support and resistance landscape. This lattice is not drawn manually, not imported from a fixed timeframe, and not redrawn from scratch on every bar. It is built incrementally — growing as new pivots form, strengthened as levels are retested, and pruned as levels age beyond their relevance window.
How the lattice is constructed:
On every bar, BASTION detects confirmed fractal pivot highs and lows (using a configurable pivot length, default: 5 bars each side). Each new pivot is fed into the lattice's merge algorithm:
If the new pivot is within the merge tolerance (default: 0.22× ATR) of an existing level, it merges with that level — the level's midpoint shifts to the weighted average of all contributing pivots, the touch count increments, the zone boundaries expand if necessary, and the last touch timestamp updates
If the new pivot is farther than the merge tolerance from any existing level, a new level is created with the pivot as its midpoint, zone height of ±0.18× ATR above and below, touch count of 1, and the current bar as its birth bar
When the number of levels per side exceeds the configured maximum (default: 4), the oldest level is dropped from the end of the array
Level decay:
Levels that have not been touched in more than the configured decay period (default: 250 bars) are pruned automatically. This ensures the lattice reflects current institutional market memory rather than accumulating ancient, irrelevant levels that clutter the chart and produce false signals.
Why touch clustering produces better levels than standard S/R: A single pivot high at a price is a weak level — it represents one instance of sellers overwhelming buyers. The same price area touched three times across different sessions represents a genuine institutional order cluster — the level where significant participants have repeatedly defended their position. BASTION's weighted averaging and touch counting system identifies these genuine defended levels and distinguishes them from noise pivots.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📡 HTF Level Blending — Multi-Timeframe Institutional Walls
Every Bastion level is either a current timeframe pivot cluster or a higher timeframe structural level . When Show HTF Swing Levels is enabled (default: on), BASTION pulls pivot highs and lows from the configured HTF (default: H4) and feeds them into the same merge algorithm as current timeframe pivots.
HTF levels receive a special weight in the strength calculation: +2 additional strength points beyond their touch count. This reflects the institutional significance differential — a resistance level formed on H4 represents a zone where a much larger institutional participant defended their position, and carries proportionally more weight than a current timeframe pivot at the same price.
HTF levels are visually distinguished: HTF-sourced zones are rendered with a slightly different purple color (slateblue rather than the standard purple), and HTF-contributing midlines use a thicker dashed line (width 2 vs 1 for standard levels). This allows you to immediately identify which levels have higher timeframe structural backing.
How HTF blending works in practice: When an H4 resistance level is at 2490.00 and a current timeframe resistance forms at 2491.50 — within the merge tolerance — they merge into a single strengthened level. The merged level receives the touch count of both the HTF pivot and any current timeframe retests, plus the HTF weight bonus, making it one of the strongest levels in the lattice. This is the precise behavior of real institutional support and resistance: the H4 level acts as the anchor, and intraday touches confirm it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💪 Level Strength Scoring
Every level in the lattice has a dynamically computed strength score used to qualify signals and sort level priority.
Strength components:
Touch count — the primary strength component. Each time a new pivot merges into the level, touch count increments. A level with 4 touches is significantly stronger than one with 1
HTF bonus (+2) — levels that have HTF pivot contributions receive 2 additional strength points, reflecting their higher institutional significance
Recency bonus (+1) — levels born within the last 80 bars receive 1 additional point. Fresh levels that were recently created and immediately retested carry more immediate institutional relevance than older levels with the same touch count
Minimum strength gate: Signals are blocked from firing at levels with strength below the configured minimum (default: 2 touches). This single filter eliminates the single most common false signal in S/R trading — entering at an untested level that has not proven itself as a genuine defended zone.
Strength display on dashboard: The nearest support and resistance levels are displayed on the dashboard with their strength scores in brackets — e.g., "2450.50 " means the level at 2450.50 has a strength score of 4. At a glance, you know which levels are most defended.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎮 The Four Interaction Playbooks
The lattice provides the structural map. The playbook engine defines what to do when price arrives at a lattice level. Four specific micro-pattern interactions are monitored continuously — each representing a different way price can interact with a defended wall and a different entry scenario.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DEFEND — Wick Rejection at Level
The most common and cleanest S/R interaction. A wick rejection candle forms when price tests the level and is immediately repelled — buyers overwhelm sellers at support, or sellers overwhelm buyers at resistance, within a single candle.
Long conditions (support DEFEND):
The current bar's low is within the proxAtr distance of the nearest support level
The lower wick exceeds the configured minimum (default: 52% of bar range) — a dominant rejection wick
The close is in the upper quarter of the bar (above bodyBot + 25% of range)
The close is above the zone bottom — price rejected from inside the zone
The DEFEND signal tells you: The support level absorbed the selling pressure on this bar with a clear institutional response. The wick is the signature of buyers stepping in aggressively at the defended zone. This is the most textbook S/R signal available and the highest-frequency of the four playbooks.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SWEEP — Liquidity Grab + Reclaim
The institutional stop-hunt interaction. Price breaches the zone boundary to trigger stop orders, then immediately reverses and closes back inside the zone.
Long conditions (support SWEEP):
The current bar's low extends below the zone bottom by more than the minimum sweep depth (default: 0.12× ATR) — stop orders below support have been triggered
The bar closes above the zone midline — the reclaim is decisive, not just touching the boundary
The bar closes bullish (close above open) — institutional buying drove the recovery
Why SWEEP is the highest-conviction signal: A liquidity sweep at a lattice level combines two layers of institutional evidence. The level itself has been defended multiple times (touch count) and has institutional order significance. The sweep event confirms that institutions actively used the liquidity pool below the level to fill their buy positions — the same sweep-and-reclaim dynamic that underlies MAGNET, but now occurring specifically at a pre-qualified lattice level with known strength.
The SWEEP playbook carries a confluence bonus (+1 layer point) because of this elevated institutional evidence.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RETEST — Break Then Hold (S/R Flip)
The classic support-becomes-resistance and resistance-becomes-support interaction. Price previously broke through the level from the other side, and is now returning to test the flipped level.
Long conditions (support RETEST):
Within the lookback window (default: 12 bars), the close was below the zone bottom — a genuine prior breakdown
The current bar's low is within the zone and the close is above the zone midline — the retest from above is holding
The current bar closes bullish
The RETEST signal captures: The moment when a broken resistance becomes confirmed new support. When a level that previously acted as resistance is broken, retail traders who were long above the level are stopped out or become sellers. When price returns to test the level from above — and the close holds above the midline — the same institutional level that attracted sellers is now attracting buyers who missed the initial breakout. This is the "second chance" entry that offers excellent risk/reward relative to the original breakout candle.
The RETEST playbook also carries a confluence bonus (+1 layer point).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COIL — Compression into Level
The pre-breakout compression interaction. Price has been ranging with narrow ATR bars approaching the level — a coiling squeeze that frequently precedes an explosive directional move.
Long conditions (support COIL):
The last N bars (default: 4) each have an ATR of less than 0.75× the overall ATR — the market is compressing with below-average volatility
The close is within the proxAtr distance of the support level — the compression is occurring directly at the lattice level
The close is above the zone midline — the compression is occurring on the correct side of the level
The COIL signal captures: The energy-building phase at a defended level. When price approaches a lattice level with declining volatility over multiple bars, it indicates the institutional response to that level is suppressing price movement — buyers and sellers are in equilibrium at the level, but the institutional bias (toward defending it as support or resistance) creates a coiled spring. The first decisive bar after the coil frequently produces a large directional move.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Level-to-Level Target System — The Bastion's Unique Approach
Every other entry system in the AlphaX suite uses ATR multiples, Fibonacci measured moves, or pattern heights to compute take profit targets. BASTION uses none of these. The target for every BASTION signal is the next Bastion level in the direction of the trade.
For a long signal at support: The target is the nearest resistance level above the entry price in the current lattice. This is the next defended wall — the level where sellers are expected to step in and potentially cap the move.
For a short signal at resistance: The target is the nearest support level below the entry price — the next defended wall where buyers are expected to step in.
Why level-to-level targeting is superior to measured moves for S/R trading: The market does not move from support to an arbitrary ATR multiple above. It moves from support to resistance — from one institutional wall to the next. Using the actual lattice level as the target ensures the trade is exited at the next genuine institutional interaction point rather than at an arbitrary mathematical distance. This aligns the trade's exit with the same institutional framework that generated the entry.
NEXT WALL TGT on dashboard and chart: The target level is displayed on the dashboard as NEXT WALL TGT and plotted as a yellow-green dashed line on the chart labeled "NEXT WALL." When no opposing lattice level is currently qualified (the target would be beyond the available lattice), the system shows — rather than fabricating a target.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 The 7-Layer Confluence Engine
Every playbook signal is evaluated through a 7-layer scoring system. Signals below the minimum layer count (default: 4) are suppressed.
Layer 1 — Level Strength (1 point):
The interacted level meets the minimum strength threshold (touch count + HTF bonus + recency bonus ≥ minimum). Levels that do not meet this floor cannot produce signals regardless of playbook quality.
Layer 2 — HTF Trend Bias (1 point):
The higher timeframe EMA structure (default: 60-minute, 21/55 EMA) agrees with the signal direction. Bull signals require HTF bull, bear signals require HTF bear. When HTF bias is disabled, this layer is neutral (0 points). Note that the HTF bias is also enforced as a hard condition in the signal firing logic — signals opposing the HTF are blocked entirely when useHtfBias is on.
Layer 3 — Volume Expansion (1 point):
Current bar volume exceeds the volume moving average by the configured multiplier (default: 1.08×). Confirms institutional participation on the interaction bar.
Layer 4 — Non-Chop Market (1 point):
Choppiness Index is below the configured threshold (default: 62). Also enforced as a hard gate — extreme chop blocks all signals. S/R interactions during extreme chop frequently produce false breakouts and fake rejections.
Layer 5 — Playbook Bonus (1 point):
SWEEP and RETEST playbooks receive 1 additional point reflecting their elevated institutional evidence. DEFEND and COIL do not receive this bonus — they are valid but carry less structural confirmation than a sweep reclaim or S/R flip.
Layer 6 — Bar Range Quality (1 point):
The current bar's range is at least 0.35× ATR — the interaction bar has sufficient price action to produce a genuine signal. Doji and near-doji bars in critical zones do not score this point.
Layer 7 — Session Active (1 point):
The current bar is within the configured active session window when the session filter is enabled. When the filter is off, this layer always contributes its point.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 14-row real-time dashboard displays the complete state of the lattice and the current signal context.
LATTICE
Nearest Sup — the price of the nearest support level below current price, with its strength score in brackets (e.g., "2450.50 "). Yellow-green color
Nearest Res — the price of the nearest resistance level above current price with strength score. Red color
Zone Count — the total number of active support and resistance levels in the lattice (e.g., "3 sup · 4 res"). Provides awareness of how populated the current lattice is
PLAYBOOK
State — the current playbook state: the active playbook name (DEFEND, SWEEP, RETEST, COIL) when a signal just fired; WATCH WALLS during the inter-signal period
Bias — ▲ LONG or ▼ SHORT when a signal fired; NEAR RES, NEAR SUP, or MID-RANGE based on current price position relative to the lattice when idle
Next Wall Tgt — the price of the next opposing lattice level — the level-to-level target for the current trade
FILTERS
HTF Bias — ▲ BULL, ▼ BEAR, or — FLAT
Chop — live Choppiness Index value. Orange when above the stand-aside threshold
Volume — EXPAND (above threshold) or QUIET
Playbooks On — abbreviations of all currently enabled playbooks (DEF SWP RET COIL) for quick reference
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Resistance Zone Boxes (purple / slateblue) — semi-transparent boxes spanning each resistance level from its birth bar to 15 bars beyond current. Standard purple for current timeframe levels, slateblue for HTF-blended levels
Resistance Midlines (purple dashed) — the exact midpoint of each resistance zone. Width 1 for standard, width 2 for HTF levels
Support Zone Boxes (yellow-green) — semi-transparent yellow-green boxes for all active support levels
Support Midlines (yellow-green dashed) — support zone midpoints. Width 2 for HTF levels
⬡ Diamond (below bar, bright yellow-green) — BASTION long signal. Playbook fired at a support level with qualifying confluence
⬡ Diamond (above bar, bright red) — BASTION short signal
Playbook Label — appears above or below the signal diamond showing "BASTION LONG/SHORT" + playbook name + level price
SL Guide (red dotted) — stop loss below the zone bottom plus ATR buffer (long) or above zone top plus ATR buffer (short), extending 30 bars forward with "SL" label
NEXT WALL Guide (yellow-green dashed) — the level-to-level target extending 30 bars forward with "NEXT WALL" label
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX BASTION — Step by Step
Step 1 — Read the Lattice
Check the NEAREST SUP and NEAREST RES rows on the dashboard. Note the strength scores in brackets. Levels with strength 4+ are the most defended — prioritize interactions at these levels
Look at the Zone Count row — a lattice with 3–4 levels on each side represents a well-populated market map. A sparse lattice (1–2 levels per side) means fewer reference points and potentially lower signal quality
Check whether the nearest support or resistance has HTF origin — the slateblue color on the chart or the higher strength score indicates institutional level significance
Step 2 — Monitor Price Approaching a Level
When the dashboard Bias row shows NEAR RES or NEAR SUP, price is approaching a lattice level within the proximity threshold. Watch for a playbook interaction to develop
Identify which playbook is most likely: Is price approaching with narrow bars (COIL)? Did price recently spike below (SWEEP potential)? Has the level previously been broken (RETEST setup)? Is price arriving with a clear wick forming (DEFEND setup)?
Check HTF Bias and Chop on the dashboard — both must be favorable before a signal can fire
Step 3 — Enter on the Diamond Signal
A ⬡ diamond below the bar confirms a qualifying long interaction. The playbook label shows which of the four setups fired and at which exact level
The SL guide shows the stop level — placed below the zone bottom plus ATR buffer (long) or above zone top plus buffer (short). This is the structural invalidation point: if price closes through the zone boundary in the wrong direction, the level has failed to defend
The NEXT WALL guide shows the target level — the next opposing lattice wall
SWEEP and RETEST signals carry the highest confluence (extra playbook layer point) — size these entries at full allocation. DEFEND and COIL at standard allocation
Step 4 — Manage to the Next Wall
The trade targets the NEXT WALL level shown on the chart. As price approaches that level, watch for rejection signals in the opposing direction — if BASTION fires a signal at the target level against your trade, this is a natural exit point
Monitor the lattice continuously — new levels may form during the trade that become relevant intermediate targets or stop adjustment points
If the lattice map shifts significantly (a level is pruned by decay or a strong new level forms), reassess the trade's target
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
Chop Index is orange on the dashboard — the hard gate is active. No signals fire in extreme chop. S/R levels lose their predictive power when the market is oscillating — every touch becomes ambiguous
Zone Count shows 1–2 levels per side — a sparse lattice means the system has insufficient structural reference. The market may be trending strongly through all levels or may be too early in the session to have built meaningful clusters. Wait for the lattice to populate
Nearest level strength is 1 — the minimum strength gate will block signals at untested levels, but if the nearest levels all show , the lattice is populated with fresh, unproven levels. Increase the minimum level strength in settings to require at least 2–3 touches
HTF Bias shows FLAT — no higher timeframe directional conviction. Counter-trend S/R interactions in a flat HTF environment fail at a higher rate because neither institutional buyers nor sellers have committed to a directional view
NEXT WALL TGT shows — — no opposing qualified level exists in the lattice above (for longs) or below (for shorts). Without a level-to-level target, the trade lacks a natural exit framework. Consider skipping signals when no next wall target is available
Playbook is COIL at a level with strength 2 — a coil at a weak, lightly-tested level carries the lowest probability of the signal matrix. COIL at high-strength (4+) levels with HTF backing is a quality setup; COIL at minimum-strength levels is marginal
The ideal BASTION setup:
Support or resistance level with strength 4+ (multiple touches, ideally HTF-blended)
HTF Bias aligned with the trade direction
SWEEP or RETEST playbook (highest confluence bonus)
Volume expanding on the interaction bar
Chop Index well below threshold
Clear NEXT WALL target on the opposing side of the lattice
Signal layers at 6–7 out of 7
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🏰 Dynamic S/R lattice — self-building, self-pruning grid of touch-clustered support and resistance zones. New pivots merge into existing levels, incrementing touch counts and adjusting zone boundaries automatically
📡 HTF level blending — H4 (or any configurable HTF) pivot levels fed into the same lattice with a strength bonus, producing a multi-timeframe S/R map in a single indicator
💪 Level strength scoring — touch count + HTF bonus + recency bonus produces a composite strength score for every level. Minimum strength gate blocks signals at untested levels
⏱ Level decay — zones older than the configurable decay period are automatically pruned, keeping the lattice relevant to current institutional market memory
🎮 Four interaction playbooks — DEFEND (wick rejection), SWEEP (liquidity grab + reclaim), RETEST (S/R flip), COIL (compression) — each detecting a different institutional level interaction scenario
🎯 Level-to-level target system — take profit targets the next opposing lattice wall rather than an arbitrary ATR multiple or measured move. The most institutionally grounded target method available
🛡 Zone-anchored stop loss — stop placed beyond the zone boundary plus configurable ATR buffer, at the structural invalidation point for each interaction type
🧠 7-layer confluence engine — Level Strength, HTF Trend Bias, Volume, Non-Chop, Playbook Bonus, Bar Range Quality, Session Active
📊 Live lattice dashboard — Nearest Support/Resistance with strength scores, Zone Count, active Playbook, Bias, Next Wall Target, and all filter states
🎨 Phase-coded zone visualization — resistance zones in purple/slateblue, support zones in yellow-green. HTF levels distinguished by color shade and line width
🔔 2 alert conditions + runtime alerts — Bastion Long and Bastion Short with level price and target in the alert message
⚙ Fully configurable — pivot length, zone merge and half-height tolerances, max levels per side, level decay, HTF timeframe for levels, all four playbook enables, proximity, wick minimum, sweep depth, retest lookback, coil bars, minimum level strength, confluence minimum, HTF bias timeframe and EMAs, volume filter, chop gate, session, cooldown, SL buffer, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
S/R Lattice
Swing Pivot Length — fractal sensitivity for pivot detection (default: 5)
Zone Merge (xATR) — ATR distance within which new pivots merge into existing levels (default: 0.22)
Zone Half-Height (xATR) — ATR distance above and below each level midpoint defining the zone boundaries (default: 0.18)
Max Levels per Side — maximum active resistance and support levels maintained simultaneously (default: 4 each)
Level Decay (bars) — bars since last touch after which a level is pruned from the lattice (default: 250)
ATR Length — ATR calculation lookback (default: 14)
Show S/R Zones — toggle lattice boxes and midlines
Blend HTF Swing Levels — toggle higher timeframe level incorporation
HTF for Levels — the higher timeframe from which pivot levels are imported (default: H4)
HTF Pivot Length — pivot length for HTF level detection (default: 5)
Interaction Playbooks
DEFEND — Wick Rejection at Level — toggle the rejection wick playbook
SWEEP — Liquidity Grab + Reclaim — toggle the sweep and reclaim playbook
RETEST — Break then Hold — toggle the S/R flip retest playbook
COIL — Compression into Level — toggle the narrow-bar compression playbook
Max Distance to Level (xATR) — ATR distance from level within which an interaction is considered proximate (default: 0.35)
Min Rejection Wick % — minimum wick fraction of bar range for DEFEND (default: 0.52)
Min Sweep Depth (xATR) — minimum extension below/above zone boundary for SWEEP (default: 0.12)
RETEST Lookback (bars) — bars to scan for the prior breakout in RETEST detection (default: 12)
COIL Min Narrow Bars — consecutive narrow-ATR bars required for COIL (default: 4)
Min Level Strength (touches) — minimum composite strength for a level to generate signals (default: 2)
Confluence
Min Layers (of 7) — minimum confluence score to fire a signal (default: 4)
HTF Trend Bias / HTF Bias TF / HTF Fast / Slow EMA — trend bias filter parameters
Volume Expansion / Volume vs Avg / Volume Avg Length — volume layer parameters
Block Extreme Chop / Choppiness Length / Chop Block Above — chop gate parameters
Session Filter / Active Session — trading hours restriction
Signal Cooldown (bars) — minimum bars between signals (default: 6)
Level-to-Level Guidance
Show SL + Next Level Target — toggle the stop and target guide lines
SL Beyond Sweep/Zone (xATR) — ATR buffer beyond the zone boundary for stop placement (default: 0.35)
Show Playbook Label — toggle the signal label showing playbook name and level price
Display
Show Entry Markers — toggle the ⬡ diamond signal shapes
Show Dashboard — toggle the full dashboard
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Support — yellow-green for support zones and bullish signal elements
Bear / Resistance — red for resistance zones and bearish signal elements
S/R Lattice — purple for standard lattice zones and midlines
HTF Level — slateblue for HTF-blended level zones and midlines
Sweep Accent — orange for SWEEP playbook accents and chop warnings
Stop Guide / Next Level Target — stop and target line colors
Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (2 total + runtime)
Entry Alerts
Bastion Long — qualifying long interaction fired at a support level. Alert message includes playbook name, level price, and next wall target
Bastion Short — qualifying short interaction fired at a resistance level
Runtime alerts (via the alert() function) fire simultaneously with the chart signals, also containing the playbook, level price, and target in the message for immediate actionability.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M5–H1 :
Pivot Length at 5 — balanced sensitivity for intraday lattice construction
Zone Merge at 0.22× ATR — appropriate for gold's tick structure; tighter than typical forex parameters
Level Decay at 250 bars — approximately 20 hours on M5; sufficient to maintain intraday relevance without accumulating ancient levels
HTF for Levels at H4 — the most widely respected swing timeframe for gold and forex institutional structure
Minimum Level Strength at 2 — requires at least two confirmed touches before a level can generate signals
For other instruments or timeframes, adjust:
M1–M3 scalping — reduce Pivot Length to 3, reduce Zone Merge to 0.15, reduce Level Decay to 100–150 bars, reduce Cooldown to 3, reduce COIL Min Narrow Bars to 2–3
H4–Daily swing trading — increase Pivot Length to 8–10, increase Zone Merge to 0.35, increase Level Decay to 500+, set HTF for Levels to Weekly, increase Min Level Strength to 3
Crypto (BTC, ETH) — increase Zone Merge to 0.28–0.35 for wider tick structure, increase Min Sweep Depth to 0.18, increase Level Decay to 300
Indices (NAS100, US30) — use session filter for cash market hours, increase Zone Merge to 0.25, increase Min Level Strength to 3 for index structure
More signals — lower Min Layers to 3, reduce Min Level Strength to 1, increase Max Distance to Level to 0.50
Highest-quality only — raise Min Layers to 5–6, increase Min Level Strength to 3+, enable only SWEEP and RETEST playbooks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🏰 Support and resistance traders — BASTION is the most complete and systematic S/R implementation in the AlphaX suite. Every aspect of the S/R trading approach — level identification, strength scoring, interaction detection, stop placement, target identification — is automated and quantified
📡 Multi-timeframe S/R traders — the HTF level blending system automatically incorporates H4 (or any configurable timeframe) swing levels into the same lattice, producing a multi-timeframe S/R map without requiring manual level drawing across timeframes
💧 Liquidity sweep traders — the SWEEP playbook at lattice levels is the highest-conviction signal type in BASTION, combining the stop-hunt reversal concept from MAGNET with the pre-qualified, strength-scored level framework of the lattice
🎯 Traders who want structurally meaningful targets — the level-to-level target system is the most institutionally grounded TP approach available — targeting the next defended wall rather than an arbitrary distance
🧠 Systematic traders who want quantified S/R — touch counts, strength scores, decay parameters, and confluence layers replace entirely subjective level identification with objective, repeatable criteria
📈 Traders across all asset classes — the ATR-normalized zone parameters adapt naturally to gold, forex, crypto, and indices without manual recalibration between instruments
⚠ Traders who draw too many or too few S/R levels manually — BASTION manages level count automatically through the Max Levels per Side setting and the decay system — always showing the most current and most relevant levels without chart clutter
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. Lattice construction, level strength, playbook detection, and confluence scoring all finalize on confirmed bars only
The lattice is built incrementally from the first bar of chart history. On initial chart loads, the lattice will be sparse for the first 50–100 bars as pivots begin to form and levels begin to cluster. Signal quality improves as the lattice populates
The level decay mechanism (default: 250 bars) means that on very active instruments with frequent pivots, the lattice refreshes relatively quickly. On slower instruments or higher timeframes, levels persist longer. Adjust the decay period to match your instrument's typical S/R memory window
HTF level blending uses Pine Script's request.security — HTF pivots are confirmed on the HTF's own bar close schedule, not the current timeframe. This is non-repainting and consistent with all standard security requests
When multiple playbooks fire at the same level on the same bar, the signal with the highest layer count is selected. The dashboard's playbook abbreviations show which playbooks are currently enabled
Maximum 500 lines, 500 labels, and 60 boxes are rendered. The lattice visualization uses boxes and lines for each level, the signal uses a label, and the guide uses lines and labels. On very active charts with maximum level counts, older elements may be removed by TradingView rendering limits
The indicator does not track open positions or P&L; and does not connect to any broker or account
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who understand that price does not move in a vacuum — it moves between walls, and the key to reading the market is knowing where those walls are, how strong they are, and exactly what price does when it arrives at them. 指标

Rising & Falling Wedge Detector [HexaTrades]Overview
Wedge Detector automatically identifies and draws the two most actionable wedge patterns: the Rising Wedge (bearish) and the Falling Wedge (bullish). It marks each as a converging cone, validates the geometry, waits for a bar-close breakout, then plots a measured-move target and a structure-based stop without repainting the pattern structure.
It is built around quality over quantity: a strict, perfect-shape gate ensures only genuinely converging, textbook wedges appear. Every part of the logic is transparent and tunable. Ideal for swing and intraday traders who trade chart patterns and want an objective, rules-based way to spot wedges and define risk.
What it detects
Rising Wedge( bearish)
Higher highs and higher lows, but the lows rise faster than the highs (the lines converge upward). Signals a likely breakdown confirmed on a close below the lower trendline.
Falling Wedge ( bullish)
Lower highs and lower lows, but the highs fall faster than the lows (the lines converge downward). Signals a likely breakout confirmed on a close above the upper trendline.
How the Indicator Works
- Pivots: confirmed swing highs/lows (locked pivotLen bars after they occur).
- Boundaries: upper line from the two most recent swing highs; lower line from the two most recent swing lows, projected as straight lines.
- Slope & convergence: rising = both up, lows rising faster; falling = both down, highs falling faster (set by Convergence strictness).
- Perfect-shape gate: no crossing inside, real narrowing, minimum contraction, apex ahead, sensible duration, minimum ATR height.
- Forming preview: dashed shaded cone while developing.
- Breakout: bar-close below lower line (rising → bearish) / above upper line (falling → bullish).
- Filters: optional EMA trend, volume, breakout-candle ATR size.
- Targets/stops: measured-move target + opposite-boundary stop, drawn as persistent right-extending lines.
Features
- Automatic detection of rising & falling wedges from confirmed pivots.
- Perfect-shape validation rejects crossing, barely-narrowing, diverging, past-apex, too-small or too-long shapes.
- Forming preview dashed shaded cone before breakout.
- Bar-close breakout confirmation, no intrabar fakes.
- Measured-move target + structure stop (opposite boundary).
- EMA trend filter, volume filter, breakout-candle ATR filter (all optional).
- Theme-aware dashboard + shaded wedge zone + 3 alerts.
Dashboard
Status: Forming while developing → Confirmed on breakout
Last wedge: Rising Wedge / Falling Wedge
Bias: Bearish / Bullish
Target: Projected take-profit level
Stop: Structure-based invalidation level
Filters: EMA / Volume / ATR shown as On / Off
Settings
Detection:
Pivot length: swing sensitivity. Lower = more (and smaller) wedges.
Min wedge height (ATR): rejects wedges smaller than this many ATR.
Convergence strictness: how strongly the lines must converge (higher = stricter).
Min width contraction: minimum narrowing from start to breakout.
Max wedge duration: rejects over-stretched patterns.
Show forming wedge: preview wedges before breakout.
Filters:
EMA trend filter: only confirm breakouts aligned with the EMA (falling wedge above EMA, rising wedge below).
Volume confirmation: requires above-average volume on the breakout candle.
Min breakout candle size: require a breakout candle of at least N×ATR.
Visuals
Toggle target/stop lines, colors for bullish/bearish / forming, and the dashboard.
Alerts:
Rising Wedge breakdown:bearish confirmation.
Falling Wedge breakout: bullish confirmation.
Any wedge confirmed - either of the above.
Create alerts with “Once per bar close” for non-repainting behaviour.
Trading Guide
- Identify: dashboard Status = Forming + clean dashed cone.
- Enter: on the bar-close breakout (▲/▼) in the wedge's direction.
- Avoid: when filters reject the breakout, or in choppy ranges.
- Stop: the drawn SL (opposite boundary). Target: the drawn TP (measured move).
- Risk: size so breakout→stop is an acceptable risk; R:R = (TP−entry) ÷ (entry−SL).
Bullish Example (Falling Wedge)
Down-trend forms a dashed falling cone → a candle closes above the upper line → ▲ prints, wedge turns solid green, Status = Confirmed → enter, SL = lower line, TP = breakout + wedge height.
Bearish Example (Rising Wedge)
Up-grind forms a dashed rising cone → a candle closes below the lower line → ▼ prints, wedge turns solid red → enter short, SL = upper line, TP = breakout − wedge height.
Best Markets & Timeframes
Markets: works on crypto, forex, stocks, indices, futures, commodities. Best on liquid instruments with clean swings (the volume filter is most meaningful on stocks/indices).
Timeframes: 5m/15m = more signals, more noise (use stricter filters); 1H/4H = the sweet spot; Daily/Weekly = highest quality, fewer & slower.
We would love to hear your suggestions. If you have ideas for new features, indicators, analytics, or improvements, please share your feedback. Your input helps guide future updates and improve the indicator for all traders.
Wedge pattern detector indicator is for educational and analytical purposes only. It is not financial advice. Trading involves risk. Always use proper risk management and combine this indicator with your own analysis before taking any trade.
指标

High Volume Absorption Pivot Levels (Zeiierman)█ Overview
High Volume Absorption Pivot Levels (Zeiierman) is a volume-based market structure indicator designed to identify significant pivot highs and lows where price shows signs of absorption during their formation.
Rather than plotting every swing point, the indicator filters pivots using two important characteristics:
• Elevated trading volume.
• Absorption candles that indicate a temporary balance between buyers and sellers.
Only pivots that satisfy these conditions become active support or resistance levels, allowing traders to focus on price levels that formed during periods of increased market participation.
⚪ Absorption and High Participation
The indicator combines traditional pivot detection with volume analysis.
A valid pivot requires:
• A confirmed swing high or swing low.
• Above-average volume on the pivot.
• An absorption candle occurring either around the pivot or directly on the pivot candle.
This helps remove many insignificant swing points while emphasizing areas where market participants were actively exchanging positions.
Once confirmed, these levels often serve as important reference points for future reactions, mitigation events, and retests.
█ How It Works
⚪ Pivot Structure Detection
The script continuously detects confirmed swing highs and swing lows using user-defined pivot lengths. These pivots become candidates for future support and resistance levels.
⚪ High Volume Filter
Not every pivot is plotted.
The pivot candle must also trade with above-average volume.
volume > sma(volume) × multiplier
This helps prioritize pivots that formed during periods of significantly higher participation than normal.
⚪ Absorption Candle Detection
The indicator searches for absorption candles around each pivot.
An absorption candle is defined as:
• Small candle body relative to the total range.
• Above-average trading volume.
█ How to Use
⚪ Identify Institutional Pivot Levels
Instead of displaying every swing point, the indicator focuses on pivots that formed during elevated participation.
This often highlights areas where larger market participants were active.
⚪ Target These Levels for Liquidity Sweeps
High-volume absorption pivots often become attractive liquidity targets.
As the market trends, the price frequently returns to sweep these levels before continuing in the direction of the prevailing trend or, in some cases, initiating a reversal.
These sweeps can represent:
• Liquidity collection before trend continuation.
• Stop-loss hunts around previous pivots.
• Profit-taking before the next market expansion.
• Potential reversal points if the sweep fails and strong opposing participation emerges.
Rather than treating these levels as fixed support or resistance, they should be viewed as important liquidity zones where market participants may become active.
█ Settings
Pivot Left / Right Length: Controls how swing highs and lows are confirmed.
Maximum Active Levels: Sets the maximum number of pivot levels displayed simultaneously.
Absorption Search Range: Defines how many candles around each pivot are searched for absorption.
Absorption Body %: Controls how small the candle body must be relative to the full candle range.
Absorption Volume Multiplier: Defines the minimum volume required for an absorption candle.
Require Absorption On Pivot Candle: Restricts valid pivots to those where the absorption candle occurs exactly on the pivot.
Pivot Volume Multiplier: Sets the minimum volume required for the pivot itself.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
指标

High Volume Pivot Support & Resistance Zones [BigBeluga]High Volume Pivot Support & Resistance Zones is a market-structure indicator built for TradingView. It helps traders find key support and resistance levels by looking for major pivot points backed by institutional volume.
Instead of drawing simple unweighted lines, this tool tracks the volume of swing highs and lows. When a high-volume pivot is found, the script creates a dynamic zone box on your chart and fits a live Cumulative Volume Delta (CVD) trendline inside it. This lets you monitor real-time buying and selling pressure exactly where the market is most likely to reverse.
🔵 MAIN ENGINE & VOLUME ZONE LOGIC
1. Volume-Validated Pivots
Swing Isolation Fields: The tool uses customizable lookback settings ( Resistance/Support Pivot Length ) to find prominent structural swing highs and lows.
Institutional Volume Filters: Every new swing point is checked against a volume baseline ( Volume MA Length ). A zone is only plotted if the pivot bar's volume beats the baseline multiplier ( Volume Threshold Multiplier ), filtering out weak retail moves.
2. Embedded Zone CVD Lines
Intra-Box Order Flow Tracking: The script counts the volume delta (buying volume minus selling volume based on candle closes) from the exact bar the pivot formed.
Normalized Inside the Box: Using custom polylines, the script scales and plots the rolling CVD trend directly inside the height of the zone box. This lets you see order-flow accumulation without cluttering your screen with bottom dashboard panels.
Live Labels: A small text readout updates on the leading edge of the box, showing the current net CVD volume.
// Normalize and scale running CVD values perfectly inside the zone box coordinates
normalizeDeltaToBox(float currentDelta, float minDelta, float maxDelta, float boxBottom, float boxTop) =>
float rangeDelta = maxDelta - minDelta
float rangeBox = boxTop - boxBottom
rangeDelta == 0 ? boxBottom + rangeBox / 2 : boxBottom + (currentDelta - minDelta) / rangeDelta * rangeBox
🔵 DYNAMIC ZONE FLIPS & SIGNALS
1. Support and Resistance Flips
Automatic Re-Coloring: When a strong candle close breaks entirely through a zone, the script changes its role. Broken resistance boxes switch to your Support Zone Color (yellow), and broken support boxes turn into your Resistance Zone Color (blue).
Border Style Changes: The box outline instantly switches from a solid line to a dashed line the moment a zone is breached, flagging a clear shift in institutional liquidity.
2. Retest and Breakout Plots
Breakout Arrows: The system prints clean triangle up or down arrows ( ▲ or ▼ ) on your chart labeled "Res Breakout" or "Sup Breakdown" the exact bar a zone boundary fails.
Proximity Retest Shapes: It plots tiny circle markers when price pulls back to successfully test a normal support/resistance hold. If price tests a broken zone that has reversed roles, it prints a diamond marker to flag an advanced flipped S/R retest.
// Zone Breakout and Role Inversion Logic snippet
if close > rTop
box.set_bgcolor(lastResBox, color.new(supColor, 90))
box.set_border_color(lastResBox, supLine)
box.set_text_color(lastResBox, supLine)
box.set_border_style(lastResBox, line.style_dotted)
if not resBroken
triggerResBreak := true
resBroken := true
🔵 TRADING STRATEGIES & RISK
CVD Absorption Entries: When price rallies up into a blue resistance box, check the internal dotted CVD line.
If price pushes high into the box but the internal CVD trend slopes down, sellers are absorbing the buy orders. This sets up a high-probability short entry.
Flipped Support Re-Entries: When a bullish breakout triggers a "Res Breakout" arrow, wait for price to pull back to the top border of the broken box. A clean bounce marked by a diamond shape confirms the old resistance has flipped to support, offering a safe continuation trade.
Clear Risk Invalidation floors: You can use the exact borders of the generated boxes to place your stop loss. If you buy a support hold retest, your clear risk invalidation point sits right below the bottom line of that specific support box.
🔵 SETTINGS & CONFIGURATION
Pivot Geometry Controls: Easily fine-tune lookback lengths and volume multipliers to adapt the indicator for volatile crypto assets, indexes, or liquid forex pairs.
Visual Zone Overrides: Adjust background colors, transparency levels, and text label sizing to match your dark or light charting interface seamlessly.
Clean up your layout and trade with volume-weighted precision using the High Volume Pivot Support & Resistance Zones terminal. 指标

Liquidity Heatmap MTF [JOAT]LIQUIDITY HEATMAP MTF
A weighted multi-timeframe liquidity-zone heatmap that aggregates pivot-based resting liquidity from up to four higher timeframes (1H / 4H / 1D / 1W by default), decays old pivots over a configurable half-life, and projects the resulting hot bins as a right-side colour strip plus optional horizontal lines that extend back across the chart so the key levels are visible on price. Adds an estimated liquidation-level layer on top — the price ranges where leveraged positions get unwound — and warns when price approaches one.
Why MTF aggregation matters
Single-timeframe liquidity maps miss the structural reality that institutional flow operates on multiple horizons simultaneously. A daily pivot high carries more resting liquidity than a 1H pivot high, but both contribute. Liquidity Heatmap MTF lets you turn on / off each of four timeframes (1H, 4H, 1D, 1W) independently and assign each a weight so the contribution to the heatmap is proportional to your conviction about how much that timeframe matters.
Defaults:
1H weight 1.0×
4H weight 1.5×
1D weight 2.5×
1W weight 4.0× (off by default; enable for macro reads)
Pivots are detected in each HTF context using configurable left/right lookbacks. Each pivot contributes intensity proportional to the volume traded on its bar (with optional log compression for instruments that have rare extreme prints).
Decay — half-life modelled
A pivot from 200 bars ago should not contribute equally to today's heatmap. The script applies an exponential decay:
intensity = volume × exp(−ln(2) × age / halfLife)
The Decay Half-Life input (default 180 bars) sets how quickly old pivots fade. After one half-life, an old pivot contributes half as much; after two, a quarter; and so on. This is the principled way to weight history — it never drops contributions discontinuously and it never lets ancient liquidity poison the current read.
Heatmap grid + hot-zone classification
The price range over the visible lookback (configurable, default 500 bars + 2% padding) is divided into N bins (default 60, capped at 200 by Pine's max_boxes_count). Each pivot's decayed intensity is accumulated into the bin closest to its level. Bins are then normalised against the hottest bin and any bin above the Hot Zone Threshold (default 70% of max) is tagged HOT.
The heatmap is rendered as a vertical strip on the right of the chart (configurable width and gap from latest bar) with bins coloured along a deep-ocean blue gradient — cold bins are near-invisible (transparency floor), hot bins are vivid cyan.
Hot-zone projection across chart (JOAT enhancement)
This is the headline visual: the top hot bins are projected back across the chart as horizontal lines (configurable count, default 5) with price labels, extending back a configurable number of bars (default 120). So you do not just see the heatmap as a right-side strip — you see the key levels on the chart at the price levels they actually occupy. Toggleable.
Estimated liquidation levels (the second layer)
On top of the liquidity heatmap, an optional liquidation layer estimates where leveraged positions get stopped out. Each significant HTF pivot extreme gets a projected liquidation level at:
liq_level = pivot ± (ATR × liqPad)
Configurable liqPad (default 0.5 ATR). Configurable caps on liquidation lines above (default 4) and below (default 4) the current price. Lines extend right by a configurable bar count. When price comes within liqAtrMult × ATR of a liquidation line, the !LIQ alert fires and the line is rendered in the accent colour (the only off-family colour in the palette — bright orange).
The liquidation logic is intentionally conservative — pivots provide the structural anchor; the ATR pad is the only configurable variable; lines are capped to avoid clutter.
Dashboard
Monospaced table positionable to any of nine corners. Surfaces:
Active timeframes and their weights.
Total pivots tracked.
Hottest bin price and intensity %.
Hot-zone count.
Liquidation lines above / below current price counts.
Distance (in ATR units) to nearest liquidation line.
Last hot-zone activation with bar-age.
Visual system
Heat strip (toggleable width / gap / transparency).
HOT tags on hottest bins (toggleable).
Optional strip border.
Horizontal hot-zone lines extending back across the chart (toggleable, capped, configurable length).
Liquidation level lines above and below (toggleable, capped).
LIQ labels (toggleable).
A locked Deep Ocean palette (bathypelagic blue gradient on near-black, with the bright orange #FF6B00 reserved exclusively for liquidation warnings) gives the chart a distinct institutional liquidity-map identity.
Alerts
Three alert conditions, each independently controllable, each cooldown-gated:
Hot Zone Activated — fires when a new bin crosses the hot threshold.
Approaching Liq Level — fires when price comes within liqAtrMult × ATR of a liquidation line.
New HTF Pivot Added — fires when a new HTF pivot is detected and added to the cache.
A configurable cooldown (default 8 bars) prevents back-to-back alert spam.
How to read it
Three reads, in order of conviction:
Approaching Liq Level alert — the most actionable single signal. Price is within striking distance of estimated leveraged-position stop-out levels. Liquidations tend to be self-fulfilling on the way in (cascade through stops) and exhaustive at the extreme (no more sellers / buyers left after the cascade).
Multi-timeframe hot zone — when a hot bin is contributed to by more than one HTF, it is by definition more significant. The hot line projections show you which levels are MTF-confluent.
New HTF Pivot in 1D or 1W context — these are the slowest-moving structural events. A new daily or weekly pivot reshapes the heatmap meaningfully.
Suggested settings
Defaults (1H/4H/1D enabled, weights 1.0/1.5/2.5, decay half-life 180, hot threshold 70%) are tuned for intraday-to-swing trading on liquid futures, FX, and crypto. For pure scalping, disable 1D / 1W and raise 1H weight. For pure macro, enable 1W and raise its weight; reduce 1H to 0.5×. The liqPad default 0.5× ATR is conservative — raise to 1.0× for more cautious liquidation projections.
Originality
The implementation — the MTF pivot aggregation pipeline with per-TF weights, the exponential half-life decay model, the bin-grid heatmap with hot-zone threshold, the cross-chart hot-line projection layer, the ATR-based liquidation level estimator with above/below caps, the cooldown-gated multi-alert engine, and the deep-ocean palette with the orange liquidation accent — is JOAT-original. No third-party code reused. The "liquidity map" concept comes from professional desks; the implementation here is purpose-built for Pine v6 with bar data only.
Limitations
Estimated liquidation levels are an inference from pivots and ATR — Pine cannot read actual leverage data or aggregated futures funding/open-interest. The lines mark where stop clusters are statistically likely to sit, not where they actually do. Pine's max_boxes_count caps the grid at 200 bins; the script clamps to 200 max even though the input allows higher requests. MTF pivots use request.security in non-lookahead mode, so they are non-repainting once confirmed at their HTF.
—
-made with passion by jackofalltrades
指标

指标

Smart SR Zones [JOAT]SMART SR ZONES
Support / resistance done properly. Most public SR scripts paint a horizontal line at every pivot, which produces wallpaper, not analysis. Smart SR Zones does the opposite — pivots are first detected with a volatility-aware engine, then clustered into zones, then scored by volume and touches, then filtered by spacing and distance. What ends up on the chart is the small handful of levels that actually matter for the current market state.
Pivot detection — preset-driven
A single Strength Preset selects the personality of the pivot engine:
Scalp — 4 left / 2 right, 0.4× ATR clustering tolerance, 4-bar minimum spacing. For 1–5m charts.
Local — 6 / 4, 0.5×, 8-bar. Tight zones from recent structure.
Swing — 15 / 8, 0.9×, 20-bar. The balanced default.
Major — 35 / 15, 1.4×, 50-bar. Wide macro zones.
Custom — every parameter is exposed for manual tuning.
The preset abstraction means you do not need to refit anything across timeframes — pick the read you want and the engine does the rest.
Clustering, not stacking
When two pivots fall within Cluster Tolerance × ATR of each other they are merged into a single zone, with the box span widened to cover both extremes. This is the difference between a "level" and a "zone": a level pretends price is precise, a zone respects the fact that liquidity sits in a band. The cluster tolerance is ATR-relative so the same setting works across symbols.
Touch counting, properly gated
A pivot must contribute to a cluster from a minimum bar spacing (preset-driven). Without this filter a chop within a zone gets counted as ten separate touches and inflates the strength score. With it, a zone earns its touch count from genuinely independent visits.
Volume-weighted strength + star rating
Each cluster accumulates the bar volume at every contributing pivot. The aggregate is converted to a 1–3 star rating relative to the strongest zone currently on the chart, and is shown in the zone label alongside the touch count. Zones can optionally be coloured by volume share so the visually loudest box is the one carrying the most demonstrated activity.
Zone of Interest (ZOI) — the headline filter
A zone earns the ZOI badge when all of these are true at the same time:
It has met the minimum-touches threshold (so it is real structure).
Its volume share is above the ZOI volume threshold (so it is meaningfully active).
It has not been touched recently — at least ZOI Quiet bars since the most-recent touch.
In other words, a ZOI is a high-quality level that the market is conspicuously not testing — and these are usually the next levels that matter. The ZOI gets a bright burlywood border with an optional animated pulse so it visually separates from the rest of the SR stack.
Distance hiding
A "Hide zones farther than %" input drops anything whose centre price is too far from current — so when you scroll into history the chart does not get cluttered with macro zones from another era. Set to 0 to keep everything visible.
Broken zones and dropped zones
Two optional historical layers:
Broken — zones that were physically closed through. Renders in a desaturated palette so you can see where structure failed without confusing it for active level.
Dropped — zones that were removed not by a break but by reorganisation, because newer / stronger pivots reshuffled the cluster set.
Both are off by default so a working chart stays clean.
Optional signal layer
Three small markers (all off by default) for traders who want execution hints rather than just structure:
Successful test — circle on bars that touched an active zone and rejected.
Retest — diamond when price returns to a broken zone from the opposite side, inside a configurable window.
Zone reaction — small diamond on a touch-with-hold, plus a text label on physical break events.
A configurable cooldown prevents back-to-back markers from the same zone.
Dashboard
A compact diagnostic table, positionable to any of nine corners, monospaced. Shows nearest support / resistance with distance, current ZOI status, active zone count per side, and the preset in use. A compact mode hides descriptions for narrow layouts.
Alerts
A single high-signal alert is exposed: Zone of Interest activation — fires on the first bar a zone qualifies as a ZOI. The other layers are visual diagnostics, not alert-grade; this is intentional, because the ZOI rule is the strongest filter in the script and is what you actually want to be notified about.
How to read it
Look at the chart and ignore everything except the ZOI-tagged zones and the stars. The stars tell you which historical levels have the most demonstrated activity; the ZOI badge tells you which of those have been deliberately avoided recently. The intersection — a star-rated ZOI close to price — is the cleanest level read this script can produce. Use the volume score and the touch count as a tiebreaker when multiple ZOIs are in play.
Suggested settings
Default Swing preset works well from 1H through 1D on liquid futures, FX, and crypto. Drop to Local for intraday execution and Scalp for tape-reading on minute charts. Major is for weekly / monthly macro reads. The ZOI volume threshold (70%) is intentionally strict — drop it to 50–60% if you want more frequent ZOI candidates.
Originality / what's reused
The vocabulary (pivot, cluster, touch count, broken zone, retest) is public-domain market-structure language. The implementation — the preset-driven engine, the ATR-clustering, the volume-weighted star rating, the ZOI rule (touches + volume share + quiet-period), the dropped-zone reorganisation logic, and the volume-share intensity colouring — is JOAT-original and tuned together as a single system. No third-party code reused.
Open source
Published open-source under the default Mozilla Public License 2.0. The source is fully documented inline — every helper is sectioned, every input has a tooltip, and the structural layers are separable so you can learn from any specific piece. Forks welcome with credit.
Limitations
SR is structural context, not a signal generator. Smart SR Zones does not print buy / sell labels — it prints zones, ratings, and a single high-quality ZOI alert. On extremely illiquid instruments the volume-share rankings will be noisy and the ZOI rule will fire less often; that is the right behaviour. Zones beyond the Pivot Memory horizon are dropped to stay under TradingView's 500-object cap.
—
-made with passion by jackofalltrades
指标

Visible Range Support and Resistance [BigBeluga]🔵 OVERVIEW
Visible Range Support and Resistance is a dynamic support/resistance tool that analyzes price structure only within the visible range of your chart. It detects key levels based on clustered pivots inside a binned vertical range and highlights zones where price has historically reacted. The tool adjusts in real-time as you pan or zoom, offering adaptive precision at any scale.
🔵 CONCEPTS
Pivot Clustering: Price highs/lows are collected into horizontal "bins" across the visible chart range. If multiple pivots align within a bin, that area is marked as a potential support or resistance zone.
Visible Range Only: Calculations are limited strictly to the bars currently visible on the chart. Zooming or panning changes the result.
Bin System: The visible high-to-low range is divided into 100 horizontal zones (bins) to group pivots and detect confluence.
Multi-Threshold Detection: Users can enable two separate S/R detection levels with different pivot count thresholds for more nuanced signals. The more pivot points a level has, the thicker and richer the color.
Directional Context: Labels include arrows (▲ or ▼) to show whether the current price is above (support) or below (resistance) each zone.
Range Boundaries: The top and bottom of the visible range are marked with dashed lines and labeled as Top Range and Bottom Range .
🔵 FEATURES
Detects S/R zones based on the number of pivots found within each price bin.
100 horizontal bins divide the visible price range, allowing high resolution detection.
Only uses data from visible bars—zooming out recalculates the indicator for more data.
Customizable number of pivot confirmations (e.g., 2, 3, 4, 5) before a level is shown.
5 Pivots
Dual-level detection lets you show stronger and weaker zones separately.
Automatically colors support (green) and resistance (blue) with dynamic intensity.
Labels show pivot count and direction (support/resistance).
Automatic cleanup of overlapping levels for visual clarity.
Dashed top/bottom range markers help define the visible scope.
Session SMA calculates from the visible range start (from the chart edge)
Visible range bars count
🔵 HOW TO USE
Zoom in for precise intra-range support and resistance zones based on current structure.
Zoom out to load more pivot data and identify long-term levels.
Use the pivot threshold (e.g., 3 or 4) to control signal strength—higher = stronger levels.
Watch for price reactions or breakouts around high-pivot zones to identify key areas.
Combine with trend, volume, or order flow tools to confirm the relevance of each S/R zone.
Adjust line and label colors for better contrast with your chart theme.
🔵 CONCLUSION
Visible Range Support and Resistance is a smart, range-sensitive tool for mapping meaningful horizontal levels. By scanning only what you see on the screen, it provides an adaptive edge to traders focused on real-time price action. Whether you’re scalping short-term zones or zooming out for macro structure, this tool flexes with your view to keep the most relevant levels front and center. 指标

Momentum Saturation Zones [JOAT]Momentum Saturation Zones
Introduction
Momentum Saturation Zones is an open-source indicator that detects when momentum has reached an extreme and then begins pulling back, marks the price level where that extreme occurred as a zone, and tracks the zone's structural validity until price either respects or invalidates it. The premise is that momentum peaks and troughs at significant price levels leave structural imprints — areas where the market demonstrated conviction — that subsequently act as reference points for support or resistance.
The key differentiator from a simple overbought/oversold indicator is the composite strength scoring: a zone is only created when a configurable minimum score is reached, incorporating the momentum extreme level, the magnitude of the pullback, volume at the peak bar, and whether a divergence is present.
Core Concepts
1. Multi-Source Momentum
The momentum signal is selectable from five sources: RSI, Rate of Change (normalized), MFI, Stochastic RSI, or a composite average of all four. The composite mode averages RSI, normalized ROC, MFI, and StochRSI into a single signal, reducing single-indicator noise while retaining each component's contribution:
float momSeries = (rsiRaw + rocNorm + mfiRaw + stochD) / 4.0
2. Adaptive Pullback Detection
The saturation trigger fires when momentum has pulled back from a rolling peak by more than a configurable percentage threshold. The threshold is adaptive — scaled by the current ATR relative to its 50-bar average. In high-volatility regimes the required pullback is larger; in low-volatility regimes it is smaller. This prevents premature triggers in noisy markets and late triggers in calm ones.
3. Composite Strength Scoring (0-100)
Each potential zone is scored before creation. The score combines four components: how extreme the momentum peak was (0-40 points), how far beyond the threshold the pullback reached (0-20 points), the volume ratio at the peak bar relative to average (0-20 points), and whether momentum divergence is present (0-20 points). Only zones meeting the minimum score gate are created:
float extrem = math.max(0.0, math.min(40.0, (peakAbsMom - 50.0) * 40.0 / 50.0))
float pbScore = math.max(0.0, math.min(20.0, (actualPb - adaptPct) * 2.0 + 10.0))
float volScore = math.max(0.0, math.min(20.0, (volRatio - 1.0) * 20.0))
float divScore = bearDiv and i_useDiv ? 20.0 : 0.0
4. Zone Anchor Logic
Bear resistance zones are anchored at the candle high of the peak bar with the zone extending upward by one ATR multiple — the bottom edge sits exactly at the candle high so price must reach up to touch the zone. Bull support zones are anchored at the candle low of the trough bar with the zone extending downward — the top edge sits at the candle low so price must come back down to touch it.
5. Zone Lifecycle and Touch Counting
Each zone tracks how many times price has returned to it (touch counter displayed in the label). When price closes beyond the invalidation offset, the zone is deleted entirely — no ghost boxes remain. A proximity check before creation prevents duplicate zones from stacking at the same price level.
Features
Five momentum sources: RSI, ROC, MFI, StochRSI, or Composite average
Adaptive pullback threshold: ATR-normalized trigger scaled to current volatility regime
Composite strength scoring (0-100): Extremity, pullback depth, volume, and divergence components
ATR-anchored zones: Three-layer gradient zones (outer, mid, core) with center line
Proper candle anchoring: Resistance bottoms at candle high; support tops at candle low
Touch counting: Zone labels update each time price retests the zone
Proximity deduplication: No duplicate zones within 1.5 ATR of same-side existing zones
Clean invalidation: Zones deleted entirely on invalidation — no ghost boxes
Divergence detection: Momentum divergence contributes bonus points to strength score
Candle coloring: Candles tinted when price is inside or within 0.5 ATR of a valid zone
Dashboard: Momentum value, pullback threshold, volatility regime, active zone count, and directional strength scores
Input Parameters
Momentum Configuration:
Momentum Source: RSI, ROC, MFI, StochRSI, or Composite (default: Composite)
Momentum Length: Period for all momentum calculations (default: 14)
Peak Lookback Bars: Rolling window for peak/trough detection (default: 50)
Saturation Trigger:
Adaptive ATR Threshold toggle (default: on)
Pullback % from Peak: Required pullback to trigger (default: 10%)
RSI Overbought/Oversold: Absolute extreme levels for gate (default: 70/30)
Cooldown Bars: Minimum bars between zone creation events (default: 10)
Zone Settings:
Max Active Zones: Simultaneous zone cap (default: 4)
ATR Length: ATR period for zone sizing (default: 14)
Zone Width (x ATR): Zone height as ATR multiple (default: 1.0)
Invalidation Offset %: Margin beyond zone for invalidation trigger (default: 0.3%)
How to Use This Indicator
Step 1: Read the Zone Strength
Zones display their strength score (0-100) in the label. Higher-scoring zones represent confluences of multiple factors and are historically more likely to produce price reactions.
Step 2: Use Touch Count for Context
A zone touched twice and holding is more significant than a freshly-created zone. A zone touched three or more times that eventually breaks is exhausted — expect the break to accelerate.
Step 3: Watch for Candle Color Changes Near Zones
The candle coloring activates when price enters the zone or comes within 0.5 ATR of it. This provides a passive alert that price is approaching a structural reference.
Indicator Limitations
Momentum peaks do not always coincide with price extremes — the zone is placed at the price of the peak momentum bar, which may differ from the highest/lowest price in the lookback
In strongly trending markets, zones on the trend side may be repeatedly invalidated as trend continues
The strength score is a composite heuristic, not a backtested predictor of zone success rate
Originality Statement
The composite strength scoring system — combining momentum extremity, pullback depth, volume, and divergence into a single 0-100 gate — applied to zone creation is the original analytical contribution. The proper candle-edge anchoring (resistance bottom at candle high, support top at candle low), proximity deduplication, and clean deletion on invalidation are implementation details not present in most published support/resistance zone indicators.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Momentum saturation zones are historical reference levels and do not predict future price reactions. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
指标

Institutional Flow Sentinel [JOAT]Institutional Flow Sentinel
Introduction
Institutional Flow Sentinel is an open-source market structure tool that tracks two categories of price behavior that institutional order flow leaves behind: Fair Value Gaps and liquidity sweeps. Both concepts originate from ICT (Inner Circle Trader) methodology, but this implementation combines them into a single unified engine with a live zone lifecycle, composite state tracking, and candle coloring — none of which are standard in most published FVG or sweep tools individually.
The core insight is that large participants need liquidity to fill orders. They engineer moves through external swing highs and lows to trigger retail stop orders, collect that liquidity, then reverse. Identifying these events in real time, tracking whether the gap or sweep level has been respected or violated, and classifying the current order flow bias from those events is the purpose of this indicator.
Core Concepts
1. Fair Value Gap Detection
A Fair Value Gap is a three-candle imbalance where the middle candle's range is not overlapped by the adjacent candles. Bullish FVGs form when a candle's low is above the high two bars prior. Bearish FVGs form when a candle's high is below the low two bars prior:
bullFVG = low > high
bearFVG = high < low
Each gap is stored with its price bounds and tracked bar-by-bar. If price returns and closes inside the gap the zone is marked mitigated and drawn differently. Unmitigated gaps project forward as active imbalance reference levels.
2. Liquidity Sweep Detection
The indicator tracks pivot highs as Buyside Liquidity (BSL) and pivot lows as Sellside Liquidity (SSL). A sweep occurs when price wicks through the level but then closes back inside it — indicating the liquidity was taken and price rejected:
bslSweep = high > bslLevel and close < bslLevel
sslSweep = low < sslLevel and close > sslLevel
Sweep events are labeled on the chart and contribute to the cumulative order flow bias score.
3. Composite Bias Score
Each confirmed FVG and sweep increments or decrements a running bias counter. Bullish FVGs and bearish sweeps (stops run below, reversal up) add positive weight. Bearish FVGs and bullish sweeps add negative weight. The dashboard displays this composite score alongside the current structural bias.
4. Zone Lifecycle Management
Active FVG zones are extended bar by bar. When price mitigates a zone (closes inside it), the zone rendering switches to a dimmed style but remains visible as a historical reference. The indicator tracks the count of active unmitigated gaps on each side and displays them in the dashboard.
Features
Real-time FVG detection: Bullish and bearish imbalances identified and drawn as price-bound boxes
FVG mitigation tracking: Zones update styling when price returns into the gap
BSL and SSL level tracking: Pivot-based liquidity levels updated each bar
Sweep event labels: On-chart labels at every confirmed liquidity sweep with direction
Composite order flow bias: Running score combining FVG and sweep events
Candle coloring: Candles painted by current bias state (bullish / bearish / neutral)
Institutional dashboard: Top-right table showing active FVGs, sweep count, and bias score
All signals on confirmed bars: barstate.isconfirmed throughout — no repainting
Input Parameters
Structure Detection:
Pivot Lookback: Bars required on each side for BSL/SSL pivot confirmation (default: 5)
Max Active FVGs: Maximum simultaneous FVG zones drawn per side (default: 3)
Display:
Show FVG Zones toggle
Show Sweep Labels toggle
Show Candle Color toggle
Show Dashboard toggle
How to Use This Indicator
Step 1: Identify Active Imbalances
Unmitigated FVG boxes mark price areas where a directional move was so strong that no two-sided trading occurred. Price tends to return and fill these gaps. Use them as magnet targets or potential reversal zones.
Step 2: Watch for Sweep Events
When a sweep label appears at a prior swing level, the indicator is signaling that liquidity at that level was collected. Sweeps followed by a strong close in the opposite direction are high-probability reversal setups.
Step 3: Read the Bias Score
The composite score in the dashboard quantifies accumulated institutional signals. A strongly positive score suggests the order flow is biased bullish; strongly negative suggests bearish. Use this as a directional filter.
Indicator Limitations
FVGs form on every timeframe and many will not be mitigated; not every gap is tradeable
Sweep detection uses close-back confirmation which adds one bar of delay
The bias score is a heuristic, not a statistically validated predictor of future direction
This indicator identifies market structure events; it does not generate entry or exit signals
Originality Statement
This indicator is original in combining FVG zone lifecycle management, pivot-based liquidity sweep detection, and a composite order flow bias score into a single Pine Script v6 publication. The zone mitigation tracking system, which distinguishes between active and mitigated imbalances while keeping both visible with different rendering, is not present in most standalone FVG tools on TradingView.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. All signals are based on historical price data and do not guarantee future results. Always use proper risk management.
-Made with passion by jackofalltrades
指标

Liquidity Sweep Probability [JOAT]Liquidity Sweep Probability is an open-source Pine Script v6 overlay that maps equal highs and equal lows, tracks sweeps through those levels, detects reclaim behavior, and records simple continuation samples after reclaim events. It is designed for traders who want a clean way to observe where price has built nearby liquidity and how price behaves after that liquidity is tested.
The script does not claim that a sweep must reverse price. Instead, it separates equal-level creation, sweep, reclaim, break, and continuation outcomes. The dashboard shows the most recent event, the side involved, sample counts, and an adaptive probability-style reading derived from the script's own observed samples.
Core Concepts
1. Equal High and Equal Low Detection
Confirmed pivots are compared against the previous pivot on the same side. If two pivot highs or lows are within an ATR-based tolerance, a liquidity zone is created.
pivotHigh = ta.pivothigh(high, pivotLength, pivotLength)
if not na(lastHighPivot) and math.abs(pivotHigh - lastHighPivot) <= equalTolerance
zoneTop = math.max(pivotHigh, lastHighPivot) + zonePadding
zoneBottom = math.min(pivotHigh, lastHighPivot) - zonePadding
2. Sweep State
A high-side sweep occurs when price trades beyond the equal high zone but closes back below the zone top. A low-side sweep occurs when price trades below the equal low zone but closes back above the zone bottom.
3. Reclaim State
After a sweep, the script watches a configurable reclaim window. A high-side reclaim requires price to close back below the lower boundary of the swept high zone. A low-side reclaim requires price to close back above the upper boundary of the swept low zone.
4. Continuation Sampling
After reclaim, the script stores a target distance based on ATR and tracks whether price reaches it within the outcome window. These counts are displayed as samples. They are descriptive statistics from the chart, not a prediction.
5. Probability Panel
The probability-style score blends observed sample rate, sweep distance, zone age, and reclaim status. It gives a compact read of the current event context.
sampleRate = total > 0 ? (wins * 100.0) / total : 50.0
score = clamp(sampleRate * 0.62 + 19.0 + distanceBoost + ageBoost + reclaimBoost, 5.0, 95.0)
Features
Equal high and equal low zones: ATR tolerance avoids exact-price-only matching
Sweep detection: Tracks confirmed high-side and low-side liquidity sweeps
Reclaim detection: Separates immediate breaks from reclaim behavior
Continuation samples: Counts historical reclaim outcomes within the active chart sample
Dashed midlines: Each zone includes a center reference line
Stateful labels: Zones update from Equal High/Low to Sweep, Reclaimed, or Broken
Probability panel: Shows side, status, chance value, samples, and age
Alerts: Sweep, reclaim, and zone break conditions
Input Parameters
Swings:
Swing Pivot Length: Pivot sensitivity for equal-level detection
Equal-Level Tolerance: ATR fraction used to compare pivots
Zone Padding: ATR fraction added around the equal level
ATR Length: Volatility length for tolerance and padding
Behavior:
Reclaim Window: Bars allowed for reclaim after sweep
Continuation Window: Bars allowed for measuring post-reclaim continuation
Continuation Distance: ATR target used for sample tracking
Maximum Zones Per Side: Object cap for high and low zones
Visual:
Palette: Selects bull and bear colors
Zone Extension Bars: Forward extension for boxes and midlines
Probability Panel: Shows or hides the dashboard
How to Use This Indicator
Step 1: Identify Equal-Level Zones
Equal highs can act as high-side liquidity references. Equal lows can act as low-side liquidity references.
Step 2: Watch for Sweep and Reclaim
A sweep alone is not enough. Reclaim behavior shows that price tested outside the zone and then closed back through the zone boundary.
Step 3: Read the Sample Count
The sample row shows how many observed reclaim events reached their ATR target on the current chart sample. A small sample should be treated carefully.
Step 4: Use Zones as Context
Use the zones to frame liquidity behavior, then combine the context with your own entry trigger and risk plan.
Indicator Limitations
Equal-level zones are based on confirmed pivots, so they appear after the pivot confirmation window
The probability value is descriptive and chart-dependent
A small number of samples should not be treated as statistically strong
Fast markets may sweep, reclaim, and break multiple zones quickly
Object limits require the script to delete older zones when caps are reached
Originality Statement
Liquidity Sweep Probability is original in its state machine for equal-level zones, sweep/reclaim/break classification, and live sample tracking. It uses public Pine v6 mechanics to build a self-contained liquidity map without copying another indicator's source.
Disclaimer
This script is provided for educational and informational use only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Liquidity sweeps can continue, reverse, or fail without warning. Always use independent analysis and proper risk management.
-Made with passion by jackofalltrades
指标

Structure Fracture Map [JOAT]Structure Fracture Map is an open-source market structure and imbalance zone indicator that combines Fair Value Gap detection with a dynamic quality scoring system, a dual strength bar visualization inside each zone, and a real-time Break of Structure and Change of Character engine. It provides a single-indicator view of where price has left imbalances, how significant those imbalances are, and where structural shifts have occurred.
The problem with most FVG indicators is static treatment — a gap is detected and displayed with no differentiation between a high-quality gap formed on a strong impulse with above-average volume and a weak gap formed on a low-volume, narrow-range bar. Structure Fracture Map scores every FVG at formation and continuously updates that score based on mitigation progress, age, and trend alignment, ranking all active zones so that only the most institutionally relevant ones remain visible.
Core Concepts
1. Fair Value Gap Detection
A bullish FVG exists when the current bar's low is above the high of the bar two positions prior — a three-bar pattern where the middle bar's range creates a gap that price has not filled. A bearish FVG is the inverse. Detection is confirmed only on completed bars to prevent repainting.
2. Four-Component Strength Score
Each FVG receives an initial strength score from four components: gap size relative to ATR(14) scaled to 40 points, volume relative to 20-bar average scaled to 30 points, trend EMA alignment scaled to 20 points, and candle body-to-range ratio scaled to 10 points. The score is recalculated every bar, with a small age penalty and a mitigation penalty applied as price partially fills the gap:
float totalStrength = (gapScore * 40) + (volScore * 30) + (trendScore * 20) + (candleScore * 10)
fvg.qualityScore := totalStrength - fvg.mitigation * 50 - fvg.age * 0.1
3. Dual Strength Bars
Inside each FVG box, two small bars are rendered — one showing bearish pressure score and one showing bullish pressure score as a proportion of the box width. The relative lengths reflect which directional force is currently dominating at that imbalance zone.
4. Mitigation Tracking
Mitigation is computed as the ratio of how far price has penetrated into the zone to the total zone height. A fully mitigated FVG is removed from the display. Partially mitigated FVGs remain visible with their score updated downward, reflecting reduced structural significance.
5. Break of Structure and Change of Character
Pivot highs and lows track the most recent confirmed structural levels. A Break of Structure (BOS) occurs when price closes through the last confirmed pivot in the current structural direction — confirming continuation. A Change of Character (CHoCH) occurs when price closes through the last confirmed pivot against the current direction — signaling a potential structural shift. Both events are labeled with a horizontal line at the break level.
Features
FVG detection with quality scoring: Bullish and bearish fair value gaps detected and scored by gap size, volume, trend alignment, and candle quality
Dynamic score updates: Quality scores recalculated each bar with age decay and mitigation penalty
Top-N zone ranking: Only the highest-scoring active zones displayed; lower-quality zones removed as better ones form
Dual strength bars: Bearish and bullish strength bars inside each zone show directional pressure balance
Mitigation tracking: Zones removed automatically when fully mitigated; partial mitigation reflected in updated score
BOS and CHoCH detection: Structural break events labeled with horizontal level lines and text identifiers
HH / HL / LH / LL pivot labels: Confirmed swing pivot types labeled on chart for structural context
Swing level extension lines: Dotted lines at current unbroken swing levels extending to right edge of chart
Four color themes: Phantom, Neon, Classic, Solar
Non-repainting: All detection gated by barstate.isconfirmed
Alert conditions: New top-ranked FVG, BOS bull, BOS bear, CHoCH bull, CHoCH bear, FVG touched
Dashed FVG borders: Each Fair Value Gap box has a dashed colored border matching its directional bias — teal for bullish, pink for bearish
Clean pivot arrow labels: HH, HL, LH, LL events rendered as minimal text arrows (▲ HH etc.) with no background box, positioned above/below bars without obstructing price action
Short BOS/CHoCH event lines: Break of Structure and Change of Character events marked with compact 6-bar horizontal lines and right-anchored labels — no full-width horizontal clutter
Resistance/Support swing extensions: Nearest unbroken swing high labeled "Res" and swing low labeled "Sup" at right edge, updated each bar
Structural bias background: Subtle bull/bear background tint driven by current HH/HL or LH/LL structural sequence
Trend EMA reference line: 50-period EMA plotted in elite theme color as a trend context reference
Input Parameters
FVG Zones:
Show Top Zones: Maximum number of ranked zones displayed (default: 10)
Max Stored FVGs: Maximum FVGs tracked in memory (default: 50)
Volume MA Length: Volume average for scoring (default: 20)
Trend EMA Length: Trend alignment reference (default: 50)
Show Strength Bars toggle
Bull/Bear FVG colors
Market Structure:
Swing Lookback: Bars required on each side for pivot confirmation (default: 10)
Show Structure Labels toggle
Show BOS Events toggle
Show CHoCH Events toggle
Show Swing Level Lines toggle
How to Use This Indicator
Step 1: Read Zone Rankings
Zones with higher quality scores represent structurally more significant imbalances. Focus on fresh (un-mitigated) zones with strong scores for potential reaction areas.
Step 2: Monitor Dual Strength Bars
A bullish FVG whose bearish strength bar is growing indicates that selling pressure is building within the zone. When the bearish bar exceeds the bullish bar, the zone may be losing its bullish character.
Step 3: Use BOS and CHoCH for Context
A BOS confirms continuation. A CHoCH is a warning that the current structural bias may be reversing. CHoCH events near high-quality FVG zones are particularly significant structural signals.
Step 4: Watch Swing Level Extensions
The dotted right-edge lines show the nearest unbroken swing high and low — the next levels where a BOS or CHoCH could occur. These levels frame the most immediate structural breakpoints.
Indicator Limitations
Pivot confirmation requires a lookback offset. BOS and CHoCH events are labeled after confirmation, not on the bar that caused them
FVG quality scores include volume as a factor. On instruments where volume is less meaningful, the score may rank gaps differently than expected
Age penalty causes long-standing FVGs to lose score over time even if they remain structurally valid
This indicator identifies existing imbalances and structural events. It does not predict where price will go next
Originality Statement
A dynamic per-bar quality score for FVGs that decays with age and mitigation, combined with a top-N ranking system that actively removes lower-quality zones when better ones form, is not replicated in existing open-source Pine Script v6 FVG publications
Dual strength bars rendered inside each FVG box — showing the current bull-versus-bear directional pressure balance within that specific imbalance zone — is an original visualization concept
Combining FVG quality ranking, mitigation tracking, BOS/CHoCH structural event detection, and pivot type labeling in a unified indicator with a single clean overlay is an original integration
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Fair Value Gaps and structural events are based on historical price data and do not predict future price direction. The author accepts no responsibility for trading losses resulting from use of this indicator.
Made with passion by jackofalltrades
指标

Polaris VWAP Mesh [JOAT]Polaris VWAP Mesh
Polaris VWAP Mesh tracks four anchored VWAPs simultaneously — Session, Swing-High pivot, Swing-Low pivot, and Previous-Day-Open — and detects pairwise confluence whenever two or more of them are within an ATR-scaled proximity of each other. Each VWAP carries a plus-or-minus 1-sigma deviation band. Confluence zones become full-chart-width persistent bands. A multi-anchor bias score counts how many VWAPs price is currently above.
What makes it different
Most VWAP scripts plot a single anchor (session or daily). Polaris simultaneously runs four independent anchored-VWAP engines and surfaces their interactions as confluence zones.
Confluence detection uses an ATR-scaled proximity threshold rather than a fixed percentage, so it adapts to the instrument's volatility automatically.
A multi-anchor bias counter aggregates the four VWAPs into a single 0-to-4 score. Full-chart-width tints apply when three or more VWAPs are above (or below) the close.
Swing-anchored VWAPs reset at confirmed pivot points and start fresh from the moment of pivot confirmation (forward-only, non-repainting). The Previous-Day-Open VWAP is anchored to the open of the prior daily bar so it captures yesterday's reference.
A pairwise distance matrix is displayed in plain text at the right edge — six pair distances, with the two tightest pairs highlighted.
How it works
An anchored VWAP function maintains three cumulators per anchor — price-times-volume, volume, and price-squared-times-volume — to deliver both the VWAP and its rolling standard deviation since the anchor.
Anchor reset conditions: Session start of the user-defined session window. Swing-High on confirmed ta.pivothigh. Swing-Low on confirmed ta.pivotlow. Previous-Day-Open on ta.change(time("D")), capturing the open of the new day, then locking after a day passes.
Pairwise distance check: for each of the six possible pairs, if the absolute distance between VWAPs is less than proximityThreshATR times ATR(14), an active confluence is flagged. The mid-price between the two VWAPs becomes the confluence level.
Multi-anchor bias counts how many of the four VWAPs the close is above.
Reading the chart
Four VWAP lines, each in its own color (session blue, swing-high red, swing-low mint, prev-day-open purple, all user-configurable).
Plus-or-minus 1-sigma deviation band shading per VWAP.
Full-chart-width confluence zones (persistent bordered boxes) at each active confluence level, with right-edge labels naming the contributing pair.
Anchor reset markers: small vertical lines per anchor at the bar of reset (capped at 20 per anchor type).
A multi-anchor bull / bear bgcolor tint (very faint) when three or more VWAPs are on one side of the close.
Iridescent candle recolor by bull-count.
Right-edge VWAP labels with plus-or-minus sigma deviation tags.
Pairwise distance matrix label cluster.
Anchor-age label cluster.
Bias-flip timeline labels and VWAP-cross event labels.
Signals
Bull / bear VWAP cross (any anchor)
Session VWAP bull / bear cross (dedicated alerts)
Previous-Day-Open VWAP bull / bear cross (dedicated alerts)
Confluence touch (price entered an active confluence zone)
Multi-anchor bull / bear bias activation
All gated on barstate.isconfirmed or barstate.ishistory. No future references.
Inputs
Anchors : session window string, swing pivot length.
Bands : standard deviation multiplier, band shading toggle.
Confluence : proximity threshold in ATR units, confluence zones toggle.
Visuals : bullish / bearish colors, per-anchor color overrides, per-anchor visibility toggles, candles, labels.
Dashboard : position, size.
How traders use this
Confluence trading : confluence zones are price magnets. Reactions to them (touches with rejections) are tradable. Clean breaks through with volume can be trend signals.
Multi-anchor bias : when three or four of the four VWAPs are on the same side of price, the trend is well supported across multiple anchors. Counter-trend trades in this regime are lower probability.
VWAP rotation : the previous-day-open VWAP is a frequently respected institutional reference. Crosses of it often coincide with bias shifts.
Plus-or-minus 1-sigma bands : extensions to plus-or-minus 1 sigma from a fast-moving anchor often coincide with short-term mean-reversion zones.
Limitations
Swing-anchored VWAPs begin tracking only after pivot confirmation, so they lack history before that pivot was confirmed. This is by design (non-repainting), not a bug.
The session VWAP requires the user to set a session window matching the instrument's primary trading window.
The pairwise confluence test is O(1) per bar (six pairs). Confluence zones extend across the chart and use persistent box objects. They are capped at six active zones (the maximum number of pair combinations).
Confluence is a price-coincidence test, not a flow-direction test. Use other tools to gauge directional bias once confluence is identified.
Compatibility
Pine Script v6 open-source indicator (overlay). Any symbol with volume data. Designed for sessions in America/New_York by default. Change the session window for other markets. No request.security calls.
Defaults
0930-1600 EST session window, 10-bar pivot length, 0.5x ATR proximity threshold, mint / red brand colors plus blue / red / mint / purple anchor accents, top-right medium dashboard.
指标

Apex Pivot & S/R Dynamics [Pineify]Apex Pivot & S/R Dynamics
This indicator maps structural support and resistance directly from confirmed pivot highs and lows, then tracks each level in real time until price decisively closes through it. Rather than drawing static zones at fixed intervals, every line is anchored to an actual swing point and extended bar by bar — the moment a close-based breach occurs, the line is deleted and a breakout label appears. The result is a chart that reflects only the levels that are still relevant right now.
Key Features
Pivot-confirmed S/R lines drawn at the exact bar where a swing high or low was established
Close-based breakout detection with a one-bar confirmation filter — no reaction to wicks alone
Automatic line removal on breach, keeping the chart free of invalidated levels
Configurable cap on active lines per side; oldest unbroken levels drop off when the limit is hit
Separate color controls for resistance, support, bullish breakout labels, and bearish breakout labels
How It Works
Pine's built-in ta.pivothigh() and ta.pivotlow() functions require price to form a local extreme confirmed by length bars on both sides. A pivot confirmed with length=15 means the indicator "sees" it 15 bars after it forms — and draws the line aligned back to that original swing bar. This lag is inherent to pivot detection and trades off responsiveness for confirmation quality.
Each confirmed pivot spawns a dashed horizontal line stored in a typed array alongside its exact price. Every subsequent bar, the loop iterates through active lines and extends them to the current bar. When a close-above-resistance or close-below-support transition occurs (previous close on the wrong side, current close on the right side), the breakout condition fires: the line is deleted from the array, an annotated label is placed, and the level is gone from the chart permanently.
Bars accumulate until a swing extreme is confirmed on both sides
A dashed line is created at the pivot price, extending right indefinitely
Each bar, the loop checks whether price has closed through each level
On breach: label placed, line deleted, level removed from active tracking
If unbroken levels exceed the configured cap, the oldest is silently removed
How the Components Work Together
The pivot detection sets the quality bar for which prices become levels — only price extremes that the market has already tested and respected on both sides qualify. The one-bar close confirmation then filters out wicks that pierce a level intrabar but don't follow through: a single candle that closes back inside the range doesn't trigger a breakout. Together, these two filters mean the breakout label fires on the first candle that suggests actual intent to move away from the level, not just noise around it.
The array-based memory management is what separates this from simpler implementations that draw lines and forget them. Because each line object is tracked with its price level, the indicator can cleanly unwind invalidated structure rather than letting stale lines accumulate across months of history.
Trading Ideas and Insights
On a retest setup: watch for price to pull back to a freshly broken resistance level (now acting as support) without triggering a new bearish breakout label — that silence is the confirmation
When multiple resistance lines cluster within a few ticks of each other, the zone represents confluent supply; a breakout label through that cluster carries more weight than a breach of an isolated swing
Use the breakout label count per session as a rough measure of trend strength — trending days tend to fire several same-direction labels in sequence, while ranging days flip back and forth
On higher timeframes (daily, weekly), the lines mark major structural zones; consider using a tighter lookback (8–10) on intraday charts where swing structure is denser
Past behavior at these levels does not guarantee future outcomes. S/R analysis works best when combined with volume, momentum, or broader context rather than used in isolation.
Unique Aspects
Lines are anchored to their originating pivot bar visually — the small triangle marker shows exactly which candle created each level, so you can assess the quality of the original swing without scrolling back
Close-based breakout confirmation with a prior-bar check is more conservative than most pivot S/R scripts, which often fire on any penetration regardless of close location
The self-cleaning design — lines disappear when breached and oldest lines drop when the cap is hit — makes the chart readable across all timeframes without manual cleanup
How to Use
Add to any chart; the indicator overlays directly on price with no separate pane
Adjust "Pivot Lookback" to match your timeframe — higher values (20–30) on daily charts identify major structure; lower values (5–10) on intraday charts capture faster swings
Red dashed lines are active resistance levels; green dashed lines are active support levels
A blue "B" label above a bar signals a bullish breakout through resistance; an orange "B" below signals a bearish breakdown through support
If the chart becomes crowded, lower "Max Active Lines" to keep only the most recent unbroken levels visible
Customization
Pivot Lookback (default: 15) — Controls how many bars on each side must be lower/higher to confirm a pivot. Increasing this confirms stronger, less frequent levels; decreasing it produces more levels with earlier detection but more sensitivity to minor swings.
Highlight Breakouts (default: on) — Toggles the breakout labels. Turn off if you only want the S/R lines without annotation.
Max Active Lines (default: 15) — Caps the number of lines per side. On instruments with very dense swing structure or long histories, reducing this to 8–10 keeps the chart uncluttered.
Line and Label Colors — Four separate color inputs for resistance lines, support lines, bullish breakout labels, and bearish breakout labels. Adjust to match your chart theme.
Conclusion
Apex Pivot & S/R Dynamics automates the manual process of marking swing highs and lows, extending them forward, and cleaning them up when they are no longer valid. The close-based breakout filter and automatic array management mean the chart reflects current market structure rather than accumulated history. Traders focused on price action and structural levels — particularly those who trade retests and breakout continuations — will find this a practical alternative to manually drawn S/R zones.
指标

Vesper Structure Ledger [JOAT]Vesper Structure Ledger
Introduction
Vesper Structure Ledger is an open-source market structure indicator built around KAMA trend context, pivot-based BOS and CHoCH events, liquidity sweeps, equal high/low probes, premium/discount zones, demand/supply boxes, right-side structural rails, managed signal boxes, and a top-right dashboard.
The script is intended to make structure easier to read without relying on arrows or cluttered labels. It distinguishes continuation structure from potential character shifts, then adds trend, impulse, volume, and higher-timeframe context before qualifying stronger events.
Core Concepts
1. KAMA Trend Core
The KAMA engine uses an efficiency ratio to adapt smoothing. When price moves efficiently, the trend line responds faster. In noisy conditions, it slows down and reduces whipsaw sensitivity.
2. Pivot Structure Memory
Confirmed pivot highs and lows are stored as structural references. These levels become the next possible break points for BOS or CHoCH events.
// Conceptual summary
// pivot high and pivot low become current structure rails
// confirmed closes through those rails create BOS or CHoCH events
3. BOS vs CHoCH
A Break of Structure confirms continuation in the current structural direction. A Change of Character marks a break against that direction and can signal a potential shift. Vesper also tracks BOS counts before allowing some character changes to carry more weight.
4. Sweeps and Equal Levels
Liquidity sweeps occur when price probes beyond a swing level and closes back through it. Equal high and equal low probes mark nearby repeated liquidity levels.
5. Demand/Supply and Managed Structure Map
Confirmed qualified signals can create demand or supply zones and a managed visual box with entry, invalidation, and target levels. These levels are for context and planning only.
Features
Adaptive KAMA trend line: Efficiency-ratio smoothing for trend context
BOS and CHoCH logic: Separates continuation breaks from possible character shifts
BOS-count gating: Adds context before stronger reversal interpretation
Liquidity sweeps: Detects confirmed wick-and-reclaim events around swing levels
Equal high/low probes: Marks repeated nearby liquidity levels
Premium/discount fill: Shows position inside the recent structure range
Demand and supply boxes: Projects reaction zones from qualified structure
Right-side rails: Labels KAMA, swing high, swing low, and equilibrium
Managed signal box: Displays entry, invalidation, and target levels
Top-right dashboard: Shows trend, KAMA, slope, structure, BOS count, sweep, equal level, context, impulse, targets, and state
Input Parameters
Trend Core:
KAMA Length
Fast Period
Slow Period
Source
Structure Core:
Pivot Left and Pivot Right
Structure Objects
Show BOS
Show CHoCH
Show Target Lines
Liquidity Core:
Show Liquidity Sweeps
Sweep Lookback
Sweep Buffer ATR
Show Equal Levels
How to Use This Indicator
Step 1: Read trend context
Use KAMA and the dashboard trend row to understand whether price is above or below the adaptive trend.
Step 2: Watch BOS and CHoCH
BOS events suggest continuation. CHoCH events warn that character may be changing.
Step 3: Mark liquidity
Sweeps and equal-level probes identify areas where price has tested or reclaimed liquidity.
Step 4: Use zones as references
Demand/supply boxes and right-side rails help frame current structure. They are not automatic entries.
Indicator Limitations
Pivot-based structure confirms after the right-side pivot window completes
CHoCH events can fail in strong continuation markets
Sweeps require confirmed closes and may appear after the wick forms
Zone boxes are contextual references, not assurances of support or resistance
Originality Statement
Vesper Structure Ledger combines adaptive KAMA trend state, pivot structure, BOS/CHoCH classification, BOS-count context, sweep logic, equal-level probes, premium/discount mapping, projected demand/supply boxes, and managed structure rails in one open-source Pine v6 tool. The purpose is to create a cohesive structure ledger, not a collection of unrelated labels.
Disclaimer
This script is for educational and informational use only. It is not financial advice and does not predict future market behavior. Always use independent analysis and risk management.
-Made with passion by jackofalltrades
指标

Trend Energy Divergence [JOAT]Trend Energy Divergence
Introduction
TED Trend Energy Divergence is an open-source oscillator that measures trend energy from EMA spread, linear-regression slope, projected support/resistance pressure, confirmed structure, and pivot divergence.
The indicator is built for trend-quality context. It shows whether the current move has internal energy, whether structure agrees with that energy, and whether confirmed divergence is appearing against it.
Core Concepts
1. Normalized EMA Spread
Fast and slow EMA spread is normalized by ATR so the oscillator adapts across symbols and timeframes.
2. Slope Pressure
Linear-regression slope contributes directional pressure to the energy model.
3. Projected Support and Resistance
Confirmed pivots build simple projected support and resistance references. Closing beyond those projections adds break pressure.
4. Confirmed Divergence
Pivot highs and lows are compared with oscillator values at the pivot offset to identify bullish or bearish divergence.
5. Energy Signal Line
Trend energy is smoothed and compared with a signal line to show positive or negative shifts.
Features
ATR-normalized energy: Adapts the oscillator to volatility
EMA and slope model: Blends trend spread and regression pressure
Structure-aware pressure: Adds support/resistance break pressure
Confirmed divergence: Uses confirmed pivots and offset oscillator values
Regime dashboard: Shows trend, expansion, or balance context
Projected levels: Displays pane-level support and resistance projections
Alerts: Includes bull shift, bear shift, and divergence confirmations
Input Parameters
Trend Engine:
Fast EMA
Slow EMA
Signal Smoothing
Energy Smoothing
ATR Length
Slope Length
Structure:
Pivot Left and Pivot Right
Structure Lookback
ADX/DMI Trend Threshold
How to Use
Step 1: Read the oscillator relative to the zero line and signal line.
Step 2: Treat upper/lower confirmation bands as higher-conviction energy zones.
Step 3: Watch divergence states as early warnings that the current move may be losing quality.
Step 4: Use the dashboard to confirm whether the environment is Trend, Expansion, or Balance.
Limitations
Divergence confirms after pivots confirm, so it is intentionally delayed
Oscillators can remain extended during strong trends
Projected support/resistance is model-based, not a guaranteed reaction point
The indicator is not a complete trade management system
Originality Statement
TED is an original JOAT oscillator combining ATR-normalized trend spread, slope, projected structure pressure, and confirmed divergence into one Pine Script v6 energy model.
Disclaimer
This script is for educational and informational purposes only. It is not financial advice and does not guarantee future results. Trading involves risk, and users should apply their own risk management.
Made with passion by jackofalltrades
指标

Structure Delivery Radar [JOAT]Structure Delivery Radar
Introduction
SDR Structure Delivery Radar is an open-source market structure overlay that classifies short-term, intermediate-term, and long-term delivery using confirmed pivots, break events, sweep events, session position, and ATR compression.
The indicator is designed as a structural context layer. It does not try to predict every candle. Instead, it tracks whether price is delivering through meaningful structure levels and whether multiple structure tiers are aligned.
Core Concepts
1. Three-Tier Structure
The script tracks ST, IT, and LT swing highs and lows from confirmed pivots. Each tier keeps its own bias state.
2. Confirmed Breaks
A bullish break requires a confirmed close above the tracked swing high. A bearish break requires a confirmed close below the tracked swing low.
3. Sweep Detection
The script recognizes when price trades beyond a swing level but closes back through it, marking potential liquidity behavior without using future bars.
4. Delivery Score
The dashboard score blends structure alignment, break activity, sweep activity, session location, and ATR compression into a 0-100 reading.
5. Clean Structure Cloud
The visual output uses transparent clouds and dashboard states rather than cluttered arrows or excessive labels.
Features
ST/IT/LT structure tracking: Three independent confirmed-pivot layers
Break and sweep logic: Official events require confirmed bars
Delivery score: Quantifies structure alignment and current delivery state
Session cloud: Adds session range context
Structure cloud: Shades the active upper/lower structure region
Top-right dashboard: Shows tier bias, events, ranges, compression, ATR, and signal state
Alerts: Includes bullish and bearish delivery confirmations
Input Parameters
Structure:
ST Pivot Length
IT Pivot Length
LT Pivot Length
ATR Length
Session and Visuals:
Use Session Window
Show Session Cloud
Show Structure Cloud
Show Bias Tint
Cloud and background transparency
How to Use
Step 1: Check whether the dashboard shows BULL, BEAR, or NEUT for the dominant structure state.
Step 2: Read the delivery score. Higher scores indicate stronger alignment across the internal model.
Step 3: Treat sweep events as context for failed breaks or liquidity reactions.
Step 4: Use the structure cloud as a map of active structural boundaries.
Limitations
Pivot-based structure confirms after the pivot length has passed
The score is a context reading, not a guarantee of trade outcome
Compressed markets can delay structure continuation
The script should be combined with risk management and execution rules
Originality Statement
SDR is an original JOAT implementation combining multi-tier confirmed structure, sweep recognition, session context, ATR compression, and a delivery score into one Pine Script v6 overlay.
Disclaimer
This script is for educational and informational purposes only. It is not financial advice and does not guarantee future results. Trading involves risk, and users should apply their own risk management.
Made with passion by jackofalltrades
指标

Structure Probability Blocks [JOAT]Structure Probability Blocks
Introduction
Structure Probability Blocks is an open-source market structure and quality-zone overlay. It detects confirmed structure breaks, searches for the most relevant opposing candle, scores the resulting block, and highlights the strongest active block without filling the chart with redundant zones.
The problem it solves is order block clutter. Many zone tools draw every candidate equally. Structure Probability Blocks filters for impulse, candle quality, relative volume, recency, and overlap so the displayed blocks have cleaner context. The enhanced chart layer also projects BOS/CHoCH break rails, impulse guide lines, and compact score labels directly beside the structure event.
Core Concepts
1. Confirmed Pivot Tracking
Swing highs and lows are confirmed using symmetric pivots. Because pivots require bars on both sides, this is intentionally delayed and non-repainting.
2. Break Qualification
A structure break requires price to close through the tracked pivot and meet a minimum ATR-based impulse requirement.
3. Seed Candle Search
After a break, the script searches backward for the best opposing candle candidate. The score considers body quality, wick behavior, volume rank, and recency.
4. Strongest Active Block Highlight
Among active blocks, the highest-scored block receives stronger border and midline treatment. Weaker overlapping blocks can be removed when the overlap guard is enabled.
5. Break Rails and Impulse Guides
When a qualified BOS or CHoCH forms, the indicator can draw a dashed horizontal break rail from the pivot level to the right edge and a dotted impulse guide from the selected seed candle to the break close. The on-chart tag includes score, zone range, drive, RVOL, and break price.
6. Strongest Block Ribbon
The highest-scored active block is also projected as a subtle ribbon using plot/fill logic. This gives a clean strongest-zone read even when several historical boxes remain visible.
Features
Confirmed structure breaks: Breaks require closed-bar confirmation
Quality-scored blocks: Scores combine impulse, candle structure, relative volume, and recency
BOS/CHoCH context: Block labels identify continuation or character-shift context
BOS/CHoCH break rails: Dashed projected levels mark the exact pivot level that price broke
Impulse guide lines: Dotted guides connect the seed candle to the break close
Expanded score tags: Labels show score, zone range, drive, RVOL, and break level
Prime block highlight: Highest active score receives stronger visual emphasis
Strongest block ribbon: Highest active zone is projected as a lightweight filled band
Overlap guard: Keeps the stronger of overlapping active blocks
Prime candle tint: Candles can be softly colored by the strongest active structure bias
Broken block handling: Keep, fade, extend, or remove resolved blocks
Top-right dashboard: Active count, bull/bear count, best score, break state, last pulse, volume rank, and break mode
Alerts: New bullish and bearish quality block events
Input Parameters
Structure:
Pivot Length: Swing confirmation sensitivity
Search Span: Bars searched for a seed candle
Break Impulse: Minimum ATR expansion required for a break
Volume Span: Lookback used for volume rank
Min Score: Minimum block quality score required
How to Use This Indicator
Step 1: Use the dashboard to identify current bull/bear structural bias.
Step 2: Focus on the strongest highlighted active block first.
Step 3: Use the dashed BOS/CHoCH rail as the exact structural break reference.
Step 4: Treat broken/faded blocks as resolved context rather than fresh opportunities.
Step 5: Combine with a regime or pressure tool before making directional decisions.
Indicator Limitations
Pivot confirmation is delayed by the pivot length, which is intentional non-repainting behavior
A high block score does not imply a guaranteed reaction
Volume rank can be less useful on instruments with unreliable volume
The script identifies structural context, not complete risk-defined trades
Originality Statement
Structure Probability Blocks is original in its quality-scored seed selection, impulse qualification, overlap prioritization, prime block highlighting, and compact structural dashboard. It does not copy third-party source code.
Disclaimer
This open-source indicator is provided for educational and informational purposes only. It is not financial advice. Structural zones can fail, and traders should always use independent analysis and proper risk management.
-Made with passion by jackofalltrades
指标
