TraderLifestyle Structure Pro - Mechanical SMC EngineTL STRUCTURE PRO — Mechanical Smart Money Concepts (SMC) Engine: Market Structure, BOS/CHoCH, Liquidity Sweeps, Supply & Demand POI, FVG, Sessions, Signals & Webhook Automation
WHAT THIS INDICATOR DOES
TL Structure Pro turns a complete, fully mechanical Smart Money Concepts (SMC) trading model into one indicator. It automates the exact rule set many price-action traders apply manually: market structure mapping (HH/HL/LL/LH), Break of Structure (BOS), Change of Character (CHoCH), liquidity sweeps, supply and demand points of interest (POI), fair value gaps (FVG/imbalance), session timing (Asia / Frankfurt / London), a two-step entry model with internal realignment, and rule-based trade management with break-even logic — all with zero discretion and zero repainting (the engine only works on confirmed/closed candles).
Every element is drawn and labeled directly on the chart, so you can SEE why each signal happened: every zone is named, every structure point is tagged, and every BUY/SELL label explains its own reason.
THE MECHANICAL RULE SET (HOW IT THINKS)
1. BREAK & CLOSE RULE — A swing high/low only counts as broken when a candle BREAKS AND CLOSES beyond it. A wick through the level without a close is NOT a break.
2. LIQUIDATION ($) — If price wicks beyond a swing but fails to close beyond it, the indicator prints a "$" marker: that was a liquidity sweep / liquidity grab, not a break. These sweeps often precede reversals.
3. PULLBACK RULE — A new swing high/low is only confirmed after a valid pullback: N opposing candles in a row (default 3) with successive closes. No valid pullback = no new structure point; the move is just internal noise.
4. BOS — Break of Structure in the direction of the trend = continuation. Drawn as a gold dashed line with a BOS label.
5. CHoCH — Break & close AGAINST the current direction = Change of Character. Bias flips (bullish <-> bearish). Drawn in pink. After a bearish CHoCH the engine only looks for shorts; after a bullish CHoCH only longs.
6. POI ZONES — On every qualifying break the engine stores two zones: the DECISIONAL candle (last opposing candle before the breaking impulse) and, on CHoCH, the ORIGIN (last opposing candle at the origin of the impulse). Zones are drawn as labeled supply/demand boxes, extended in time, marked as "tapped" on first touch and deleted when invalidated by a close beyond them.
7. FVG / GAPS — Three-candle imbalances above a minimum size are boxed and removed once filled ("gaps get filled").
8. SESSIONS — Asian session, Frankfurt open and the London trade window are boxed with configurable times and timezone (defaults follow GMT+4 / Dubai time as in the original model: London window 11:00–14:00).
THE ENTRY MODEL (WHEN A SIGNAL FIRES)
A signal needs three conditions in sequence — the same checklist is shown live in the cockpit panel:
Step 1 — BIAS: structure must be clearly bullish or bearish (after BOS/CHoCH).
Step 2 — POI TAP: price returns INTO a supply zone (bearish bias) or demand zone (bullish bias) or a matching FVG. The setup is now "armed".
Step 3 — INTERNAL SHIFT (REALIGNMENT): inside the POI, the smaller internal structure (pivot-based, the "lower timeframe inside your chart") must shift in trade direction — a close beyond the last internal pivot. Only then a BUY/SELL label prints.
Risk placement is automatic and printed on the chart:
• ENTRY = close of the trigger candle
• STOP LOSS = POI extreme + a pip buffer (default 3.5 pips — capital preservation first)
• TAKE PROFIT = the weak swing low/high of the current range (structure target)
• R multiple of the setup is calculated and shown on the signal label
• BREAK-EVEN: once the trade runs the configured R distance (default 1R), the panel/alert moves the stop logic to break-even; TP hit, SL hit and BE exit are all labeled on the chart.
THE COCKPIT PANEL
The side panel shows: current bias, the live SMC checklist (structure / pullback / liquidity sweep / POI tap / entry shift / management) with OK-status per rule, active session window, structure timeframe and internal pivot length, SL buffer, current position with entry/SL/TP, the last signal with its R multiple, and a counter of active supply/demand/FVG zones. If a checklist row shows "‥" you immediately know which condition is still missing before the next signal can fire.
HOW TO USE IT — STEP BY STEP
1. Add the indicator to a clean chart. Recommended: liquid FX pairs (GBPUSD, EURUSD), gold (XAUUSD) or indices, timeframes M5–H1 for the session-based model (M15 is the classic choice). It works on any symbol/timeframe; sessions display on intraday charts up to 1h.
2. Set your timezone and session times in group ④ if you do not trade the default GMT+4 windows. Enable "Signals ONLY inside London window" if you want to trade the London session model strictly.
3. Read the structure first: follow the SWING HIGH / SWING LOW lines, the HH/HL/LH/LL tags and the BOS/CHoCH lines until you understand the current bias (also shown in the panel).
4. Watch the zones: price returning into a labeled SUPPLY/DEMAND (DECISIONAL/ORIGIN) box or FVG arms the setup — the panel switches to "ARMED (POI tapped)".
5. Wait for the printed BUY/SELL label — never front-run it. The label shows the R multiple and the reason (POI TAP + SHIFT); the tooltip lists entry, stop and target.
6. Manage by the printed levels: entry line (gold), SL line (pink, includes the pip buffer), TP line (mint, the weak swing). BE marker prints when break-even logic activates.
7. Tune mechanically, not emotionally: "Pullback rule candles" (2–5) controls how strict new structure confirmation is; "Internal pivot length" controls how fine the entry trigger is (smaller = earlier, noisier); "Min gap size" filters small FVGs; "Max zones" limits chart clutter.
8. Hover anything: every label, zone and marker has an explanatory tooltip, so the chart teaches the model while you trade it.
ALERTS & WEBHOOK AUTOMATION
Create ONE alert with condition "Any alert() function call" and paste your webhook URL — the indicator sends ready-to-parse JSON for every event:
{"id":"TL-STRUCTURE-PRO","symbol":"GBPUSD","action":"SELL","price":1.27201,"sl":1.27236,"tp":1.26350,"rr":"24.30","tf":"15","time":"2026-07-18 12:45"}
Actions: BUY, SELL, BREAK_EVEN, TP_HIT, SL_HIT, plus optional BOS_UP/BOS_DOWN/CHOCH_UP/CHOCH_DOWN. This makes the indicator plug-and-play with trade-automation bridges, bots and journaling tools. Classic alertconditions (BUY/SELL/BOS/CHoCH) are also available for simple popup/app notifications.
NON-REPAINT BEHAVIOUR
All structure logic, zones and signals are computed on CONFIRMED candles only (barstate.isconfirmed). Once printed, BOS/CHoCH lines, zones and signal labels do not repaint. Alerts fire on bar close.
NOTES
• The R multiples shown are the structural setup quality, not a performance promise. Nothing here is financial advice — backtest and forward-test before risking money.
• The panel is a table: if your main chart series is set above indicators, use right-click on the indicator legend -> Visual order -> Bring to front.
• Best visual experience with the dark TradingView theme (the indicator brings its own navy chart theme, mint/red candles and paints the future margin).
Concepts covered: Smart Money Concepts, SMC, ICT-style market structure, break of structure, change of character, liquidity sweep, liquidity grab, stop hunt, supply and demand zones, order block style POIs, decisional candle, origin, fair value gap, imbalance, premium discount, London session, killzone, session trading, scalping, day trading, price action, forex, gold, indices, webhook automation, algo bridge.
インジケーター

Smart Structure Mapper [StrixEDGE]Overview
AetherZone is a market structure analysis toolkit that maps the internal architecture of price action in real time. It identifies swing points, tracks structural shifts (BOS & CHoCH), detects order blocks (supply and demand zones), and highlights fair value gaps — consolidating the core framework of institutional price analysis into a single, self-managing overlay.
What This Indicator Does
AetherZone operates through five interconnected analytical layers:
Swing Detection Engine
Identifies confirmed pivot highs and pivot lows using a configurable lookback window. Each swing point is labeled directly on the chart as "Swing High" or "Swing Low" in clean, neutral text. Pivots are confirmed after the required bars have closed on both sides, ensuring the indicator does not repaint or revise historical swing points. Each swing is classified relative to its predecessor as a Higher High (HH), Lower High (LH), Higher Low (HL), or Lower Low (LL).
Market Structure Tracker
Continuously evaluates the relationship between consecutive swing highs and swing lows to determine the prevailing market structure:
- Bullish Structure — Higher Highs + Higher Lows (HH/HL)
- Bearish Structure — Lower Highs + Lower Lows (LH/LL)
- Ranging — Mixed signals or insufficient structural data
BOS & CHoCH Detection
AetherZone uses a flag-based detection system to identify structural breaks. When a new swing point is confirmed, its level becomes active. The first bar where price closes beyond that level triggers the event:
- BOS ↑ / BOS ↓ (Break of Structure) — Price breaks a swing level in the direction of the prevailing trend, confirming continuation. Labeled with directional arrows on the chart.
- CHoCH ↑ / CHoCH ↓ (Change of Character) — Price breaks a swing level against the prevailing trend, signaling a potential reversal. Displayed with a more prominent label and color to draw attention to the structural shift.
A dashed level line is drawn at the broken swing point for visual reference.
Order Block Detection
AetherZone identifies potential institutional interest zones through two configurable modes:
"All Swings" mode (default): An Order Block is created at every confirmed swing point, providing comprehensive zone coverage. On each confirmed pivot low, the last bearish candle near that swing becomes a Demand zone. On each confirmed pivot high, the last bullish candle near that swing becomes a Supply zone.
Bullish OB
"BOS/CHoCH Only" mode: Order Blocks are created only when a structural break occurs, providing fewer but potentially higher-conviction zones.
Fair Value Gap (FVG) Detection
- BULL FVG — Current candle's low is above the candle-two-bars-ago's high (gap up)
- BEAR FVG — Current candle's high is below the candle-two-bars-ago's low (gap down)
FVGs are filtered by a minimum size threshold (percentage of ATR) to eliminate insignificant gaps, and are automatically removed when filled by subsequent price action or when they exceed their maximum age.
Inputs & Customization
Structure
- Show BOS / Show CHoCH — Independent visibility toggles for each structural event type.
Order Blocks
- OB Source — "All Swings" (OB at every pivot, more zones) or "BOS/CHoCH Only" (fewer, higher-conviction zones). Default: All Swings.
- Max OB Age — Bars before an OB is removed due to aging. Default: 120.
- Mitigation Grace — Bars after creation during which an OB cannot be mitigated. Default: 10.
- Max Active OBs — Limits simultaneously displayed OBs per side. Default: 6.
Fair Value Gaps
- Max FVG Age — Bars before an unfilled FVG is removed. Default: 50.
- Min FVG Size (% of ATR) — Minimum gap size to qualify. Default: 10%.
- Max Active FVGs — Limits simultaneously displayed FVGs per side. Default: 5. インジケーター

TREND RIBBONtrend filter ribbon
trend filter ribbon is a market structure and trend filtering tool designed to help traders read the active direction of price with a clean ema ribbon, external structure logic, internal entry markers, htf bias filtering, and a compact live dashboard.
the tool is built to answer one simple question:
is the market bullish, bearish, or neutral?
it does not try to predict every candle. it filters the chart so the trader can avoid low-quality counter-trend decisions and focus on cleaner directional setups.
what the indicator does
the indicator combines several elements:
ema ribbon:
a multi-layer ema ribbon shows the current trend body. when the ribbon expands, the trend is stronger. when it compresses, the market is weaker or flatter.
external structure:
major swing highs and swing lows define the main market structure. when price breaks a major level, the script detects bos or choch depending on the current structure state.
internal structure:
smaller swing breaks are used as early entry markers, but only when they agree with the active master trend.
htf veto:
a higher timeframe ema filter can block counter-trend conditions. when the lower timeframe disagrees with the selected htf direction, the master trend can be held as neutral.
live structure levels:
the most important active high and low levels are drawn on the chart so the trader can see where the next structural decision may happen.
dashboard:
a compact institutional-style panel displays external trend, htf bias, master state, ribbon spread, active levels, and early long or short validity.
how to read the ribbon
bullish ribbon:
when the ribbon is bullish, the tool is showing that the active structure and trend conditions favor long setups.
bearish ribbon:
when the ribbon is bearish, the tool is showing that the active structure and trend conditions favor short setups.
neutral ribbon:
when the ribbon is neutral, the market is not clean enough or the htf filter is blocking the active direction. beginners should usually avoid trading during neutral conditions.
ribbon spread:
the ribbon spread measures the distance between the fastest and slowest ribbon ema, normalized by atr.
flat:
the ribbon is compressed. the market may be ranging or weak.
building:
the ribbon is expanding. trend strength is improving.
strong:
the ribbon is clearly expanded. the current direction has stronger momentum.
bos and choch
bos means break of structure.
a bullish bos appears when price continues higher by breaking a valid structural high during a bullish structure.
a bearish bos appears when price continues lower by breaking a valid structural low during a bearish structure.
choch means change of character.
a bullish choch appears when price breaks structure upward after a bearish phase.
a bearish choch appears when price breaks structure downward after a bullish phase.
for beginners:
bos usually means continuation.
choch usually means possible reversal.
how to use the indicator
step 1: check the master trend
start with the dashboard.
if master is bullish, focus only on long ideas.
if master is bearish, focus only on short ideas.
if master is neutral, wait.
step 2: check the htf bias
the htf line shows whether the selected higher timeframe is bullish or bearish.
when the htf agrees with the master trend, the condition is cleaner.
when the htf disagrees, the tool can hold the master trend in neutral mode.
step 3: check the ribbon spread
flat ribbon:
avoid aggressive entries.
building ribbon:
look for confirmation.
strong ribbon:
trend conditions are more active.
step 4: wait for structure
a bos can confirm continuation.
a choch can show that the previous direction may be changing.
beginners should not enter only because a label appears. the label should be combined with context, trend direction, support and resistance, and risk management.
step 5: use internal entry markers
internal entry markers are early signals that appear only in the direction of the active filtered trend.
a long marker is only valid when the master trend is bullish.
a short marker is only valid when the master trend is bearish.
beginner example
example long setup:
1. master trend is bullish
2. htf bias is bullish
3. ribbon spread is building or strong
4. price breaks structure upward
5. a long entry marker appears
6. trader looks for a logical stop below the recent swing low
7. trader targets the next resistance, previous high, or a fixed risk/reward level
example short setup:
1. master trend is bearish
2. htf bias is bearish
3. ribbon spread is building or strong
4. price breaks structure downward
5. a short entry marker appears
6. trader looks for a logical stop above the recent swing high
7. trader targets the next support, previous low, or a fixed risk/reward level
main inputs
external swing strength:
controls the strength of the major swing structure. higher values create fewer but stronger structure signals. lower values create more responsive signals.
internal swing strength:
controls the smaller internal structure used for early entry markers. lower values are faster. higher values are cleaner but slower.
break confirmation:
choose whether structure breaks are confirmed by close or wick.
close:
more conservative.
wick:
more reactive.
bos pivot strength:
controls the pivot sensitivity used for bos continuation levels.
choch pivot strength:
controls the pivot sensitivity used for choch reversal levels.
htf timeframe:
selects the higher timeframe used for directional filtering.
htf ema length:
controls the ema used for the higher timeframe bias.
base ema length:
sets the first ema in the ribbon.
ema step:
controls the spacing between each ema in the ribbon.
ribbon lines:
turns the ribbon lines on or off.
ribbon fill:
turns the fill between ribbon layers on or off.
core glow:
adds a stronger visual emphasis to the main ribbon line.
external structure labels:
shows or hides bos and choch labels.
internal entry markers:
shows or hides early long and short markers.
live structure levels:
shows or hides the active major structure levels.
background tint:
adds a light background color based on the current master trend.
dashboard:
shows or hides the live panel.
dashboard position:
lets the trader place the panel in any chart position.
alerts
the script includes alerts for:
bullish choch
bearish choch
bullish bos
bearish bos
long entry
short entry
for best results, create alerts after the indicator is added to the chart and select the alert condition that matches your trading plan.
beginner tips
do not trade every signal.
use the indicator as a filter, not as a complete trading system.
avoid trading when the dashboard shows neutral.
avoid trading when the ribbon spread is flat.
look for agreement between master trend and htf bias.
always define stop loss, target, and invalidation before entering.
combine the tool with support and resistance, liquidity levels, volume, session context, or higher timeframe analysis.
important notes
this indicator is designed for market analysis and trend filtering.
it does not guarantee profitable trades.
signals can fail during news, low liquidity, sideways markets, or high volatility conditions.
risk management remains the responsibility of the trader.
the best use of this tool is to filter direction, read structure, and avoid trading against the dominant trend.
インジケーター

ApexSignalPro SMC [ForexCracked]🔵 OVERVIEW
ApexSignalPro SMC is a confluence-scored Smart Money Concepts indicator that fires a signal only when multiple institutional footprints align on the same bar. Every signal carries a live score from 0 to 5 showing how many structural conditions agree — market structure, order blocks, fair value gaps, premium/discount location, and higher-timeframe bias.
Instead of the "every crossover is a signal" approach, it uses a strict confluence gate, a range-regime filter, and forced signal alternation — far fewer signals, much higher conviction. A live dashboard shows the score, active zones, and the last trade plan at a glance.
🔵 WHY THESE COMPONENTS ARE COMBINED
A break of structure alone, an order-block touch alone, or a single fair value gap all fire often and fail often. They become far more reliable when they occur together and agree with the higher-timeframe trend. Rather than overlaying five separate tools and leaving you to judge them, this script quantifies their agreement into one 0–5 score and only trades when enough align. Three principles guide it:
• Direction comes from market structure (BOS / CHoCH), not from price crossing smoothed averages
• Entries require confluence, never a single condition
• Signals alternate (BUY → SELL → BUY), never stacking the same direction in one leg
🔵 THE FIVE SCORED FACTORS (1 point each)
1️⃣ Market structure (BOS / CHoCH) points in the signal direction
2️⃣ Price is inside an unmitigated order block
3️⃣ Price is inside an unmitigated fair value gap
4️⃣ Correct half of the range — discount for longs, premium for shorts
5️⃣ Higher-timeframe EMA bias agrees
🔵 HOW A SIGNAL FIRES A BUY or SELL prints only when ALL of these are true:
• The confluence score meets your minimum (default 3 of 5)
• A strong-bodied candle closes in that direction
• The ADX regime filter confirms trending, not ranging
• The signal is opposite the previous one (forced alternation) Each signal draws Entry, Stop (beyond the nearest order block + ATR buffer), and Take Profit (configurable R:R), with pip labels.
🔵 HOW IT READS THE MARKET
• Market structure — confirmed swing pivots; a close beyond the last pivot is a BOS, the first break against structure is a CHoCH that flips the state
• Order blocks — the last opposing candle before an impulsive displacement (body > 1.2× ATR); tracked until mitigated or aged out
• Fair value gaps — three-candle imbalances filtered by a minimum ATR size; removed when filled
• Premium / discount — the swing-range midpoint splits discount (below) from premium (above) • Regime — ADX must exceed your minimum, suppressing signals in flat ranges
🔵 HOW TO USE
• Favour score 4–5 signals; treat score 3 with extra confirmation
• Require the dashboard HTF bias to match the signal for trend-aligned entries
• Use retests of unmitigated OBs or FVGs in the trend direction as continuation entries
• Size each trade off the drawn stop distance at a fixed account risk
• Raise Min Confluences to 4 for fewer, stronger signals
🔵 RECOMMENDED SETTINGS
• Swing Length: 5
• Higher Timeframe: 240 (H4) on H1 charts, D on H4 charts
• HTF EMA: 50 · OB Max Age: 20 · FVG Min Size: 0.3× ATR
• ADX Min: 22 · Min Confluences: 3 · SL Buffer: 0.5× ATR · R:R: 2.0
🔵 BEST / WEAKEST CONDITIONS ✅ Trending majors, gold, and indices on H1–H4; London / New York overlap ⚠️ Low-volatility ranges, gapped markets, and sub-5-minute noise
⚠️ DISCLAIMER ApexSignalPro SMC structures signals from Smart Money Concepts. It does not predict future price movement. Results depend on market conditions, settings, and your own execution and risk management. Shared for educational and research purposes; not financial advice. インジケーター

Market Structure + CHoCH/MSS/BOS | Xcelerate TradeMarket Structure + CHoCH / MSS / BOS | Xcelerate Trade
A precise market-structure mapper from the Xcelerate Trade team. It auto-detects swing highs / lows, classifies every break of structure as CHoCH (Change of Character), MSS (Market Structure Shift) or BOS (Break of Structure), and labels each pivot as HH / HL / LH / LL. Designed for SMC and price-action traders who want a clean, repaint-aware structural read of the chart.
What you get on the chart
Swing labels: HH (Higher High), HL (Higher Low), LH (Lower High), LL (Lower Low) — auto-placed on every detected pivot.
Break lines: every confirmed break is drawn as a horizontal segment from the swing bar to the breaking bar.
Break tags: each break line gets a label — CHoCH, MSS or BOS — so you can read structure at a glance.
Info table (top-right): current settings (Auto / Manual, TF, L/R, detection method, MSS definition, break validation) and an optional debug panel with trend state, flags, pre-CHoCH levels, last-break details.
Pattern alerts: ready-to-use alertcondition for HH-HL-HH and LL-LH-LL sequences.
Pivot detection — two modes
Williams Fractals (default): classic ta.pivothigh / ta.pivotlow with separate left and right lengths. Configurable in Manual Settings (defaults L = 6, R = 4) or selected automatically per timeframe via Auto Timeframe Settings:
Timeframe L / R
1m
4 / 4
5m
4 / 3
15m
5 / 4
30m+, daily, weekly, monthly
6 / 4
Simple Fractals: SMC-style, symmetric — current bar is a pivot if it's the highest / lowest within simpleFractalPeriod bars on each side. Faster but more frequent than Williams.
You can also force Wait for bar close (default ON) to confirm pivots only on closed bars.
Break validation — 4 modes
Choose how a level is considered "broken":
Close — close beyond the swing level (cleanest, default).
High/Low (wick) — wick beyond the level (most aggressive).
Close beyond buffer (ticks) — close beyond level ± N × mintick.
Close beyond buffer (%) — close beyond level ± X%.
Buffer fields appear conditionally so you can tune the strictness of structure breaks per instrument (forex, indices, crypto, etc.).
Structure classification — CHoCH / MSS / BOS
Trend state is tracked internally (Bullish, Bearish, Neutral). Every confirmed break is then classified:
CHoCH — first break that reverses the trend (bullish CHoCH on a close above the last swing high while bearish; bearish CHoCH on a close below the last swing low while bullish), or the very first break when the trend is still neutral. CHoCH flips the trend and starts a fresh leg.
MSS — first qualifying break in the direction of the new trend after CHoCH, per the MSS definition setting:
First break after CHoCH — any first break in trend direction = MSS, then BOS.
First break >= pre-CHoCH level — MSS only when the broken swing is at or beyond the swing level that existed before the CHoCH. Stricter — protects against premature MSS calls.
HL + >= pre-CHoCH (legacy) — same as above, plus a confirming HL (bull) / LH (bear) is required after CHoCH before MSS can fire.
BOS — every subsequent break in the trend direction after MSS — until the opposite CHoCH occurs and the cycle restarts.
This rule set keeps only one MSS per trend leg, with everything before it being CHoCH and everything after being BOS — exactly how SMC traders read it.
Pre-CHoCH levels (transparent reasoning)
When CHoCH fires, the script captures the swing-high / swing-low that existed before the trend flip (pre_choch_swing_high / pre_choch_swing_low). These are used by the stricter MSS modes and shown in the debug rows of the info table, so you can verify exactly why a break was classified as MSS or BOS.
Last broken swing tracking
For every confirmed break the indicator stores:
lastBreakSwingBarIndex — the bar where the broken swing originally formed (its ID).
lastBreakSwingPrice — the level that was broken.
lastBreakClassification — CHoCH / MSS / BOS.
lastBreakDirection — above swing high / below swing low.
lastBreakDetectBarIndex — the bar where the break passed your validation filter.
These are visible in the debug rows when Show debug rows (table) is on — useful for forensic / journal-style review.
Drawing budget (FIFO)
The indicator caps the number of CHoCH / MSS / BOS line + label pairs at Max CHoCH/MSS/BOS lines + labels (default 400, max ~80% of TradingView's 500 limit). Older drawings are removed first (FIFO), so you never hit the line cap on long histories.
Alerts
Two ready-to-use alert conditions:
HH-HL-HH Alert — fires when an HH-HL-HH pattern completes.
LL-LH-LL Alert — fires when an LL-LH-LL pattern completes.
Use TradingView's alert dialog → choose the alert condition by name. Messages include {{ticker}} and {{interval}} placeholders.
Suggested settings (from the Xcelerate Trade team)
Default for most traders: Auto settings ON, Williams Fractals, Wait for bar close ON, Break validation = Close, MSS definition = First break after CHoCH.
Strict structural read (low noise): Break validation = Close beyond buffer (%) with 0.05–0.10%, MSS definition = First break >= pre-CHoCH level.
Aggressive / fast feedback: Simple Fractals with period 2, Break validation = High/Low (wick), Wait for bar close = OFF.
Forensic review: turn ON Show debug rows (table) to see trend state, CHoCH / MSS flags, pre-CHoCH levels and the last-break summary.
Notes & disclaimers
Williams Fractals confirm with a delay equal to the right-length (R bars). This is intentional — pivots are not repainted after confirmation.
Simple Fractals confirm with a delay equal to simpleFractalPeriod bars.
This is an analytical tool — no automated buy / sell labels. Pair with your own execution rules.
Pine Script v6.
Built and maintained by the Xcelerate Trade team. A complete CHoCH / MSS / BOS market-structure read with HH / HL / LH / LL labels, four break-validation modes, three MSS definition modes, an info / debug table and ready alert conditions. インジケーター

Adaptive Market Suite [Jayadev Rana]Overview
Adaptive Market Suite is a four-module analysis toolkit that draws on the price chart. Each module is independent: turn any of them on or off, and each has its own settings group. It shows context, not buy or sell arrows. The four modules are an adaptive trend, volatility bands, market structure with order blocks and fair-value gaps, and an order-flow oscillator. You read the confluence and make your own decisions.
Module 1 - Adaptive Trend and Regime
A moving average whose smoothing adapts to Kaufman's efficiency ratio: the net distance price travelled divided by the total path it took to get there. In clean trends the ratio is high and the average speeds up to hug price; in chop it is low and the average slows and flattens. The line is coloured by its slope, and the info panel reports whether the market is trending or ranging from the same ratio.
Module 2 - Expected-Move Bands
Volatility bands around the adaptive basis. Instead of a fixed multiple of range, the band width scales with where the current Average True Range sits in its own recent history (its percentile), so the bands contract in quiet conditions and expand when volatility rises. A nearer pair and a wider pair mark two envelopes.
Module 3 - Liquidity and Structure
Market structure from confirmed swing pivots, labelled as Break of Structure and Change of Character. Because the pivots are symmetric (confirmed on both sides), they are fixed before they are drawn and do not repaint afterward. On a structure break the tool marks the order block behind the move (the last opposite-direction candle before the push) and it tracks fair-value gaps, which are three-bar imbalances. Each zone follows a mitigation lifecycle: it is extended while it is live and greyed once price trades through it, and only the most recent zones per type are kept so the chart stays readable.
Module 4 - Order-Flow Oscillator
A normalised buy and sell pressure read in the indicator pane. For each bar it combines where price closed within the bar's range with how large that bar's volume was relative to its recent average. Sustained closes near the highs on strong volume push the oscillator positive; the mirror pushes it negative. An absorption marker highlights bars with heavy volume but a small range, where effort is not producing movement.
Info panel
An optional compact table summarises the current trend direction, the regime read, the volatility percentile, and the current order-flow side. It is context only.
Inputs
Inputs are grouped per module: General (ATR length); Module 1 (efficiency length, fast and slow smoothing, regime threshold, colours); Module 2 (volatility lookback, base and extra width, colour); Module 3 (swing length, order-block lookback, max zones per type, toggles for structure, order blocks and fair-value gaps, colours); Module 4 (pressure smoothing, absorption threshold, colours); plus an info-panel toggle. Every module has a single enable switch.
Alerts
Bullish and bearish structure break, and the order-flow oscillator crossing above or below zero.
How to use it
Treat it as a confluence map rather than a signal. For example, price reaching an order block near the lower band, with the order-flow oscillator turning up while the adaptive trend is still rising, is a stronger context than any one of those alone. Turn off the modules you do not need: if you only trade structure, disable the other three groups for a clean map. It is intended for liquid instruments and works across timeframes; the demonstration chart is Gold on the 1-hour timeframe.
Limitations
The structure module confirms swings with bars on both sides, so its labels and order blocks appear a fixed number of bars after the pivot forms. That delay is the trade-off that keeps them from repainting. The bands, the oscillator and the info panel read the current bar and update as it forms, like any live calculation. This is an analysis tool, not a strategy: it places no orders, makes no performance claim, and there is no win rate because it does not promise trades.
Disclaimer
For education and research only. This is not financial advice, and past chart behaviour does not predict future results. Test any approach yourself and manage your own risk. インジケーター

SMC Structures and FVG [Produced by Wanfeng]中文简介
SMC 结构综合指标 | FVG 公允价值缺口 + BOS/CHoCH 结构突破 + 趋势防守位 + 区间比例线
指标核心功能
FVG 公允价值缺口
自动识别传统 3 根 K 线标准供需缺口,区分看涨 / 看跌缺口;价格触碰缺口后自动变灰淡化,支持一键收缩被触碰区间,可自定义显示历史缺口数量;不适配跳空大缺口行情。
SMC 结构识别(BOS/CHoCH)
内置回溯周期算法自动判定市场结构:顺势突破 BOS、逆势转换 CHoCH;支持自定义线条颜色、线型、粗细,可限制图表留存历史突破标记数量。
假破待确认虚线
价格试探结构高低但未收盘突破时,自动绘制待确认虚线;区分普通顺势假破、防守位假破两种样式,直观分辨有效突破与诱多 / 诱空假破。
动态趋势防守位
跟随当前市场结构实时切换防守基准:上涨趋势以阶段低点为防守、下跌趋势以阶段高点为防守;出现防守位假破时自动切换至假破极值作为临时防守,加粗实线标注并附带文字标签。
区间比例分割线
基于当前完整结构区间自动计算自定义百分比分割线(默认 50% 中位线),同步适配假破后的区间重构;可显示百分比数值标签,辅助找订单流关键支撑阻力。
参数分组说明
公允价值缺口:控制 FVG 显示、配色、触碰收缩、历史数量
结构突破:结构回溯周期、BOS/CHoCH 线条、当前完整结构轮廓线、假破待确认线
防守位:防守实线配色粗细、防守位假破虚线开关与样式
结构比例线:自定义分割百分比、比例线样式、数值标签开关
使用提示
结构回溯 K 线参数为算法基准,不建议随意修改,修改会破坏防守位判定逻辑;
FVG 仅识别标准 3K 缺口,指数、外汇大幅跳空行情下缺口识别会失真;
突破触发自动警报,BOS 代表顺势延续、CHoCH 代表趋势反转信号;
所有线条、色块透明度、线型、线宽均可自由自定义适配个人图表风格。
English Introduction
SMC Market Structure All-in-One Toolkit | FVG + BOS & CHoCH Breakout + Dynamic Defense Level + Ratio Split Line
Core Features
Fair Value Gap (FVG)
Detect standard 3-bar institutional liquidity gaps (bullish & bearish). FVG boxes turn gray once mitigated, with optional shrink function for touched zones. Adjustable max historical FVG count. Not recommended for large gap/jump markets.
SMC Structure Detection (BOS / CHoCH)
Built-in lookback algorithm to identify institutional market structure: BOS (Break of Structure, trend continuation) & CHoCH (Change of Character, trend reversal). Fully customizable line color, style, width, and limited historical breakout markers to avoid chart clutter.
Pending Fake Breakout Dashed Line
Draw temporary pending lines when price tests swing high/low without close breakout. Separate styles for regular trend fakeouts and defense level fakeouts, easily distinguish valid breaks vs liquidity hunts.
Dynamic Trend Defense Level
Auto-switch defense baseline based on current market bias: swing low for uptrend, swing high for downtrend. Temporarily shift defense level to fakeout extreme when liquidity hunt occurs, with thick solid line and text label.
Range Ratio Split Line
Auto calculate user-defined percentage split level (default 50% midpoint) over active market range, compatible with post-fakeout restructured ranges. Optional percentage value label for key order flow support/resistance zones.
Input Groups
Fair Value Gap: Toggle FVG display, color palette, mitigate shrink, max historical boxes
Market Structure: Structure lookback period, BOS/CHoCH line settings, full swing structure outline, pending fake breakout lines
Defense Level: Solid defense line config, toggle & style for defense fakeout dashed lines
Range Ratio Line: Custom split percentage, ratio line appearance, value label switch
Important Notes
Structure lookback bar count is core algorithm parameter, DO NOT modify arbitrarily; wrong value breaks defense level calculation.
This FVG logic only works for standard 3-bar gaps; performance degrades on assets with massive overnight jumps/gaps.
Built-in alert triggers on confirmed breakouts: BOS = trend continuation signal, CHoCH = trend reversal signal.
Full customization of all line width, color transparency, dash/dot/solid styles to match your chart layout preference. インジケーター

インジケーター

Market Structure Mechanics - MSSThis script is an automated structural mapping tool designed to read price action through the strict lens of the ICT (Inner Circle Trader) algorithmic framework. It doesn't just mark every high and low; it intelligently categorizes how price interacts with structural levels to tell you whether the trend is continuing, reversing, or manipulating.
Here is a breakdown of how the script interprets market mechanics:
1. Trend Tracking & Pivot Identification
The script actively tracks the most recent swing high (sh) and swing low (sl) to determine the current trend (bullish or bearish). It uses a customizable pivot length (default 5 bars) to identify these structural turning points.
2. Break of Structure (BOS)
A BOS signals that the current trend is continuing.
If the trend is Bullish and a candle closes decisively above the active Swing High, the script draws a solid blue line and labels it BOS.
If the trend is Bearish and a candle closes decisively below the active Swing Low, it draws a solid red line labeled BOS.
3. Market Structure Shift (MSS) with Displacement
An MSS is a high-probability signal that the overall trend has reversed. However, the script is designed to filter out fake reversals by enforcing the Displacement Rule.
If the trend is Bullish, but price suddenly closes below the active Swing Low, the algorithm checks the recent down-move to see if a Bearish Fair Value Gap (FVG) was formed.
If an FVG is present, it means the move had massive institutional momentum (Displacement). It will draw a thick red line labeled MSS, and the trend will officially shift to bearish.
If it breaks the low but no FVG is found, the script flags it as a low-probability, invalid break (drawn as a dotted gray line).
4. Liquidity Sweeps (Stop Hunts)
This is where the script shines at reading manipulation.
If price pushes past a structural high or low to trigger retail stop losses, but the candle ultimately fails to close beyond the level (leaving a wick), the script immediately recognizes this as a stop hunt.
It will draw a dashed orange line and label it Sweep.
The script also features a built-in "Smart Label Merger", meaning if a level gets Swept and then Broken on the exact same candle, the labels will neatly combine (e.g., "Sweep, BOS") instead of creating a messy, overlapping clump of text on your chart. インジケーター

SMC Lite Pro [BOS + CHoCH + OB + FVGOverview
SMC Lite Pro [BOS + CHoCH + OB + FVG is a Smart Money Concepts (SMC) based trading indicator designed to help traders identify market structure shifts, liquidity movements, institutional order flow, and high-probability reaction zones directly on the chart.
This all-in-one tool combines Break of Structure (BOS), Change of Character (CHoCH), Order Blocks, Fair Value Gaps (FVG), and Liquidity Sweeps into a single clean and powerful trading system. It is built for traders who follow price action and institutional-style market behavior across Forex, Crypto, Indices, and Commodities.
Key Features
Market Structure Engine
* Swing Highs & Swing Lows detection
* Higher High / Lower Low structure mapping
* Real-time trend identification
🚀 BOS & CHoCH Detection
* Break of Structure (Bullish & Bearish)
* Change of Character (Trend reversal signals)
* Clean visual labels for structure shifts
🏦 Order Blocks (SMC Zones)
* Bullish Order Blocks (demand zones)
* Bearish Order Blocks (supply zones)
* Institutional entry zones based on displacement moves
⚡ Fair Value Gaps (FVG)
* Imbalance detection between candles
* Bullish and Bearish FVG zones
* Potential price retracement areas
💧 Liquidity Concepts
* Equal Highs / Equal Lows detection
* Liquidity sweep identification
* Smart money stop hunt zones
📈 Best Market Conditions
* Trending markets
* High volatility sessions (London & New York)
* Strong breakout environments
⏱ Recommended Timeframes
* 1M – 5M → Scalping (fast entries)
* 15M – 1H → Intraday trading (BEST performance)
* 4H – Daily → Swing trading (high accuracy setups)
🎯 How to Use
* Wait for BOS or CHoCH for directional bias
* Identify Order Blocks after structure shift
* Use FVG zones for pullback entries
* Confirm liquidity sweep before entry
* Trade in direction of market structure
⚠️ Disclaimer
This indicator is based on Smart Money Concepts and historical price action analysis. It does not guarantee profits. Trading involves risk, and users should apply proper risk management and confirmation before entering trades. インジケーター

Fractal Structure Indicator BOS CHoCH TGFXFractal Market Structure — BOS / CHoCH
OVERVIEW
This tool maps market structure automatically using fractal pivots. It detects swing and internal structure, labels each break as BOS (continuation) or CHoCH (change of character / reversal), tracks the current fractal high and low (FH / FL), highlights the premium and discount zones of the active range, and summarises higher-timeframe structure in a table.
THE CONCEPTS
- Fractal pivots: highs and lows are detected as Williams-style pivots (a high or low with N bars on each side). Two layers are available — swing structure (larger pivots) and internal structure (smaller pivots inside the swings).
- BOS (Break of Structure): price closes beyond the prior structural point in the direction of the trend — a continuation event.
- CHoCH (Change of Character): the first break against the prevailing structure — an early sign of a potential reversal.
- Current FH / FL: the most recent fractal high and low, where liquidity tends to rest.
- Premium / Discount: the active range is split at its 50% equilibrium. Above it is premium (relatively expensive); below it is discount (relatively cheap).
- Multi-timeframe table: shows the structural bias and the zone (premium / discount) of higher timeframes at a glance.
NON-REPAINTING
A fractal is only confirmed once N bars have closed on each side, so a pivot is fixed after confirmation and does not repaint. Structure breaks (BOS / CHoCH) are evaluated on bar close.
SETTINGS
- Swing fractal length and internal fractal length.
- Show / hide internal structure.
- Show current FH / FL lines and labels.
- Show BOS / CHoCH labels.
- Show premium / discount zones.
- Colors, line extension, and the multi-timeframe table (timeframes and position).
HOW TO READ IT
- Green = bullish structure, red = bearish structure.
- BOS suggests trend continuation; CHoCH warns of a possible reversal.
- Price reaching discount within a bullish bias, or premium within a bearish bias, is the classic context many traders use to look for entries in the direction of structure.
NOTES
This script is an original implementation of standard, public price-action concepts (fractal pivots, market structure, BOS / CHoCH, premium / discount, equilibrium). It is a visualization and context tool — it does not generate buy/sell signals and makes no claim about future performance. Best used together with your own analysis and risk management. インジケーター

RIFTS Tap & Break Sniper [NICK789]
RIFTS Tap & Break Sniper
The RIFTS Tap & Break Sniper indicator is built around one core price-action idea:
Price creates or leaves behind a reaction zone, later returns to tap or reject from that zone, and then confirms direction by printing a BOS or CHoCH.
RIFTS stands for:
**R** — Reaction Zones
**I** — Imbalance Gaps
**F** — Flip / Structure Confirmation
**T** — Tap & Break Logic
**S** — Sniper Scoring
Together, these describe the full process used by the script: price creates or leaves behind a zone, returns to tap or reject from it, then confirms direction through BOS or CHoCH before the setup is scored and plotted as a Sniper or Sniper+ signal.
The script is designed to help traders identify tap-and-break structures where a zone reaction and a market-structure break occur together. Instead of showing zones by themselves or structure breaks by themselves, RIFTS connects both steps into one workflow:
1. Price creates a Reaction Block or Imbalance Gap.
2. Price returns to tap the zone.
3. Price rejects from the zone.
4. Price confirms direction with BOS or CHoCH.
5. The script scores the setup and plots a Sniper or Sniper+ signal.
🔶 USAGE
RIFTS identifies two main zone types:
Reaction Blocks
Imbalance Gaps
A setup begins when price creates one of these zones. The script then watches for price to return to the zone and either tap or reject from it.
A bullish setup develops when price interacts with a bullish zone and then confirms upward movement through a bullish structure break.
A bearish setup develops when price interacts with a bearish zone and then confirms downward movement through a bearish structure break.
The signal is not based on the zone alone. The main purpose is to find moments where zone interaction and structure confirmation align.
🔹 Reaction Blocks
Reaction Blocks are candle-based zones created after price displaces away from the previous candle.
A bullish Reaction Block forms when a bullish candle closes above the previous candle’s high while the previous candle was bearish.
A bearish Reaction Block forms when a bearish candle closes below the previous candle’s low while the previous candle was bullish.
The script marks the previous candle range as the reaction area. This area becomes important if price later returns to it and reacts.
The Zone Candle Body % setting controls how strong the displacement candle must be before a Reaction Block is created. Higher values require stronger candle bodies and reduce weaker zones.
🔹 Imbalance Gaps
Imbalance Gaps are created when price moves quickly and leaves an untraded gap between the current candle and the candle two bars back.
A bullish Imbalance Gap forms when the current low is above the high from two candles ago.
A bearish Imbalance Gap forms when the current high is below the low from two candles ago.
These gaps represent fast price movement. If price later returns to the gap, the script monitors whether price reacts from that area and then breaks structure.
🔹 Tap and Reaction Logic
After a Reaction Block or Imbalance Gap is created, the script tracks whether price comes back into the zone.
A zone is considered tapped when price trades back inside the zone.
A bullish reaction occurs when price taps a bullish zone and then closes upward out of that zone.
A bearish reaction occurs when price taps a bearish zone and then closes downward out of that zone.
The reaction candle must pass the selected quality filters:
Reject Body %
Reject Range ATR
These filters help avoid weak touches where price enters a zone but does not show enough rejection strength.
🔹 BOS and CHoCH Confirmation
The script tracks swing highs and swing lows using the Structure Swing Length setting.
When price closes above the last confirmed swing high, the script detects a bullish structure break.
When price closes below the last confirmed swing low, the script detects a bearish structure break.
The structure break is classified as either BOS or CHoCH.
BOS means Break of Structure. It represents continuation in the current structure direction.
CHoCH means Change of Character. It represents a break against the previous market bias and may suggest a possible directional shift.
CHoCH and BOS lines are drawn on the chart so users can see exactly which structure level was broken.
🔶 SIGNAL MODES
The Sniper Confirmation setting controls how strict the setup must be before a signal appears.
Reaction Only
A signal can appear when price reacts from a valid zone. This is the fastest mode because it does not require a BOS or CHoCH confirmation.
Tap + Structure
A signal requires price to tap a valid zone and then break structure in the signal direction.
Reaction + Structure
A signal requires both a valid zone reaction and a BOS or CHoCH confirmation. This mode is designed for traders who want zone rejection and structure confirmation together.
🔹 Structure Trigger Type
The Structure Trigger Type setting controls which structure events can trigger signals.
Both
Allows both BOS and CHoCH.
CHoCH Only
Only allows change-of-character signals.
BOS Only
Only allows break-of-structure signals.
This lets traders focus on reversal-style setups, continuation-style setups, or both.
🔶 SNIPER SCORE
Each setup receives a score based on the conditions that are present.
The score can include:
Zone tap or zone reaction
BOS or CHoCH confirmation
Fresh reaction timing
Optional volume confirmation
Optional EMA trend confirmation
A Sniper signal appears when the setup reaches the minimum score threshold.
A Sniper+ signal appears when the setup reaches the higher Sniper+ threshold.
The score is a confluence model. It does not predict guaranteed profit. It simply shows how many of the script’s conditions are aligned.
🔹 Volume Filter
When enabled, the Volume Filter requires current volume to be above a selected moving average multiplier.
Volume MA Length controls the volume average.
Volume Multiplier controls how much stronger current volume must be compared with the average.
This filter can help reduce signals during weaker volume conditions.
🔹 EMA Trend Filter
When enabled, the EMA Trend Filter checks whether price is on the correct side of the selected EMA.
Bullish signals require price to be above the EMA.
Bearish signals require price to be below the EMA.
This filter is optional and can be used when traders want signals to align with broader trend direction.
🔶 TRADE PLAN GUIDE
When a Sniper or Sniper+ signal appears, the script can draw a simple trade plan guide.
Entry is based on the signal candle close.
Stop loss is placed beyond the reaction zone with an optional ATR buffer.
TP1, TP2, and TP3 are calculated using the selected R multiples.
The trade plan is only a visual guide. It does not place trades, manage trades, or act as a strategy tester.
🔶 VISUAL DISPLAY
The script can display:
Bullish and bearish Reaction Blocks
Bullish and bearish Imbalance Gaps
CHoCH and BOS structure lines
Sniper and Sniper+ markers
Latest Entry / SL / TP guide
Master alert and separate bull/bear alert conditions
Used zones and overlapping same-side zones are visually cleaned up to keep the chart easier to read.
🔶 SETTINGS
Core Zones
Show Zones
Toggles the display of Reaction Blocks and Imbalance Gaps.
Reaction Blocks
Enables or disables Reaction Block detection.
Imbalance Gaps
Enables or disables Imbalance Gap detection.
Hide Broken Zones
Removes invalidated zones from the chart.
Max Stored Zones
Controls how many zones are stored and tracked.
Zone Candle Body %
Sets the minimum candle body percentage required to create a zone.
Sniper Logic
Sniper Confirmation
Chooses Reaction Only, Tap + Structure, or Reaction + Structure.
Structure Swing Length
Controls the swing pivot length used for BOS and CHoCH detection.
Structure Trigger Type
Chooses whether BOS, CHoCH, or both can trigger signals.
Reaction Valid Bars
Controls how long a zone reaction remains valid for confirmation.
Confirm Signal On Candle Close
When enabled, signals only appear after the candle closes.
Quality Filters
ATR Length
Controls the ATR used for rejection and stop-buffer calculations.
Reject Body %
Sets the minimum body size required for a valid rejection candle.
Reject Range ATR
Sets the minimum candle range relative to ATR for rejection quality.
Require Break Displacement
Requires BOS/CHoCH candles to pass body and ATR strength filters.
Break Body %
Sets the minimum body size required for a valid structure break.
Break Range ATR
Sets the minimum candle range relative to ATR for a valid structure break.
Score Filters
Use Volume Filter
Requires volume confirmation before allowing signals.
Volume MA Length
Controls the moving average used for volume comparison.
Volume Multiplier
Controls how strong current volume must be compared with its average.
Use EMA Trend Filter
Requires signals to align with the EMA trend filter.
EMA Trend Length
Controls the EMA used for trend filtering.
Show Sniper+ Only
Hides normal Sniper signals and only shows Sniper+ signals.
Min Sniper Score
Minimum score required for a normal Sniper signal.
Sniper+ Score
Minimum score required for a Sniper+ signal.
Visuals
Show CHoCH/BOS Lines
Toggles structure lines on the chart.
Max Structure Lines
Controls how many structure lines remain visible.
Show Latest Entry / SL / TP
Toggles the trade plan guide.
RR Lines Bars Ahead
Controls how far the trade plan guide extends to the right.
TP1 R, TP2 R, TP3 R
Controls the risk-multiple targets.
SL ATR Buffer
Adds an ATR-based buffer beyond the reaction zone for the stop guide.
Alerts
The script includes alert conditions for:
Master Sniper signal
Bull Sniper
Bear Sniper
Bull Sniper+
Bear Sniper+
A dynamic master alert option is also available for traders who want alert messages that include symbol, timeframe, close price, and score.
🔶 HOW TO READ THE SIGNALS
A bullish Sniper signal means price has interacted with a bullish zone and passed the selected confirmation rules.
A bearish Sniper signal means price has interacted with a bearish zone and passed the selected confirmation rules.
A Sniper+ signal means the setup reached the higher score threshold.
BOS labels can help identify continuation-style structure breaks.
CHoCH labels can help identify possible shift or reversal-style structure breaks.
The Entry / SL / TP guide is only for planning and should be adjusted to each trader’s own risk management.
🔶 IMPORTANT NOTES
This script is a confluence and visualization tool. It does not guarantee future price movement.
Signals are based on reaction zones, zone taps, rejection candles, and BOS/CHoCH structure breaks.
Swing structure requires confirmed pivots, so BOS and CHoCH lines appear only after the selected swing length confirms the structure point.
Lower timeframes may produce more frequent signals and more noise.
Higher timeframes may produce fewer but cleaner structure events.
Best results usually come from combining the script with higher timeframe context, market session awareness, and proper risk control.
インジケーター

AlgoSentry Smart Money Engine [Non-Repaint]AlgoSentry Smart Money Engine
A complete Smart Money Concepts toolkit built on a single rule: nothing is drawn until the candle closes. No repainting, no future leaks, no lookahead. What you see on historical bars is exactly what you would have seen live.
This is one coherent engine, not a bundle of disconnected tools — each layer feeds the next:
Market Structure -> Liquidity Sweep -> Fair Value Gap -> Break of Structure / Change of Character -> Order Block -> Premium / Discount -> Smart Money Score.
────────── What it reads ──────────
Market Structure
Swing highs and lows are detected with confirmed pivots. A swing only prints after a set number of closed bars on each side, so the structure labels (HH, HL, LH, LL) never move once drawn. Labels are off by default for a clean chart — the live bias is always in the dashboard.
Break of Structure & Change of Character
A break registers only when price closes beyond a confirmed swing level. Continuing the trend, it is a Break of Structure (BOS); reversing it after breaking the opposite level, it is a Change of Character (CHoCH). A line is drawn from the broken swing to the break candle.
Displacement Quality
Each break is graded Weak, Valid, or Institutional from candle body strength, ATR expansion, and — where available — volume expansion. It separates a real institutional move from a marginal one.
Liquidity Sweeps
Marked when price wicks beyond a prior swing but closes back inside it: a sell-side sweep below a swing low, a buy-side sweep above a swing high. Each swing is swept once, so the chart stays clean.
Fair Value Gaps
Three-candle imbalances are drawn as zones and tracked through their life — Fresh, Partially mitigated, Filled. Show active gaps only, or keep historical ones faded.
Order Blocks
After a confirmed break, the last opposite candle before that break becomes an order-block zone, tracked as Fresh, Touched, or Invalidated.
Premium / Discount
The last confirmed swing range is split into premium (upper), equilibrium (50%), and discount (lower) — context for where price sits inside its range.
Smart Money Score
A 0-100 context score from the confluence of structure, breaks, sweeps, imbalance, order-block proximity, and trend agreement, reading from Strong Bearish to Strong Bullish. It is a market-context score, not a buy or sell signal.
────────── Why it does not repaint ──────────
Every layer runs on confirmed, closed bars. Pivots require bars on both sides before they confirm. Breaks, sweeps, gaps, and blocks are all evaluated on candle close. There is no security() call, no higher-timeframe lookahead, and no recalculation that moves a past signal. Backtest behaviour matches live behaviour.
────────── How to use it ──────────
Read the dashboard top-down — bias, then the Smart Money Score for context, then the live phase (Accumulation, Expansion, Pullback, Distribution). Use BOS and CHoCH to read structural shifts, sweeps to spot liquidity grabs, and the Fair Value Gap and order-block zones as areas of interest. The optional EMA filter aligns events to the higher-timeframe trend. Alerts are available for every event, all candle-close confirmed.
────────── What it does NOT do ──────────
It does not predict price. It does not give buy or sell signals. It does not place trades or guarantee any outcome. It is a structural and contextual reading tool — the decisions and the risk are yours.
────────── Disclaimer ──────────
For educational and informational purposes only. This is not financial advice. Trading carries substantial risk of loss, and past behaviour does not guarantee future results.
Every signal is confirmed on candle close. No future leaks. No lookahead. インジケーター

FVG Retest Entry Engine [trade_w_samet]🎯 FVG Retest Entry Engine
FVG Retest Entry Engine is a structured Fair Value Gap retest analysis indicator designed to help traders study confirmed gap reactions, structure alignment, filtered entry conditions, and multi-target visual trade models directly on the price chart.
This script focuses on one main concept:
FVG retest-based entry visualization.
It is not designed to be a simple buy/sell signal generator.
It is not designed to show every possible Fair Value Gap.
It is not designed to create constant chart noise.
Instead, the goal of FVG Retest Entry Engine is to detect confirmed structure events, identify eligible Fair Value Gaps, monitor their retests, apply configurable quality checkpoints, and visualize accepted setups using one entry level, one protective stop, and three take-profit levels.
The indicator includes:
• Bullish and bearish market-structure detection
• BOS and CHoCH classification
• Three-candle Fair Value Gap detection
• Internal FVG memory and invalidation handling
• Structure-linked FVG candidate selection
• FVG quality scoring and setup grading
• Armed-zone retest monitoring
• Multiple retest confirmation models
• Volume, Directional Force, and confirmed HTF bias filters
• FVG Retest Passport
• Blocker Lens state reporting
• Confirmed-close signal commitment
• Optional Live Preview dashboard state
• Gap-protected and ATR-based stop-loss models
• TP1, TP2, and TP3 risk-multiple projections
• Optional breakeven movement after TP1
• Active and historical TP / SL areas
• Executed FVG retest zones
• One-active-trade-at-a-time logic
• Mobile chart layout
• Multiple visual themes
• Advanced entry and lifecycle alerts
• JSON webhook support
• Compact bottom-right dashboard
The purpose of this script is to help users visually study where a structure event and an eligible Fair Value Gap combine with a confirmed retest condition.
It should be treated as a chart-analysis and educational decision-support tool.
It is not financial advice.
It is not an automated trading system.
It does not guarantee profitable trades.
It does not execute broker orders.
It does not replace personal analysis, risk management, or trade validation.
━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━
At a high level, FVG Retest Entry Engine does the following:
• Detects confirmed bullish and bearish structure breaks.
• Classifies structure events as BOS or CHoCH.
• Detects bullish and bearish three-candle Fair Value Gaps.
• Stores valid FVG zones in internal memory.
• Tracks zone direction, boundaries, age, displacement, volume context, and prior interactions.
• Searches for an eligible FVG after a matching structure event.
• Scores and ranks available FVG candidates.
• Arms the best available zone for retest monitoring.
• Waits for the selected minimum retest delay.
• Detects the selected FVG retest pattern.
• Evaluates reaction quality and optional confluence filters.
• Assigns a setup grade such as A+, A, B, or FILTERED.
• Confirms final entry conditions only when the chart candle closes.
• Draws one Entry, one SL, and three TP levels.
• Tracks TP1, TP2, TP3, stop-loss, and breakeven events.
• Allows only one active trade projection at a time.
• Keeps completed trade areas when historical display is enabled.
• Marks completed models as bullish or bearish FVG Retest outcomes.
• Displays the current bias, engine state, and active levels in the dashboard.
• Provides entry, armed-zone, target, stop, breakeven, and webhook alert options.
The script is intentionally built as a structured process.
It does not include machine-learning prediction.
It does not include guaranteed performance claims.
It does not attempt to forecast every future market movement.
It provides a transparent way to study structure-linked FVG retests and their projected trade lifecycle.
━━━━━━━━━━━━━━━━━━━━━━
🧠 CORE IDEA
━━━━━━━━━━━━━━━━━━━━━━
The core idea behind FVG Retest Entry Engine is based on the relationship between market structure and Fair Value Gap reactions.
A Fair Value Gap represents a three-candle price imbalance.
A bullish FVG is formed when the current candle’s low is above the high from two candles earlier.
A bearish FVG is formed when the current candle’s high is below the low from two candles earlier.
The script does not treat every FVG as an entry.
Instead, it waits for a confirmed structure event and then searches for an eligible FVG that matches that directional context.
The selected FVG becomes an armed zone.
Price must later return to that zone and satisfy the chosen retest condition.
The engine can then evaluate:
• gap size relative to ATR
• formation displacement
• formation volume context
• FVG age
• prior zone interactions
• structure-break quality
• retest depth
• reaction-candle quality
• volume participation
• DI / ADX directional force
• confirmed higher-timeframe bias
• minimum setup grade
The goal is not to show more signals.
The goal is to create a documented and understandable process from structure event to confirmed FVG retest model.
━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THIS SCRIPT IS NOT A SIMPLE BUY/SELL INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
FVG Retest Entry Engine is not intended to be used as a blind buy/sell system.
The script is structured as a visual review workflow:
Structure event is confirmed
→ matching FVG candidates are reviewed
→ one eligible FVG is selected
→ the FVG becomes armed
→ price returns to the armed zone
→ the retest pattern is checked
→ reaction quality is evaluated
→ enabled filters are checked
→ the setup receives a grade
→ the candle must close with all conditions still valid
→ Entry, SL, TP1, TP2, and TP3 are projected
→ the active model is monitored
→ the model closes at TP3, stop loss, targets complete, or breakeven
→ the completed FVG Retest model is archived visually
Each part has a specific purpose.
The structure system identifies a directional event.
The FVG memory system stores imbalance zones.
The candidate-ranking system selects a relevant gap instead of using every gap.
The armed-zone system separates observation from entry.
The retest logic defines what qualifies as a valid return.
The quality checkpoints reduce setups that fail enabled conditions.
The grading system summarizes internal setup quality.
The entry model provides visual planning levels.
The stop model creates a consistent risk reference.
The three-target model provides staged reward references.
The Blocker Lens explains the current engine state.
The Passport explains why an accepted setup qualified.
The alert system supports monitoring of confirmed events.
This makes the script a structured FVG retest analysis tool, not a guaranteed trade signal generator.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW THE SCRIPT WORKS
━━━━━━━━━━━━━━━━━━━━━━
The script operates through several connected stages.
First, it identifies confirmed swing highs and swing lows.
Price breaking a confirmed swing level can create a bullish or bearish structure event.
The break may be classified as BOS when it continues the current structure bias or CHoCH when it changes that bias.
The engine separately detects three-candle Fair Value Gaps and stores their contextual information.
bool tws_bullish_fvg = bar_index >= 2 and low > high
bool tws_bearish_fvg = bar_index >= 2 and high < low
float tws_bullish_fvg_top = low
float tws_bullish_fvg_bottom = high
float tws_bearish_fvg_top = low
float tws_bearish_fvg_bottom = high
float tws_bullish_fvg_size = tws_bullish_fvg_top - tws_bullish_fvg_bottom
float tws_bearish_fvg_size = tws_bearish_fvg_top - tws_bearish_fvg_bottom
When a structure event occurs, the engine reviews matching FVG candidates within the selected distance and timing limits.
The available candidates are compared using the active profile’s rules.
The selected zone becomes armed and remains under observation until:
• a confirmed retest creates an entry
• the setup expires
• the FVG is invalidated
• another structure search replaces it
Once price interacts with the armed zone, the selected retest model and reaction-quality conditions are checked.
Volume, DI / ADX, and higher-timeframe bias can also be required.
Only a setup that passes the active rules and remains valid at candle close can create a permanent entry model.
━━━━━━━━━━━━━━━━━━━━━━
🔵 BULLISH FVG RETEST LOGIC
━━━━━━━━━━━━━━━━━━━━━━
A bullish FVG Retest setup begins with bullish structure context.
The script requires a confirmed bullish BOS or CHoCH event and then searches for a directionally matching FVG candidate.
The selected zone must remain valid while the engine waits for price to return.
Depending on the chosen profile and retest model, bullish confirmation may require:
• wick contact with the zone
• real-body contact
• a close inside the zone
• a bullish reaction reclaim
• directional recovery above the zone midpoint
• a close above the relevant FVG edge
• a bullish rejection wick
The engine may then check:
• reaction strength
• volume participation
• positive DI dominance
• minimum ADX strength
• confirmed bullish HTF alignment
• minimum accepted grade
When every enabled condition remains valid at candle close, the script creates:
• a bullish FVG RETEST label
• an executed FVG retest box
• an entry reference at the confirmation close
• a protective stop below the setup reference
• TP1, TP2, and TP3 above entry
• blue reward visualization
• red risk visualization
This does not mean price must continue upward.
It means the script detected a bullish FVG retest condition that satisfied the selected rules at the time of confirmation.
━━━━━━━━━━━━━━━━━━━━━━
🔴 BEARISH FVG RETEST LOGIC
━━━━━━━━━━━━━━━━━━━━━━
A bearish FVG Retest setup begins with bearish structure context.
The script requires a confirmed bearish BOS or CHoCH event and then searches for a directionally matching FVG candidate.
The selected zone must remain valid while the engine waits for price to return.
Depending on the chosen profile and retest model, bearish confirmation may require:
• wick contact with the zone
• real-body contact
• a close inside the zone
• a bearish reaction reclaim
• directional recovery below the zone midpoint
• a close below the relevant FVG edge
• a bearish rejection wick
The engine may then check:
• reaction strength
• volume participation
• negative DI dominance
• minimum ADX strength
• confirmed bearish HTF alignment
• minimum accepted grade
When every enabled condition remains valid at candle close, the script creates:
• a bearish FVG RETEST label
• an executed FVG retest box
• an entry reference at the confirmation close
• a protective stop above the setup reference
• TP1, TP2, and TP3 below entry
• blue reward visualization
• red risk visualization
This does not mean price must continue downward.
It means the script detected a bearish FVG retest condition that satisfied the selected rules at the time of confirmation.
━━━━━━━━━━━━━━━━━━━━━━
💎 FVG QUALITY FILTER SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes a multi-layer FVG quality system to reduce unnecessary chart signals.
This is important because not every gap has the same context and not every retest should create an entry model.
The quality system may evaluate:
• minimum gap size relative to ATR
• displacement of the formation candle
• gap location inside the recent dealing range
• formation-volume context
• gap age
• previous interactions with the zone
• distance from the matching structure event
• structure-break strength
• reaction-candle strength
• volume participation on retest
• DI / ADX directional force
• confirmed HTF bias
• final setup grade
The exact behavior depends on the selected Engine Style.
Original Sync uses the first validated calibration and star-based acceptance logic.
Balanced Flow uses moderate filtering.
Precision Flow applies stricter FVG and retest requirements.
Fast Flow accepts more active conditions.
Position Flow uses wider structural and timing windows.
Custom Lab exposes the advanced thresholds for manual configuration.
The filter system does not guarantee better future outcomes.
It controls how selective the engine is before creating a confirmed visual model.
━━━━━━━━━━━━━━━━━━━━━━
📏 GAP / ATR FILTER
━━━━━━━━━━━━━━━━━━━━━━
The gap-width filter measures the detected FVG against ATR.
This helps the engine reject extremely small imbalance zones relative to current market volatility.
A higher minimum gap-width value makes FVG storage and candidate selection more selective.
A lower value allows smaller gaps to enter the internal memory.
The filter is volatility-adjusted because the same absolute price distance can have different meaning across symbols and timeframes.
The active threshold depends on the chosen profile or Custom Lab value.
A larger gap is not automatically a better setup.
Gap size is only one component of the complete selection and retest process.
━━━━━━━━━━━━━━━━━━━━━━
🕯️ DISPLACEMENT QUALITY FILTER
━━━━━━━━━━━━━━━━━━━━━━
The displacement filter evaluates the directional body of the candle associated with FVG formation.
The formation body is compared with ATR and converted into a bounded internal score.
This helps the script distinguish a stronger directional imbalance from a gap created during weak or narrow price action.
When the Gap Impulse Check is enabled, an FVG must satisfy the selected displacement threshold before it is stored as a valid candidate.
A higher threshold reduces the number of eligible FVGs.
A lower threshold accepts more moderate formations.
The displacement score is an internal quality measurement.
It does not predict whether the zone will hold in the future.
━━━━━━━━━━━━━━━━━━━━━━
📊 REACTION STRENGTH FILTER
━━━━━━━━━━━━━━━━━━━━━━
The reaction-strength filter evaluates the candle that interacts with the armed FVG.
The score can include:
• close location inside the candle
• directional wick quality
• body size relative to ATR
• bullish or bearish candle direction
• penetration depth inside the FVG
The purpose is to separate a basic touch from a more structured directional response.
A higher minimum reaction-strength value requires a clearer response from the zone.
A lower value accepts more retest conditions.
Original Sync can use its original reaction logic without the same adaptive score requirement.
The reaction score is not a win probability.
It is a standardized way to evaluate whether the retest candle matches the selected profile’s quality requirements.
━━━━━━━━━━━━━━━━━━━━━━
🧼 CONFIRMED RETEST FILTER
━━━━━━━━━━━━━━━━━━━━━━
The confirmed-retest layer requires price to satisfy the active retest model and remain valid at candle close.
Available Original Sync reaction patterns include:
• Any Wick Contact
• Real Body Contact
• Close Within Gap
• Reaction Reclaim
Available adaptive reaction models include:
• First Contact
• Directional Recovery
• Edge Reclaim
• Rejection Wick
First Contact accepts basic interaction with the zone.
Directional Recovery requires directional behavior after the interaction.
Edge Reclaim requires price to close through the relevant boundary.
Rejection Wick applies a stricter wick-and-close response.
The script can also use an interaction margin to tolerate minor boundary differences.
A minimum delay prevents the engine from confirming a retest too soon after the structure event.
An expiry window prevents stale armed zones from producing entries too far from their original context.
Final entry commitment remains bar-close based.
━━━━━━━━━━━━━━━━━━━━━━
🎯 ENTRY MODEL
━━━━━━━━━━━━━━━━━━━━━━
When an armed FVG retest passes all enabled conditions, the script creates a visual entry model.
The entry reference is the close of the candle that confirms the retest.
Permanent entries, labels, boxes, and entry alerts are committed only after candle close.
tws_preview_ready := tws_eval_zone_touched and tws_eval_reaction_pass and tws_direction_filters_pass and tws_eval_grade_pass
bool tws_confirmed_entry = tws_preview_ready and barstate.isconfirmed
if tws_confirmed_entry
tws_long_signal := tws_armed_direction == 1
tws_short_signal := tws_armed_direction == -1
tws_entry_event := true
tws_trade_active := true
tws_trade_direction := tws_armed_direction
tws_trade_open_bar := bar_index
tws_trade_entry := close
Confirmed Close mode waits for the candle to finish before the dashboard treats the setup as an entry.
Live Preview can show that current conditions are ready while the realtime candle is still open.
The preview may change intrabar because the candle is unfinished.
It does not create a permanent historical entry model unless the setup remains valid when the candle closes.
The entry is a visual analysis reference.
It is not a broker order and does not require the user to enter a trade.
━━━━━━━━━━━━━━━━━━━━━━
🛑 ATR STOP-LOSS MODEL
━━━━━━━━━━━━━━━━━━━━━━
The script includes two stop-placement models.
Gap-Protected Stop uses the selected FVG boundary plus an ATR-based protective buffer.
For bullish setups, the stop is projected below the FVG.
For bearish setups, the stop is projected above the FVG.
Volatility Stop projects the stop at an ATR multiple from entry.
A minimum stop-distance percentage can prevent extremely narrow visual stops.
float tws_raw_stop =
tws_stop_mode == "Gap-Protected Stop" ?
(
tws_trade_direction == 1 ?
tws_armed_bottom - tws_atr * tws_fvg_stop_buffer_atr :
tws_armed_top + tws_atr * tws_fvg_stop_buffer_atr
) :
(
tws_trade_direction == 1 ?
tws_trade_entry - tws_atr * tws_atr_stop_multiplier :
tws_trade_entry + tws_atr * tws_atr_stop_multiplier
)
float tws_raw_stop_distance = math.abs(tws_trade_entry - tws_raw_stop)
float tws_guaranteed_distance = tws_trade_entry * tws_minimum_stop_percent / 100.0
float tws_final_stop_distance = math.max(tws_raw_stop_distance, tws_guaranteed_distance)
ATR is used because volatility changes across markets and timeframes.
A wider stop changes the projected risk distance and therefore also changes all three target levels.
The displayed SL is a visual planning level only.
It does not place or manage a real broker stop order.
━━━━━━━━━━━━━━━━━━━━━━
🎯 TAKE-PROFIT RR MODEL
━━━━━━━━━━━━━━━━━━━━━━
The script uses three take-profit levels.
Each target is calculated from the distance between entry and the original stop.
float tws_trade_risk = math.abs(tws_trade_entry - tws_trade_original_stop)
tws_trade_tp1 := tws_trade_direction == 1 ? tws_trade_entry + tws_trade_risk * tws_tp1_r : tws_trade_entry - tws_trade_risk * tws_tp1_r
tws_trade_tp2 := tws_trade_direction == 1 ? tws_trade_entry + tws_trade_risk * tws_tp2_r : tws_trade_entry - tws_trade_risk * tws_tp2_r
tws_trade_tp3 := tws_trade_direction == 1 ? tws_trade_entry + tws_trade_risk * tws_tp3_r : tws_trade_entry - tws_trade_risk * tws_tp3_r
The default concept is:
TP1 = first risk-multiple target
TP2 = second risk-multiple target
TP3 = final risk-multiple target
The exact R values can be adjusted in Position Architecture.
The script also contains visual position-share percentages for TP1, TP2, and TP3.
These shares are used by the internal lifecycle model.
They do not represent a broker account, real position size, or verified financial performance.
The RR settings only control projected visual distances.
They should not be interpreted as recommendations or guaranteed objectives.
━━━━━━━━━━━━━━━━━━━━━━
📦 ACTIVE TP / SL BOX SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
When a confirmed FVG Retest entry appears, the script can draw a complete visual trade model.
The visual model includes:
• executed FVG retest zone
• entry line
• original stop line
• active stop line
• TP1 line
• TP2 line
• TP3 line
• red risk box
• blue reward box
• Entry price label
• SL price label
• TP1, TP2, and TP3 price labels
• bullish or bearish entry label
The active boxes extend to the right while the model is open.
When the model closes, the right edge is fixed at the closing candle.
If Keep Completed Trade Areas is enabled, completed boxes and lines remain visible for historical review.
The Completed Trade History Limit controls how many previous visual models are retained.
The TP area uses a blue-toned visual palette.
TP price labels use a different, darker background so they remain distinct from the reward box.
The SL area remains red for clearer risk separation.
━━━━━━━━━━━━━━━━━━━━━━
🚦 ONE ACTIVE TRADE AT A TIME
━━━━━━━━━━━━━━━━━━━━━━
The script includes one-active-trade-at-a-time logic.
If a trade model is active, the engine does not create another trade model until the current one closes.
The active model may close through:
• TP3
• targets complete
• stop loss
• breakeven exit
This design separates:
• FVG and structure detection
• trade-model creation permission
The engine can continue calculating market context while a model is active, but another entry model is not opened.
This helps prevent overlapping TP / SL areas and keeps the chart easier to interpret.
The one-active-model rule is a visual management decision.
It is not a restriction on the user’s personal trading activity.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ SAME-CANDLE TP / SL HANDLING
━━━━━━━━━━━━━━━━━━━━━━
If a target and the active stop are both touched on the same candle, standard OHLC data cannot reveal the true intrabar sequence.
The script therefore includes two selectable assumptions:
Protective First
Target First
Protective First assumes the stop is processed before target events.
Target First processes available target events before the stop check.
bool tws_conservative_mode =
tws_intrabar_priority == "Protective First"
if tws_conservative_mode and tws_stop_touched
tws_trade_remaining_percent := 0.0
tws_close_trade := true
tws_close_reason := tws_trade_active_stop == tws_trade_entry ? "BREAKEVEN" : "STOP LOSS"
tws_final_exit_price := tws_trade_active_stop
else
if not tws_tp1_reached and tws_tp1_touched
tws_tp1_reached := true
tws_tp1_event := true
Protective First is the more conservative bar-based assumption.
Target First is more optimistic.
Neither option reproduces exact tick-by-tick broker execution.
The model does not include spread, slippage, commissions, latency, or partial-fill behavior.
━━━━━━━━━━━━━━━━━━━━━━
🏷️ FVG RETEST LABELS
━━━━━━━━━━━━━━━━━━━━━━
The script uses clear directional FVG Retest labels.
Bullish entry labels use:
🟢 FVG RETEST
📈 LONG
Bearish entry labels use:
🔴 FVG RETEST
📉 SHORT
Entry labels can also display:
• grade
• setup score
• FVG age
• retest depth
• Passport information
Completed-model labels emphasize that the closed model originated from an FVG retest.
A completed bullish model can display:
🟢 BULLISH FVG RETEST
🔒 MODEL CLOSED
🎯 close reason
⭐ grade
TP1 / TP2 / TP3 status
A completed bearish model uses the corresponding bearish wording and color.
The labels do not display USD profit or account-profit claims.
All chart labels use bold and italic text formatting.
The signal-label size can be adjusted from the settings.
━━━━━━━━━━━━━━━━━━━━━━
📍 FVG ZONE DISPLAY MODES
━━━━━━━━━━━━━━━━━━━━━━
The FVG display system includes three modes:
Hidden
Selected Gap
All Active Gaps
Hidden mode removes active FVG memory boxes from the chart while allowing the engine to continue calculating them internally.
Selected Gap shows only the FVG currently armed for retest monitoring.
All Active Gaps displays every currently stored and valid FVG zone.
Show Executed FVG Retests separately controls whether the FVG zone that created an entry remains highlighted as part of the trade model.
The selected display mode affects visual presentation only.
It does not change the underlying FVG calculations.
For the cleanest chart, Selected Gap is generally the most focused mode.
All Active Gaps can be useful for research but may create more chart density.
━━━━━━━━━━━━━━━━━━━━━━
🧹 FVG INVALIDATION
━━━━━━━━━━━━━━━━━━━━━━
The script can automatically remove invalidated FVG zones.
A bullish FVG may be invalidated when confirmed price action closes through the zone in the opposite direction.
A bearish FVG may be invalidated when confirmed price action closes through its opposite boundary.
An armed zone can also be cleared when:
• its retest window expires
• the zone exceeds the permitted lifetime
• the internal memory limit removes an older gap
• the active structure search is replaced
When an armed FVG becomes invalid, the Blocker Lens can display FVG INVALIDATED.
When the retest window expires, it can display SETUP EXPIRED.
Removing invalidated or stale zones helps prevent outdated FVGs from creating later entries outside their intended context.
Users can disable automatic invalidation removal if they prefer to retain more zones visually.
━━━━━━━━━━━━━━━━━━━━━━
📟 DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━
The script includes a compact dashboard positioned in the bottom-right corner.
The dashboard displays:
• BIAS
• STATE
• ENTRY
• TP1
• TP2
• TP3
• SL
BIAS uses the confirmed higher-timeframe filter when that filter is enabled and valid.
Otherwise, it reflects the current internal structure bias.
STATE is powered by the Blocker Lens.
Possible states include:
• WAITING STRUCTURE
• SCANNING FVG
• NO ELIGIBLE FVG
• FVG ARMED
• RETEST DELAY
• WAITING RETEST
• VOLUME BLOCK
• DI BLOCK
• HTF BLOCK
• WEAK REACTION
• GRADE BLOCK
• LIVE PREVIEW READY
• WAITING BAR CLOSE
• TRADE ACTIVE
• COOLDOWN
• SETUP EXPIRED
• FVG INVALIDATED
The dashboard size can be set to Micro, Compact, or Standard.
The dashboard is designed to summarize engine state and current price references.
It is not a performance report.
It is not a replacement for TradingView Strategy Tester.
━━━━━━━━━━━━━━━━━━━━━━
🚨 ALERT SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
FVG Retest Entry Engine includes advanced alert options for:
• FVG armed
• bullish FVG Retest entry
• bearish FVG Retest entry
• any FVG Retest entry
• TP1 reached
• TP2 reached
• TP3 reached
• breakeven activated
• stop loss
• breakeven exit
Alert packages include:
Off
Qualified Entries
Premium Entries
Full Lifecycle
Webhook JSON
Qualified Entries focuses on confirmed accepted entries.
Premium Entries applies stricter grade-based alert delivery.
Full Lifecycle includes entry and management events.
Webhook JSON sends structured event messages for external processing.
Alert Direction can be limited to Both Directions, Bullish Only, or Bearish Only.
Minimum Alert Grade can be set to All Qualified, A / A+, or A+ Only.
Alert filtering affects alert delivery only.
It does not change the chart’s signal calculations.
alertcondition(tws_armed_alert_event, title="trade_w_samet • FVG ARMED", message='trade_w_samet FVG ARMED | {{ticker}} | TF: {{interval}} | Score: {{plot("SIGNAL_SCORE")}}')
alertcondition(tws_entry_alert_event and tws_trade_direction == 1, title="trade_w_samet • BULLISH FVG RETEST", message='trade_w_samet BULLISH FVG RETEST | {{ticker}} | TF: {{interval}} | Score: {{plot("SIGNAL_SCORE")}} | Entry: {{plot("ENTRY")}} | SL: {{plot("SL")}} | TP1: {{plot("TP1")}} | TP2: {{plot("TP2")}} | TP3: {{plot("TP3")}}')
alertcondition(tws_entry_alert_event and tws_trade_direction == -1, title="trade_w_samet • BEARISH FVG RETEST", message='trade_w_samet BEARISH FVG RETEST | {{ticker}} | TF: {{interval}} | Score: {{plot("SIGNAL_SCORE")}} | Entry: {{plot("ENTRY")}} | SL: {{plot("SL")}} | TP1: {{plot("TP1")}} | TP2: {{plot("TP2")}} | TP3: {{plot("TP3")}}')
alertcondition(tws_tp1_alert_event, title="trade_w_samet • TP1 REACHED", message='trade_w_samet TP1 REACHED | {{ticker}} | TP1: {{plot("TP1")}}')
alertcondition(tws_stop_alert_event, title="trade_w_samet • STOP LOSS", message='trade_w_samet STOP LOSS | {{ticker}} | SL: {{plot("SL")}}')
Alerts are monitoring tools only.
They do not execute trades or place broker orders.
━━━━━━━━━━━━━━━━━━━━━━
🔔 HOW TO USE ALERTS
━━━━━━━━━━━━━━━━━━━━━━
A practical alert workflow:
1. Add FVG Retest Entry Engine to the chart.
2. Select the desired Engine Style and confirmation settings.
3. Open TradingView’s alert window.
4. Select the indicator as the alert condition.
5. Choose the desired entry or lifecycle condition.
6. Select the alert frequency appropriate for confirmed-candle monitoring.
7. Use the Alert Package, direction, and grade controls inside the indicator when needed.
8. Add a webhook URL only when using a compatible external workflow.
9. Test the alert configuration before depending on it.
10. Confirm every event with personal analysis and risk management.
For confirmed entry monitoring, users should avoid treating provisional realtime candle conditions as permanent signals.
Entry alerts are designed around the script’s confirmed event variables.
Alert delivery can still depend on TradingView servers, the user’s alert configuration, data availability, and any external webhook destination.
━━━━━━━━━━━━━━━━━━━━━━
🧪 HOW TO USE THE INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
A practical workflow:
1. Add FVG Retest Entry Engine to a standard candlestick chart.
2. Begin with Original Sync or Balanced Flow.
3. Keep Signal Timing on Confirmed Close for the clearest workflow.
4. Use Selected Gap to keep the chart focused.
5. Observe the dashboard STATE value.
6. Wait for a confirmed structure event and an armed FVG.
7. Review the FVG zone before the retest occurs.
8. When price returns, allow the selected retest model and filters to complete.
9. Review the FVG Retest Passport when an entry appears.
10. Use the displayed Entry, SL, TP1, TP2, and TP3 as visual references only.
11. Evaluate whether the setup fits personal structure, liquidity, session, and risk rules.
12. Use alerts for monitoring rather than blind execution.
13. Review completed FVG Retest labels to understand the model lifecycle.
14. Test settings on the exact markets and timeframes personally studied.
The indicator is best used as a structured FVG retest review tool.
It should not be used as an automatic decision-maker.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS REFERENCE
━━━━━━━━━━━━━━━━━━━━━━
⚡ Signal Blueprint
Engine Style
Controls the active configuration profile.
Available profiles:
Original Sync
Balanced Flow
Precision Flow
Fast Flow
Position Flow
Custom Lab
Allow Bullish Setups
Enables or disables bullish FVG Retest models.
Allow Bearish Setups
Enables or disables bearish FVG Retest models.
━━━━━━━━━━━━━━━━━━━━━━
🪪 Retest Experience
FVG Retest Passport
Controls whether Passport information is Off, Compact, or Detailed.
Show Blocker Lens
Shows or hides the engine STATE explanation in the dashboard.
Signal Timing
Selects Confirmed Close or Live Preview behavior.
Live Preview affects the dashboard’s provisional realtime state. Permanent entries remain candle-close confirmed.
━━━━━━━━━━━━━━━━━━━━━━
🧬 Original Sync Engine
Original Signal Calibration
Selects Manual Sync, Bitcoin Map, Ethereum Map, Solana Map, or Gold Map.
Structure Window
Controls pivot sensitivity in Manual Sync.
Minimum Gap Footprint — ATR
Controls the minimum FVG width.
Gap Lifetime
Controls how long stored FVGs remain eligible.
Gap Memory Capacity
Controls the number of stored zones.
Break-to-Gap Distance
Controls the maximum allowed distance between structure context and FVG eligibility.
After-Break Scan Window
Controls how long the engine continues searching after a break.
Reaction Pattern
Selects Any Wick Contact, Real Body Contact, Close Within Gap, or Reaction Reclaim.
Reaction Margin %
Adds tolerance around FVG boundaries.
Minimum Reaction Delay
Controls how many bars must pass before retest confirmation.
Reaction Expiry Bars
Controls how long the armed setup may wait.
Participation Multiplier
Controls the Original Sync volume requirement.
Minimum Directional Force
Controls the Original Sync ADX threshold.
Minimum Sync Rating
Controls the minimum accepted star rating.
Minimum Risk Distance %
Prevents extremely narrow stops.
━━━━━━━━━━━━━━━━━━━━━━
🧭 Structure Pulse
Structure Sensitivity
Controls pivot detection in Custom Lab.
Display Structure Tags
Shows or hides BOS / CHoCH labels.
Close-Lock Breaks
Requires a candle close beyond structure when enabled.
Break Momentum Check
Requires directional expansion on the break candle.
Break Body Threshold — ATR
Controls the required break-candle body size.
Break Clearance — ATR
Adds an ATR-based buffer beyond the structure level.
━━━━━━━━━━━━━━━━━━━━━━
🧱 Gap Intelligence
Minimum Gap Width — ATR
Controls the minimum stored FVG size.
Gap Impulse Check
Enables displacement filtering.
Minimum Gap Impulse
Controls the required formation displacement.
Minimum Gap Score
Controls the minimum candidate-quality score.
Allowed Prior Reactions
Controls how many previous zone interactions are accepted.
Gap Expiry Bars
Controls maximum FVG age.
Active Gap Capacity
Controls stored-zone capacity.
Maximum Structure Link
Controls the maximum structure-to-FVG distance.
Break Follow-Through Window
Controls post-break candidate scanning.
Delete Invalidated Gaps
Removes zones invalidated by confirmed opposite price action.
━━━━━━━━━━━━━━━━━━━━━━
🎯 Reaction Trigger
Reaction Model
Selects First Contact, Directional Recovery, Edge Reclaim, or Rejection Wick.
Gap Interaction Margin %
Adds tolerance around FVG boundaries.
Minimum Reaction Strength
Controls the required retest-candle score.
Reaction Delay Bars
Controls the minimum delay before retest confirmation.
Setup Expiry Bars
Controls how long the armed zone remains available.
Signal Cooldown Bars
Controls the delay after a completed model before another entry is permitted.
━━━━━━━━━━━━━━━━━━━━━━
🛂 Quality Checkpoints
Volume Participation Check
Enables or disables the retest-volume filter.
Volume Baseline Length
Controls the volume moving-average period.
Required Volume Expansion
Controls the required volume multiplier.
Directional Force Check
Enables or disables DI / ADX filtering.
Directional Force Length
Controls the DI period.
Trend Strength Smoothing
Controls ADX smoothing.
Minimum Trend Strength
Controls the required ADX value.
Higher-Timeframe Bias Check
Enables or disables HTF directional alignment.
Bias Timeframe
Selects the higher timeframe.
Bias Fast EMA
Controls the fast HTF EMA length.
Bias Slow EMA
Controls the slow HTF EMA length.
Minimum Setup Grade
Selects B Grade or Better, A Grade or Better, or A+ Only.
The HTF layer uses previous completed higher-timeframe values.
float tws_htf_close = request.security(
syminfo.tickerid,
tws_htf_timeframe,
close ,
barmerge.gaps_off,
barmerge.lookahead_on
)
float tws_htf_fast_ema = request.security(
syminfo.tickerid,
tws_htf_timeframe,
ta.ema(close, tws_htf_fast_length) ,
barmerge.gaps_off,
barmerge.lookahead_on
)
float tws_htf_slow_ema = request.security(
syminfo.tickerid,
tws_htf_timeframe,
ta.ema(close, tws_htf_slow_length) ,
barmerge.gaps_off,
barmerge.lookahead_on
)
━━━━━━━━━━━━━━━━━━━━━━
🛡️ Position Architecture
ATR Calculation Length
Controls ATR calculation.
Stop Placement Model
Selects Gap-Protected Stop or Volatility Stop.
Volatility Stop Multiplier
Controls ATR stop distance from entry.
Gap Stop Buffer — ATR
Controls the protective distance beyond the FVG.
Minimum Stop Distance %
Prevents extremely narrow risk zones.
TP1 Risk Multiple
Controls the first target distance.
TP2 Risk Multiple
Controls the second target distance.
TP3 Risk Multiple
Controls the final target distance.
TP1 Position Share %
Controls the internal visual share assigned to TP1.
TP2 Position Share %
Controls the internal visual share assigned to TP2.
TP3 Position Share %
Controls the internal visual share assigned to TP3.
Move Stop to Entry After TP1
Moves the active stop to entry after TP1 according to confirmed lifecycle rules.
Same-Candle Priority
Selects Protective First or Target First.
━━━━━━━━━━━━━━━━━━━━━━
🎨 Chart Design
Color System
Selects Obsidian Signal, Carbon Grid, Ivory Pulse, Neon Voltage, Acid Circuit, or Violet Flux.
Gap Display Mode
Selects Hidden, Selected Gap, or All Active Gaps.
Show Executed FVG Retests
Shows or hides the FVG zone used by a confirmed trade model.
Display TP / SL Areas
Shows or hides the reward and risk boxes.
Keep Completed Trade Areas
Keeps completed model boxes and lines.
Completed Trade History Limit
Controls the maximum historical visual models.
Active Area Projection
Controls the initial right-side projection length.
Chart Layout
Selects Desktop or Mobile.
Signal Label Size
Selects Micro, Compact, Standard, or Large.
Dashboard Size
Selects Micro, Compact, or Standard.
Display Bias EMA
Shows or hides the confirmed HTF fast EMA reference.
Display Setup Dashboard
Shows or hides the bottom-right dashboard.
━━━━━━━━━━━━━━━━━━━━━━
📡 Alert Center
Alert Package
Selects Off, Qualified Entries, Premium Entries, Full Lifecycle, or Webhook JSON.
Alert Direction
Selects Both Directions, Bullish Only, or Bearish Only.
Minimum Alert Grade
Selects All Qualified, A / A+, or A+ Only.
Alert When FVG Is Armed
Enables armed-zone alerts for compatible packages.
Alert When Stop Moves to Entry
Enables breakeven-activation alerts for compatible packages.
━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT MAKES THIS SCRIPT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━
FVG Retest Entry Engine uses familiar analytical concepts such as:
• Fair Value Gaps
• swing-point structure
• BOS and CHoCH
• ATR
• volume analysis
• DI / ADX
• higher-timeframe EMA bias
• risk/reward projection
• staged targets
• breakeven management
These concepts are not unique by themselves.
The originality of this script lies in how they are organized into a transparent FVG retest workflow:
Structure confirmation
→ directional FVG memory
→ contextual candidate comparison
→ selected armed zone
→ configurable retest validation
→ reaction-quality evaluation
→ optional volume, DI, and HTF checkpoints
→ setup grading
→ confirmed-close entry commitment
→ three-target visual management
→ optional breakeven movement
→ completed FVG Retest archiving
→ Blocker Lens state reporting
→ Passport explanation
→ lifecycle alerts
Distinctive implementation features include:
• structure-linked FVG selection instead of signaling every gap
• multiple Engine Style profiles
• Original Sync market calibrations
• an armed-zone state before entry
• candidate ranking using several FVG characteristics
• multiple retest models
• a visible reason when an entry is waiting or blocked
• a Passport explaining accepted setup context
• confirmed-close permanent signal commitment
• previous-completed HTF values
• executed FVG zone preservation
• three-stage target management
• Desktop and Mobile display modes
• alert filtering separated from chart calculations
This structure is designed to provide a focused and explainable review process without relying on hidden prediction claims.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT PRACTICAL NOTES
━━━━━━━━━━━━━━━━━━━━━━
The script’s behavior depends heavily on settings and market conditions.
Signal frequency and visual output may change based on:
• Engine Style
• structure sensitivity
• close-based or wick-based breaks
• break momentum requirements
• minimum FVG width
• displacement filtering
• candidate-score threshold
• previous zone interactions
• FVG lifetime
• retest model
• reaction-strength threshold
• retest delay
• setup expiry
• volume filter settings
• DI / ADX settings
• HTF timeframe and EMA lengths
• minimum setup grade
• stop model
• target multiples
• signal cooldown
• timeframe
• symbol volatility
• market session
• available historical bars
A setting that appears clean on one market may behave differently on another.
A profile that produces suitable frequency on one timeframe may be too strict or too active on another.
Volume behavior can differ across asset classes and data providers.
Higher-timeframe filtering only operates as intended when the selected bias timeframe is genuinely higher than the chart timeframe.
Users should test the exact symbol, timeframe, profile, and session they personally study.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS AND SHORTCOMINGS
━━━━━━━━━━━━━━━━━━━━━━
This script has important limitations:
It does not guarantee profitable trades.
It does not predict future price movement.
It does not replace risk management.
It does not execute trades.
It does not place broker orders.
It does not include broker slippage.
It does not include commissions.
It does not include spreads.
It does not include execution delay.
It does not include partial-fill behavior.
It uses bar-based chart data.
Same-candle TP / SL order cannot be known from standard OHLC data.
Same-Candle Priority is a modeling assumption.
Live Preview can change intrabar because the realtime candle is unfinished.
Permanent entry models are committed only after bar close.
Confirmed pivots require future bars before becoming available as confirmed swing points.
The dashboard is not TradingView Strategy Tester.
The internal target-share model is not account-performance reporting.
Historical boxes and completed labels do not guarantee similar future behavior.
Setup grades are internal classifications, not win probabilities.
Filter settings do not guarantee improved future results.
Higher-timeframe values depend on selected timeframe and available data.
Data-feed revisions or chart-history differences can affect historical calculations.
Alert delivery depends on TradingView and the user’s alert configuration.
Webhook delivery also depends on the external destination.
One-active-trade logic is a visual management rule, not broker execution logic.
For these reasons, FVG Retest Entry Engine should be used as an educational decision-support and chart-analysis tool, not as a standalone automated trading strategy.
━━━━━━━━━━━━━━━━━━━━━━
👤 WHO THIS SCRIPT MAY BE USEFUL FOR
━━━━━━━━━━━━━━━━━━━━━━
This script may be useful for traders who:
• study Fair Value Gap retests
• use BOS and CHoCH context
• prefer selected FVGs instead of every raw gap
• want a visible armed-zone workflow
• want to understand why a setup is waiting or blocked
• prefer confirmed-close entries
• want a setup-grade framework
• want Entry, SL, TP1, TP2, and TP3 visualization
• want optional breakeven behavior
• want completed FVG Retest models preserved visually
• use higher-timeframe directional context
• want mobile-friendly chart presentation
• use lifecycle alerts for monitoring
• want a structured educational analysis framework
It may be less suitable for users who:
• want guaranteed buy/sell signals
• want a fully automated trading bot
• want every raw FVG to create an entry
• expect one profile to work on every market
• expect grades to represent guaranteed probability
• require exact tick-level execution simulation
• expect visual projections to match broker fills
• expect alerts to execute trades automatically
• want an indicator to replace independent decision-making
━━━━━━━━━━━━━━━━━━━━━━
🧭 BEST PRACTICE SUGGESTIONS
━━━━━━━━━━━━━━━━━━━━━━
For cleaner review:
• Start with Original Sync or Balanced Flow.
• Keep Signal Timing on Confirmed Close.
• Use Selected Gap to reduce chart clutter.
• Enable Blocker Lens while learning the engine workflow.
• Use Compact Passport for concise context.
• Use Detailed Passport when reviewing why a setup qualified.
• Review the armed FVG before the entry appears.
• Check whether the FVG retest agrees with personal market-structure analysis.
• Evaluate the displayed stop against nearby structure and volatility.
• Treat TP1, TP2, and TP3 as planning references only.
• Keep Protective First when a conservative same-candle assumption is preferred.
• Use Precision Flow when fewer, stricter setups are preferred.
• Use Fast Flow only after understanding its higher signal frequency.
• Use Custom Lab only after learning how each threshold affects the engine.
• Use Mobile layout on smaller screens.
• Use alerts for monitoring, not blind execution.
• Always apply independent analysis, risk management, and position sizing.
━━━━━━━━━━━━━━━━━━━━━━
🔓 PUBLICATION NOTE
━━━━━━━━━━━━━━━━━━━━━━
FVG Retest Entry Engine is published as an educational and visual market-analysis tool.
The purpose of this description is to explain:
• what the script does
• how structure events are confirmed
• how three-candle FVGs are detected
• how FVGs are stored and invalidated
• how structure and FVG candidates are linked
• how an FVG becomes armed
• how retest models work
• how reaction quality is evaluated
• how volume, DI / ADX, and HTF checkpoints operate
• how setup grades are assigned
• how Confirmed Close and Live Preview differ
• how Entry and stop levels are calculated
• how TP1, TP2, and TP3 are projected
• how breakeven and same-candle assumptions work
• how active and completed trade areas behave
• what the Passport and Blocker Lens show
• what the dashboard displays
• what the alert packages do
• what the limitations are
• how the indicator should and should not be used
The script is designed to support structured analysis.
It does not promise profitable results.
It does not remove market risk.
It does not execute trades.
It should not be used as a blind buy/sell system.
It is best used as a visual framework for reviewing structure-linked FVG retests and projected risk/reward behavior.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━
FVG Retest Entry Engine is provided for educational and informational purposes only.
It does not constitute financial, investment, trading, legal, or tax advice.
No indicator can guarantee future results.
Markets are uncertain, conditions change, and historical behavior does not ensure future performance.
Every user is responsible for their own analysis, validation, risk management, position sizing, alert configuration, trading decisions, and broker execution.
The structure labels, FVG zones, armed-zone states, Passport values, Blocker Lens messages, grades, scores, entry references, stop-loss levels, take-profit levels, TP / SL boxes, dashboard values, completed-model labels, and alerts are visual analysis tools only.
Use this script as a structured decision-support and visual review framework, not as a promise of profitability or a substitute for independent judgment.
インジケーター

ICT Confluence Framework[BullByte]ICT Confluence Framework is a structural price-action engine that monitors the chart for five independent ICT-style behaviors and fires a directional setup only when several of them align inside a short structural window. Designed for intraday traders on 1m–15m charts in crypto, indices, and futures, with an auto-adapter that rescales every meaningful lookback to the chart timeframe.
Most ICT tools draw one element - order blocks, liquidity pools, BOS lines - and leave the trader to combine them mentally. This framework does the combining, scores the result against the current market regime and volatility phase, and prints one clean setup with an Entry, two Reference Levels, and an Invalidation level. The chart stays focused on what is currently relevant - no permanent boxes, no arrows on every candle, no flashing icons.
WHY THIS IS NOT A MASHUP
No public indicator is imported, wrapped, or re-skinned. Every detector is written from first principles against raw OHLCV. The five detectors share four custom layers that no single public indicator provides:
- A common confluence scoring layer with adaptive per-pattern weighting
- A regime classifier based on path efficiency
- A volatility-phase filter based on rolling ATR percentile rank
- A signal lifecycle manager with deterministic outcome resolution
The originality is in how five orthogonal behaviors are unified into one decision - not in the behaviors themselves.
THE FIVE BEHAVIORS MONITORED
1. Liquidity Sweep + Reclaim
Price violates a recent swing extreme - taking out resting stops - then closes back inside the prior range within a short window. The classic stop-hunt-then-reverse footprint.
2. Stopping Volume
A high-volume bar at a local extreme that closes with a strong rejection wick. Marks a level where aggressive flow was absorbed by passive flow.
3. Range Compression to Expansion
A bar that is the narrowest of its recent window is immediately followed by an expansion bar of meaningful size. A bullish expansion contributes to a bullish setup; a bearish expansion to a bearish one.
4. Break of Structure (BOS)
A close beyond the last confirmed pivot high or low. The script uses 3-bar right-confirmed pivots, so BOS prints with structural lag by design - this removes false breaks.
5. Order Block Mitigation
Price returns to the last opposing candle preceding a strong impulse, wicks into it, and closes back outside the zone.
Each behavior is detected independently against raw price and volume.
WHY THESE FIVE
At structural turning points markets do a small number of distinct things: they trap traders (sweep), they absorb flow (stopping volume), they release energy (compression-expansion), they confirm intent (BOS), and they retest origin (order block). When two or more of these align within the same structural window on the same side, the setup quality is materially higher than any one of them in isolation.
WHAT MAKES THIS DIFFERENT
Signals are stable. Detection and signal arming occur only on confirmed bar close. Once a setup prints, it does not move, redraw, or vanish on the next tick.
The script adapts to your chart. Every pattern carries a rolling reliability score calculated from its own follow-through history on the instrument and timeframe you are viewing. Follow-through is measured as maximum favorable excursion in ATR multiples over a configurable evaluation window. Patterns that have been working get more weight; patterns that have been failing get less, bounded by a user-set floor so no pattern is fully silenced.
Market regime is respected. An efficiency ratio (net displacement divided by path length) classifies the market as Trend Up, Trend Down, Range, Volatile, or Neutral. Inside this classification, BOS in a Range is soft-weighted to 0.4x and Expansion in a Volatile regime is soft-weighted to 0.5x. Counter-trend setups inside a strong trend are weighted down to 0.5x but still allowed.
Volatility phase aware. The current ATR's percentile rank classifies the bar as Quiet, Normal, or Active. Active phase tightens the required pattern count by one (capped at five). Quiet and Normal use the user's setting unchanged.
Confluence decay. A residual opposing score decays linearly by 1.0 per bar with no fresh pattern activity, so a stale opposing cluster cannot block a fresh signal indefinitely. The decayed value is also reset to zero on trade closure so the post-cooldown chart starts clean.
The chart stays clean. While no trade is active, the Hunting Layer shows what the script is monitoring. The moment a signal fires, every hunting visual that did not contribute to the signal and is not contextually inside the trade's expected path is erased. Contributors and contextual zones are recolored to the signal's direction and promoted into permanent history.
CHART EXAMPLE
1.ETH/USD 15m: Bullish Alignment: Expansion + BOS. Following a sharp bearish leg into a session low near 08:00, price entered a tight compression range between approximately 10:30 and 12:00. An expansion bar then broke above the last confirmed swing high (the LH pivot at ~11:00), firing the Compression-to-Expansion and Break of Structure detectors simultaneously. The framework printed a Bullish Alignment at 2036.60 with Invalidation at 2022.77. The market has advanced through Reference Level 1 (2050.43) and is approaching Reference Level 2 (2064.27).
2.ETH/USD 15m: Bullish High-Confluence: Sweep + BOS + OB. During a Range regime under Active volatility phase (which tightened the confluence requirement to three patterns), price swept the sellside liquidity at approximately 10:30 below a confirmed swing low. After consolidation, the entry bar at approximately 13:30 mitigated a bullish Order Block and broke above the local pivot. Three patterns aligned at signal close, firing a Bullish High-Confluence setup at 2118.34 with Invalidation at 2097.19. The market is currently advancing toward Reference Level 1 (2139.49) and Reference Level 2 (2160.64
3.ETH/USD 15m: Bearish Alignment: StopVol + BOS. Following a multi-hour consolidation between approximately 10:00 and 13:00 near the 2115–2125 area, price rejected the consolidation high with a high-volume bar at approximately 13:00, then broke below the local pivot. Stopping Volume and Break of Structure aligned on the same bar in a Volatile regime, firing a Bearish Alignment at 2110.89 with Invalidation at 2133.24. The setup is currently in progress, advancing toward Reference Level 1 (2088.54) and Reference Level 2 (2066.18), with a large sellside liquidity pool sitting in the path.
HOW TO READ THE OUTPUT
When a setup fires you will see four horizontal levels with right-side labels:
ENTRY (solid line, signal-direction color)
The closing price of the signal bar.
REFERENCE LEVEL 1 (dashed line, reference color)
Placed at 1R by default. Informational only - the setup does not close here. Useful for partial-exit planning or scaling.
REFERENCE LEVEL 2 (dashed line, reference color)
Placed at 2R by default. Reaching this level closes the setup as a success.
INVALIDATION (dotted line, invalidation color)
Placed at 3 ATR from entry by default. Reaching this level closes the setup as a failure.
Outcome and historical record
The setup closes when either Reference Level 2 or Invalidation is reached intrabar. Outcome is detected on the bar's high/low. When a single bar's range spans both levels, the setup closes on that bar; the script does not assume intrabar order, so the user should treat such ambiguous closures cautiously when reviewing historical results.
When the trade closes, right-side labels and connectors are removed and the four lines freeze at the closure bar. The signal label at the firing bar remains as a permanent record. To keep object counts within TradingView limits on long histories, the script retains the most recent 400 signal labels and the most recent 400 closed-trade lines; older items are recycled automatically.
COOLDOWN
After any trade closes, the script waits a configurable number of bars before arming the next setup. Prevents back-to-back firing on noisy moves.
THE DASHBOARD
A 9-row status panel reports:
Regime - Trend Up, Trend Down, Range, Volatile, or Neutral.
Phase - Quiet, Normal, or Active.
Pattern rows - for each of the five behaviors: rolling Activity count and a Low / Medium / High Emphasis rating based on recent follow-through reliability on this chart.
Patterns Required - the integer minimum that must align for a signal to fire on the current bar. Equal to your "Minimum Patterns Required" input in Quiet and Normal phases; tightened by one (capped at five) in Active phase.
Status - Ready, Cooldown, or Signal Active.
THE HUNTING LAYER
Drawn while no trade is active and the script is hunting for confluence:
Buyside Liquidity zones - blue boxes above swing highs.
Sellside Liquidity zones - teal boxes below swing lows.
Bullish Order Blocks - teal boxes at the last bearish candle before a strong bullish impulse.
Bearish Order Blocks - red boxes at the last bullish candle before a strong bearish impulse.
Compression bars - amber boxes on narrow-range candles.
Stopping Volume markers - amber triangles at high-volume rejection candles at local extremes.
BOS labels - text labels at confirmed structural breaks, centered on the broken level.
Sweep markers - text labels at the bar where price violated a confirmed pivot extreme, marking where liquidity was taken.
Reclaim labels - text labels at the bar where price closed back inside the prior range, confirming the sweep. Together with the Sweep marker, these tell the complete two-event Sweep+Reclaim story.
HH / HL / LH / LL pivot labels - market structure narration. Pivots are independent of the BOS module switch and are shown whenever the pivot toggle is enabled.
Duplicate BOS, Sweep, and Reclaim markers at the same price level within a recent window are automatically suppressed. Each confirmed pivot can be swept and reclaimed at most once until a new pivot forms.
At signal fire
Each active hunting item is evaluated:
- If its pattern type contributed to the signal, it is recolored to the signal's direction and promoted to history.
- If it is a liquidity zone or order block sitting inside the trade's expected path AND structurally aligned with the trade, it is promoted as context.
- Everything else is erased instantly.
At signal fire, BOS and Reclaim markers are explicitly drawn so every fired setup carries its structural anchor. The Reclaim marker is guaranteed when the Sweep pattern contributed; the BOS marker is drawn when BOS contributed and no recent BOS marker exists at the same level.
TIMEFRAME GUIDANCE
1m and 3m - high-frequency scalping on liquid pairs (BTC/USDT, ETH/USDT, NQ, ES).
5m and 15m - intraday swing entries on the same instruments and other liquid markets.
30m and above - functional but signal frequency drops noticeably; suitable for positional approaches.
The Auto-Calibrate by Timeframe input automatically scales swing lookback, ATR length, volume lookback, sweep window, stopping-volume percentile, and compression lookback. Disable only for full manual control.
HOW TO USE IT
1. Load on a clean chart. Leave Auto-Calibrate enabled.
2. Watch the Hunting Layer to see what the script is monitoring.
3. Wait for a signal label to print at bar close. The label text lists the contributing patterns.
4. The four levels appear automatically.
5. The setup auto-closes when Reference Level 2 or Invalidation is reached. After cooldown, hunting resumes.
INPUTS GUIDE
Auto-Calibrate by Timeframe - master switch that scales all lookbacks to the chart timeframe.
Pattern Modules - enable or disable any of the five detectors individually.
Core Parameters - manual swing, ATR, and volume lookbacks (used when Auto-Calibrate is OFF).
Pattern Tuning - per-pattern sensitivity controls.
Adaptive Learning - evaluation window, follow-through threshold in ATR multiples, learning memory, and minimum emphasis floor.
Regime Filter - toggle regime awareness and set its lookback.
Volatility Phase - toggle phase-based threshold tightening and set its lookback.
Confluence Decay - toggle linear decay of residual opposing scores.
Output - Quiet Mode (only High-Confluence tier fires), minimum patterns required, cooldown bars, RR for Reference Levels 1 and 2, Invalidation distance in ATR multiples, and label offset from the last bar.
Visual - color tones for bullish, bearish, reference, invalidation, and label background.
ICT Hunting Layer - individual toggles and color controls for every visual element and the legend panel.
ALERTS
Six alert conditions cover every tier and direction combination:
- Bullish High-Confluence
- Bearish High-Confluence
- Bullish Alignment
- Bearish Alignment
- Bullish Watch
- Bearish Watch
Add through the standard TradingView alert dialog.
TECHNICAL NOTES
- All pattern detection and signal arming occur on confirmed bar close. No intrabar fires, no repaint.
- No request.security() calls. No higher-timeframe lookups. No lookahead modifiers. No future leakage.
- Pivots use 3-bar right confirmation - structural lag is intentional and removes false breaks.
- The script uses one active trade slot at a time. New setups can only arm after the current one closes and cooldown expires.
- Same-bar conflict between Reference Level 2 and Invalidation resolves conservatively as invalidation. This is the honest interpretation when intrabar order is unknown.
- Object retention is bounded: 400 signal labels, 400 closed-trade lines, 400 hunting-history items. Adaptive learning memory is configurable up to 1000 bars per pattern.
WHAT THIS SCRIPT IS NOT
- Not a strategy. It does not place trades or compute P&L.
- Not a holy grail. No indicator is.
- Not a black box. Every threshold and lookback is exposed as an input.
- Not predictive. It reacts to confirmed structural events at bar close.
DISCLAIMER
This script is published as an open-source educational and analytical tool. It does not constitute financial advice, a recommendation to buy or sell any instrument, or any guarantee of future performance. Past behavior of any pattern on any chart does not guarantee future results. You are solely responsible for your trading decisions, your risk management, and your testing on a demo environment before any live use. The author and TradingView accept no liability for losses incurred from use of this script.
CREDITS
Concepts inspired by public ICT (Inner Circle Trader) educational material. All detection logic, scoring, regime classification, adaptive learning, lifecycle management, and visualization is original implementation by the author. インジケーター

BOS & CHoCHA clean, no-nonsense market structure indicator that automatically detects Break of Structure (BOS) and Change of Character (CHoCH) on any asset and any timeframe.
How it works
The script tracks swing highs and lows using pivot detection. When price breaks the last swing level, it's labeled as:
BOS — break in the direction of the current trend (continuation)
CHoCH — break against the current trend (potential reversal)
Since the logic is fully relative (pivot-based, no fixed values), it behaves identically on crypto, forex, indices, or stocks — from 1-minute charts to weekly.
Features
- BOS & CHoCH detection with clear on-chart labels
- Break confirmation mode: Close (filters fakeouts) or Wick
- Dotted extension of unbroken swing highs/lows — these act as resting liquidity targets
- Optional trend background & bar coloring
- Alerts for all four events (Bullish/Bearish BOS & CHoCH)
- Non-repainting: once printed, labels never change
Settings
Swing Length — higher values = only major structure, lower = more granular
Break Confirmation — Close is recommended to avoid wick fakeouts
Market structure is the foundation of any SMC or orderflow-based approach. Use CHoCH as an early warning for trend shifts and BOS as confirmation of continuation ideally combined with your own confluence (liquidity sweeps, volume, higher timeframe bias). インジケーター

インジケーター

Shift Structure Cloud [JOAT]Shift Structure Cloud is an open-source Pine Script v6 overlay that converts confirmed swing structure into a clean adaptive trend cloud. It tracks pivot highs and pivot lows, separates continuation breaks from character shifts, and uses the active structure range to build a dynamic average and multi-layer cloud around price.
The problem it solves is structural context. Many trend tools react only to moving averages or oscillator thresholds. This script anchors its visual state to confirmed market structure first, then uses an adaptive cloud to show whether price is trading above, below, or inside the current structural center. The result is a chart layer that can help separate continuation from transition without relying on future bars.
Core Concepts
1. Confirmed Pivot Structure
The script uses ta.pivothigh() and ta.pivotlow() to confirm swing highs and lows. A pivot is only accepted after the configured right-side confirmation window closes, which means the level is delayed by design but does not depend on unconfirmed future plotting.
pivotHigh = ta.pivothigh(high, pivotLeft, pivotRight)
pivotLow = ta.pivotlow(low, pivotLeft, pivotRight)
if not na(pivotHigh)
structureHigh := pivotHigh
2. BOS and CHoCH Logic
The current structure high and low become break reference levels. A bullish break occurs when price closes above the prior structure high. A bearish break occurs when price closes below the prior structure low. If the break happens against the previous side, it is classified as CHoCH; otherwise it is a continuation BOS.
bullBreakRaw = barstate.isconfirmed and not na(priorHigh) and close > priorHigh and priorClose <= priorHigh
bearBreakRaw = barstate.isconfirmed and not na(priorLow) and close < priorLow and priorClose >= priorLow
bullChoCh = bullBreak and trendSide == -1
bearChoCh = bearBreak and trendSide == 1
3. Adaptive Structure Average
Instead of plotting only fixed swing levels, the script calculates the midpoint between the active structure high and low. The midpoint is then smoothed with an adaptive alpha. When price moves far from the structural center, the average becomes more responsive; when price is balanced, it becomes slower.
structureMid = (activeHigh + activeLow) * 0.5
structureDrift = f_clamp(math.abs(close - structureMid) / legSize, 0.0, 1.0)
adaptAlpha = slowAlpha + (fastAlpha - slowAlpha) * structureDrift
structureAverage := structureAverage + adaptAlpha * (structureMid - structureAverage )
4. Multi-Layer Cloud
The cloud is built from ATR-adjusted bands around the adaptive structure average. Inner, middle, and outer layers give a visual read of compression, transition, and extended distance from structure.
5. Strength-Based Candle Coloring
When enabled, candles are repainted with a gradient based on distance from the structure average. The candle color is informational only; it does not change the underlying chart data.
Features
Confirmed BOS and CHoCH detection: Structural events are gated with barstate.isconfirmed
Adaptive structure average: A dynamic centerline based on active swing range and price drift
Layered trend cloud: Inner, middle, and outer ATR bands visualize distance from structure
Structure high and low levels: Current confirmed swing levels can be shown as reference lines
Gradient candle mode: Optional candle coloring by structural distance
Compact dashboard: Shows side, last shift, strength, bars since shift, and active range
Palette presets: Aqua Rose, Neon Desk, Mint Pulse, and VWAP Field
Alert conditions: Separate alerts for bullish BOS, bearish BOS, bullish CHoCH, and bearish CHoCH
Input Parameters
Visual System:
Palette Preset: Selects the bull and bear color pair
Color Candles: Enables structural candle coloring
Dashboard: Shows or hides the top-right dashboard
Pivot Dots: Shows confirmed pivot dots
Structure Engine:
Pivot Left / Pivot Right: Controls swing confirmation sensitivity
Fast Adapt Length: Fast smoothing response for the adaptive average
Slow Adapt Length: Slow smoothing response for balanced conditions
Cloud ATR Length: ATR length used for cloud width
Cloud Width: Multiplier applied to the cloud distance
BOS and CHoCH Marks: Shows structural event markers
Structure Levels: Shows active swing high and low reference lines
How to Use This Indicator
Step 1: Read the Cloud Side
If price is above the adaptive structure average and the cloud is colored bullish, the current structural state favors upside continuation. If price is below and the cloud is bearish, the state favors downside continuation.
Step 2: Watch CHoCH Events
CHoCH labels mark breaks against the previous structural side. They are useful as transition warnings, not automatic entries.
Step 3: Use the Structure Levels
The active high and low lines show where the next confirmed break could occur. These are the levels the script uses for BOS and CHoCH classification.
Step 4: Combine with Your Own Trigger
This script is designed as a structure and context layer. Use it with your own entry model, risk plan, and market selection process.
Indicator Limitations
Pivot levels confirm after the right-side pivot window closes, so they are intentionally delayed
A fast reversal can occur before a new pivot is confirmed
Cloud distance is ATR-based, so very low volatility markets can compress the visual bands
The script classifies structure; it does not predict future price movement
Originality Statement
Shift Structure Cloud combines confirmed BOS/CHoCH logic, an adaptive structure midpoint, ATR cloud geometry, and strength-colored candles in one original Pine v6 implementation. The script is not a pasted source clone. It rebuilds structure analysis from public Pine mechanics and adds a distinct visual model around the current swing range.
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. Signals and structure readings are based on historical chart data and can be wrong in live market conditions. Always use independent analysis and proper risk management.
-Made with passion by jackofalltrades
インジケーター

Market Structure (BOS / CHOCH), Advanced & ImprovedMarket Structure (BOS / CHOCH)
A clean, dual-layer market structure tool that labels Break of Structure and Change of Character from a single, internally consistent trend engine, then projects the resting liquidity those swings leave behind.
The core idea
BOS and CHOCH are the same break. What separates them is direction relative to the current trend, so this script tracks one trend state and derives the label from it:
BOS (Break of Structure) : price breaks a swing level in the direction of the trend. Continuation.
CHOCH (Change of Character) : price breaks a swing level against the trend. Reversal, and it flips the trend state.
Because both signals come from one state machine, you never get contradictory labels: a break with the trend is always BOS, a break against it is always CHOCH.
Dual-layer structure
The engine runs twice at the same time:
Swing structure (longer pivot length) : the major skeleton, drawn bold, with trailing watched-level lines and HH / HL / LH / LL swing labels.
Internal structure (shorter pivot length) : the minor continuation breaks inside each swing leg, drawn thin and faded so they read as secondary.
This lets you see a minor bullish BOS unfolding inside a major downtrend, which is the context most single-length tools miss.
Liquidity pools
Every unbroken swing high (buy-side) and swing low (sell-side) is projected to the right as a resting liquidity line, and removed the moment price wicks through it. What stays on screen is only live, untaken liquidity, the levels most likely to be targeted next.
Features
BOS / CHOCH detection with a single coherent trend state
Dual-layer swing and internal structure
Trailing lines marking the exact levels currently being watched
HH / HL / LH / LL swing labels, color coded by structural meaning
Buy-side and sell-side liquidity pools with auto removal on sweep
Top-right trend table showing the swing and internal trend state
Close or Wick break confirmation
Eight alert conditions: swing and internal, BOS and CHOCH, bullish and bearish
Inputs
Swing length and Internal length : pivot lookback for each layer. Lower values catch more structure, higher values show only major moves.
Break confirmation : Close requires a close beyond the level, Wick accepts any wick beyond it.
Toggles for BOS, CHOCH, active levels, swing labels, liquidity, internal layer and the trend table.
How to use
Trade with the swing trend, use internal CHOCH for early reversal warnings and internal BOS for continuation entries.
Watch the liquidity pools as targets, a sweep of one followed by a CHOCH in the opposite direction is a classic reversal setup.
Tune the swing length to your timeframe so the major structure matches the moves you actually trade.
Notes
Swing pivots confirm a fixed number of bars after they print, which is inherent to all structure tools and not repainting. On the live, unclosed bar a break can update until the bar closes, so set alerts to "Once Per Bar Close" for confirmed signals.
This script is a market analysis tool, not financial advice. Always do your own research and manage risk. インジケーター

Structure Bias [FlowForge]Know the structural direction on two timeframes before you trade.
Structure Bias monitors market structure simultaneously on a higher and a lower timeframe, classifies each structural event in real time, and combines both readings into a single directional verdict. It answers the question most traders try to resolve by eye: are both timeframes pointing the same way?
───────────────────
DUAL-TIMEFRAME STRUCTURE DETECTION
The indicator evaluates confirmed swings on both configured timeframes independently. Each time price clears a prior confirmed swing, the event is classified by whether it aligns with the existing directional trend or breaks against it. A Break of Structure signals that the prevailing trend is continuing: price has extended beyond a prior swing in the same direction. A Change of Character signals a potential bias shift: price has broken a prior swing against the existing trend for the first time, indicating the directional bias may be reversing. Both readings update independently per timeframe so you always have a clear picture of where each one stands.
───────────────────
ALIGNED BIAS SUMMARY
The bottom row of the dashboard synthesizes both timeframe readings into a single verdict. When the higher and lower timeframe both report the same structural direction, the row shows a confirmed aligned bias. When they conflict, it shows Mixed, flagging a structurally undecided market where lower-conviction conditions apply. The most recently updated dashboard row is highlighted automatically so you can see at a glance which event is freshest.
───────────────────
LIVE DASHBOARD
A compact two-column table delivers the complete structural picture without adding clutter to the chart.
✥ Higher timeframe CHoCH: current Change of Character reading and direction
✥ Higher timeframe BOS: current Break of Structure reading and direction
✥ Lower timeframe CHoCH: same for your trading timeframe
✥ Lower timeframe BOS: same for your trading timeframe
✥ Overall Bias: aligned directional read, or Mixed when timeframes conflict
✥ Most recent structural event highlighted automatically
───────────────────
HOW TO USE
Add the indicator to your chart and configure the two timeframes to match your setup. A common starting point is your trading timeframe as the lower and one step above it as the higher. Read the four structure rows to understand what each timeframe is doing independently. Then look at the Overall Bias row as your directional filter: a confirmed aligned reading means both timeframes agree, which is the condition most traders treat as higher-conviction. A Mixed reading means the two timeframes disagree and the structural context is less clear. Use the CHoCH alerts to be notified when the lower timeframe bias flips; use the BOS alerts when a continuation move is confirmed. Use the Aligned variants when you only want signals under full dual-timeframe agreement.
───────────────────
ALERTS
Seven alert conditions, all firing on confirmed closed bars only.
✥ Bullish CHoCH: lower timeframe bias flipped to long
✥ Bearish CHoCH: lower timeframe bias flipped to short
✥ Bullish BOS: lower timeframe uptrend continuation confirmed
✥ Bearish BOS: lower timeframe downtrend continuation confirmed
✥ Aligned BOS Bullish: both timeframes aligned, bullish continuation
✥ Aligned BOS Bearish: both timeframes aligned, bearish continuation
✥ Aligned CHoCH: both timeframes aligned, high-confluence bias flip
───────────────────
CUSTOMIZATION
✥ Higher and lower timeframes: configurable independently
✥ Swing sensitivity: adjustable lookback depth for coarser or finer structure
✥ Dashboard position: four corner options
✥ Text size: four sizes
✥ Twenty color themes
───────────────────
THEMES
Twenty palettes are available. Four samples are shown below covering the default and three contrasting options. All twenty are accessible from the Theme input in the script settings.
Colorful (default)
Vivid
Copper
Ember
インジケーター

インジケーター

SmartBreak Fibo [TraderHook]SmartBreak Fibo
Stop drawing your setups by hand. SmartBreak watches market structure in real time, and the moment price breaks a structural swing — a BOS (Break of Structure) or CHoCH (Change of Character) — it instantly maps a full Fibonacci trade plan on your chart: entry, stop, and three targets. No manual fib dragging, no guesswork on where to place levels.
How it works
The engine tracks swing highs/lows and detects every structural break (BOS / CHoCH).
On each break, a Fibonacci is anchored from the broken swing (level 1) to the opposing swing (level 0).
Entry is plotted at the 0.618 retracement, Stop-Loss at level 0 (the swing extreme).
Three take-profits sit at fib extensions 2.0 / 2.618 / 3.618 .
A green box shows the profit zone (entry → TP3), a red box shows the risk zone (entry → SL).
Why traders like it
Setups appear the instant structure breaks — you decide whether to take them, the levels are already there.
Long breaks are marked green, short breaks red — direction is readable at a glance.
Fully adjustable: entry level, all three TPs, pivot sensitivity, colors, and how many recent setups stay on screen.
"ChoCh only" mode if you prefer to trade reversals over trend continuations.
Settings
Pivot Period — structure sensitivity (higher = bigger swings only).
Entry / TP1 / TP2 / TP3 — every fib level is yours to tune.
Number of recent setups — keep the chart clean with just the latest, or show history.
Long / Short setups — toggle either side on or off.
Credits
The market-structure engine (ZigZag, swing classification, BOS/CHoCH) is based on the open-source work of TFlab , used under the Mozilla Public License 2.0. The Fibonacci trade-box system is by TraderHook. Published open-source — feel free to study and build on it.
Disclaimer
This is a visualization tool, not financial advice or a signal service. The take-profit levels are mechanical Fibonacci extensions — they do not predict that price will reach any target. Always backtest and manage your own risk before trading. インジケーター

Auto TrendLine Intelligence [BOS+CHoCH+FVG] [Rehan Khanani]================================================================
AUTO TRENDLINE INTELLIGENCE
================================================================
Auto TrendLine Intelligence is a professional-grade, institutional-level technical analysis indicator built for traders who think and operate like smart money. It combines automatic trend line detection with full Smart Money Concepts — BOS, CHoCH, and FVG — into one clean, powerful overlay.
This is not just a trend line tool. It is a complete market structure analysis system that tells you what the market is doing, why it is doing it and exactly where to enter, exit, and place your stop-loss.
================================================================
HOW IT WORKS
================================================================
The indicator runs five analytical engines simultaneously on every bar:
ENGINE 1 — AUTOMATIC TREND LINE DETECTION
The indicator automatically detects the most recent swing highs and swing lows using a pivot-based algorithm, then draws two types of trend lines in real time without any manual input:
Major Trend Lines (solid): Connect significant swing highs and swing lows using the full pivot lookback length. These represent the dominant structural trend and carry the highest weight for trading decisions.
Minor Trend Lines (dashed): Connect shorter-term pivots using a reduced lookback period. These represent intraday or near-term structure and are useful for precise entry timing.
Both lines update automatically as new pivots form. No manual drawing, no redrawing, no guesswork.
ENGINE 2 — BREAK OF STRUCTURE (BOS)
A Break of Structure is a continuation signal. It occurs when price convincingly breaks above a previous swing high (bullish BOS) or below a previous swing low (bearish BOS), confirming that the current trend is likely to continue.
Bullish BOS: price closes above the last confirmed swing high — signals trend continuation to the upside.
Bearish BOS: price closes below the last confirmed swing low — signals
trend continuation to the downside.
BOS labels appear directly on the chart at the point of the break.
ENGINE 3 — CHANGE OF CHARACTER (CHoCH)
A Change of Character is a reversal signal — the first indication that the current trend may be ending and a new one beginning. It is the most important signal in Smart Money analysis.
Bullish CHoCH: in a confirmed downtrend (lower highs, lower lows), price breaks above a recent lower high for the first time — this signals a potential reversal to the upside.
Bearish CHoCH: in a confirmed uptrend (higher highs, higher lows), price breaks below a recent higher low for the first time — this signals a potential reversal to the downside.
CHoCH labels are clearly marked on the chart and distinguished from BOS.
ENGINE 4 — FAIR VALUE GAP (FVG)
Fair Value Gaps are imbalance zones left behind by aggressive institutional buying or selling. Price frequently returns to these zones to rebalance before continuing in the original direction.
Bullish FVG: a gap between the high of the candle two bars ago and the low of the current candle — shown as a teal shaded zone.
Bearish FVG: a gap between the low of the candle two bars ago and the high of the current candle — shown as a red shaded zone.
FVG boxes automatically disappear when price returns to fill the gap (mitigation), keeping the chart clean at all times.
ENGINE 5 — LIQUIDITY ZONES
Equal highs and equal lows represent areas where institutional stop orders and limit orders are clustered. The indicator detects when two recent pivot highs or lows are at approximately the same price level and marks them with a dotted yellow line — highlighting where liquidity is likely to be swept before a major move.
================================================================
ENTRY SIGNAL SYSTEM (MULTI-FILTER CONFLUENCE)
================================================================
LONG and SHORT entry signals are generated only when ALL of the following conditions align simultaneously — ensuring institutional-grade signal quality:
For a LONG signal:
1. Price touches or approaches the support trend line within ATR buffer
2. Price is above the EMA 200 (bullish market bias confirmed)
3. RSI is not in overbought territory (momentum not exhausted)
4. Volume is above the 20-period average (institutional participation)
5. Candle closes bullish (price accepts support level)
For a SHORT signal:
1. Price touches or approaches the resistance trend line within ATR buffer
2. Price is below the EMA 200 (bearish market bias confirmed)
3. RSI is not in oversold territory (momentum not exhausted)
4. Volume is above the 20-period average (institutional participation)
5. Candle closes bearish (price rejects resistance level)
This five-layer confluence model ensures you only take trades where structure, trend, momentum, and volume all agree.
================================================================
AUTOMATIC TP1 / TP2 / SL LEVELS
================================================================
Every entry signal automatically plots:
Stop Loss: placed below/above the entry using ATR multiplier (default 1.5x ATR)
Take Profit 1 (TP1): at 50% of the full RR target — for partial exits
Take Profit 2 (TP2): at full Risk:Reward ratio target (default 2:1 RR)
All three levels are drawn as dashed lines directly on the chart with
exact price labels so you never have to calculate manually.
================================================================
INSTITUTIONAL DASHBOARD — 12 DATA POINTS
================================================================
A professional real-time dashboard is displayed in the corner of your
chart showing:
1. Market Bias — BULLISH or BEARISH based on EMA 200 position
2. Market Structure — Higher Highs/Lows | Lower Highs/Lows | Consolidation
3. EMA Stack — Bullish Stack | Bearish Stack | Mixed
4. RSI Reading — Exact value + zone (Overbought / Oversold / Neutral)
5. Volume Status — High Volume | Above Average | Below Average
6. ATR Value — Current ATR for volatility awareness
7. Support TL — Projected support trend line price at current bar
8. Resistance TL — Projected resistance trend line price at current bar
9. Fair Value Gap — Bullish FVG | Bearish FVG | None
10. SMC Event — Latest BOS or CHoCH event detected
11. Signal Status — LONG ENTRY | SHORT ENTRY | WATCHING
Dashboard position is fully adjustable: Top Right, Top Left, Bottom Right, or Bottom Left.
================================================================
FULL FEATURE LIST
================================================================
Automatic Features (Zero Manual Work Required):
- Auto major trend lines from pivot highs and lows
- Auto minor trend lines from shorter-term pivots
- Auto BOS detection and labeling
- Auto CHoCH detection and labeling
- Auto FVG zone drawing and auto-removal on mitigation
- Auto liquidity zone detection (equal highs / equal lows)
- Auto TP1, TP2, SL calculation and plotting on every signal
- Auto dashboard with 11 live market readings
Filters and Controls:
- EMA 200 trend direction filter
- EMA 50 for stack analysis
- RSI momentum filter (adjustable OB/OS levels)
- Volume spike filter (adjustable multiplier)
- ATR-based signal sensitivity buffer
- All filters individually toggleable
Visual Controls:
- Major and minor trend line toggle
- Individual color pickers for all line types
- Line width control (1 to 5)
- Extend lines right toggle
- FVG transparency control
- Dashboard position selector
Alert Conditions (9 Total):
1. LONG Entry Signal
2. SHORT Entry Signal
3. Any Entry Signal
4. Bullish BOS
5. Bearish BOS
6. Bullish CHoCH
7. Bearish CHoCH
8. Bullish FVG detected
9. Bearish FVG detected
================================================================
SETTINGS GUIDE
================================================================
Group 1 — Trend Line Settings
Pivot Lookback Length: Controls how significant a swing must be to form a trend line. Default is 10. Lower values (5-7) give more frequent lines suitable for scalping. Higher values (15-20) give fewer but stronger structural lines suitable for swing and position trading.
Show Major Trend Lines: Toggle the primary solid trend lines on/off.
Show Minor Trend Lines: Toggle the secondary dashed trend lines on/off.
Extend Lines Right: Extends all lines to the right edge of the chart.
Major Line Width: Visual thickness of major trend lines (1 to 5).
Color pickers: Customize all four line types independently.
Group 2 — Smart Money Concepts
Show BOS: Toggle Break of Structure labels on/off.
Show CHoCH: Toggle Change of Character labels on/off.
Show FVG: Toggle Fair Value Gap boxes on/off.
Show Liquidity Zones: Toggle equal high/low dotted lines on/off.
FVG Transparency: Adjust how opaque or subtle the FVG boxes appear.
Group 3 — Signal and Entry Settings
ATR Length: Period for ATR calculation (default 14).
ATR Buffer Multiplier: How close price must come to the trend line to
trigger a signal. Lower = stricter, higher = more relaxed.
Stop Loss ATR Multiplier: Distance of SL from entry in ATR units.
Risk Reward Ratio: Multiplier applied to the SL distance to set TP2.
Show TP/SL on Chart: Toggle the TP1, TP2, SL lines on/off.
Group 4 — Volume and Momentum Filter
Enable Volume Filter: When on, signals only fire on above-average volume.
Volume Spike Multiplier: Threshold multiplier over 20-period volume MA.
Enable RSI Filter: When on, blocks signals in exhausted momentum zones.
RSI Length, Overbought, Oversold: Standard RSI parameters.
Group 5 — Dashboard
Show Dashboard: Toggle the entire dashboard panel on/off.
Dashboard Position: Place it in any corner of the chart.
================================================================
HOW TO USE — STEP BY STEP
================================================================
Step 1 — Check the Dashboard
Before looking at any signal, check the dashboard. Confirm Market Bias, Structure, and EMA Stack all point in the same direction. Trade only when at least two of the three agree.
Step 2 — Identify the Trend Lines
Watch where the major trend lines are relative to current price. The support line (teal/blue) and resistance line (red) define your trading range and structural boundaries.
Step 3 — Wait for SMC Confluence
Before entering on a trend line touch, check whether a CHoCH has recently occurred in your direction. A CHoCH near a trend line is one of the highest-probability setups this indicator generates.
Step 4 — Watch for FVG Zones
If a Fair Value Gap is present near the trend line, this adds further confluence. Institutional traders frequently use FVG zones as entry triggers.
Step 5 — Enter on Signal
When a LONG or SHORT label appears, all five filters have aligned. Enter at the close of the signal candle. Your TP1, TP2, and SL levels will appear automatically on the chart.
Step 6 — Manage the Trade
Consider taking partial profits at TP1 (50% of position) and letting the remainder run to TP2. Move stop loss to breakeven after TP1 is hit.
Step 7 — Set Alerts
Use the 9 built-in alert conditions to be notified of signals and SMC events without watching the chart constantly.
================================================================
RECOMMENDED TIMEFRAMES
================================================================
Scalping: 1 minute, 5 minutes (Pivot Length 5-7)
Intraday: 15 minutes, 30 minutes, 1 Hour (Pivot Length 8-10)
Swing Trading: 4 Hour, Daily (Pivot Length 10-15)
Position Trading: Weekly (Pivot Length 15-20)
The indicator automatically adapts to any timeframe. Only the Pivot Lookback Length needs to be adjusted based on your trading style.
================================================================
COMPATIBLE MARKETS
================================================================
This indicator works on all liquid markets available on TradingView:
Forex: All major, minor, and exotic currency pairs
Crypto: Bitcoin, Ethereum, and all altcoins
Commodities: Gold (XAUUSD), Silver (XAGUSD), Oil (WTI, Brent)
Indices: S&P 500, NASDAQ, Dow Jones, FTSE, DAX, Nikkei
Stocks: Any individual equity with sufficient volume
Futures: All futures contracts available on TradingView
================================================================
WHO CAN USE THIS INDICATOR
================================================================
Beginner Traders:
The dashboard and automatic signals remove the need for manual analysis. Beginners can use the LONG and SHORT labels as guided entry points while learning how the underlying concepts work.
Intermediate Traders:
Use the BOS and CHoCH labels to understand market structure shifts and combine them with trend line touches for high-confluence entries. The FVG zones add an additional layer for precise entry timing.
Advanced and Professional Traders:
Use the full system as an institutional-grade market structure scanner. Combine BOS, CHoCH, FVG, and liquidity zones with your own HTF bias for a complete multi-confluence trading framework. The volume and RSI filters can be tuned precisely to your strategy requirements.
Algorithmic and Systematic Traders:
All 9 alert conditions can be connected to TradingView webhooks for automated notification systems or strategy integration.
Portfolio Managers and Analysts:
The dashboard provides a rapid one-glance market assessment across any asset — useful for screening multiple instruments quickly.
================================================================
IMPORTANT DISCLAIMER
================================================================
Auto TrendLine Intelligence is a technical analysis tool designed to support trading decisions. It does not guarantee future results. All trading involves risk. Always apply proper risk management, use appropriate position sizing, and conduct your own due diligence before entering any trade. Past signal performance is not indicative of future results. This indicator is not financial advice. インジケーター
