OPEN-SOURCE SCRIPT
已更新

TraderLifestyle Structure Pro - Mechanical SMC Engine

1 568
TL 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.
發行說明
v1.3 - Robustness update for non-forex symbols (crypto, indices, metals):

- SL buffer is now universal: pip-based on forex, ATR-based (10% of ATR14) everywhere else - a fixed 3.5-pip buffer meant nothing on BTC or indices.
- Stop-loss anchor now uses the NEAREST tapped POI edge beyond price instead of the farthest one. This removes absurd setups where the stop was thousands of points away.
- New minimum risk:reward filter (default 1R, input): structurally bad signals are skipped instead of printed.
- New STRUCT EXIT: an open virtual position is closed as soon as a CHoCH flips structure against it (as in the original model - the setup is invalid at that point). This also frees the engine to take the next signal instead of being blocked forever by a stale position.
- New webhook action STRUCT_EXIT in the JSON alert stream.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。