OPEN-SOURCE SCRIPT

Apex First-Touch Predictor

558
Apex First-Touch Predictor — Which Zone Gets Hit First?

A multi-factor framework for the question every SMC trader actually asks: when price sits between an Order Block and a Fair Value Gap, which one gets touched first?

The Problem This Indicator Was Built To Solve
You spot a clean setup on the 5m chart. There's an unmitigated Order Block above. There's a Fair Value Gap below. Both are valid draws. Both are well-formed.
So which one does price hit first?

This is the question that costs SMC and ICT traders more money than any other. You enter long, expecting the OB to get tagged — price takes out the FVG instead, stops you out, then runs to the OB without you. Or the reverse. The setup wasn't wrong. The sequence was wrong.
Most SMC indicators draw the zones beautifully but tell you nothing about which side resolves first. This one tries to.

What It Does
The First-Touch Predictor analyzes six independent factors to estimate which zone — upper or lower — price is more likely to touch first from its current position:

Higher-Timeframe Bias (BOS / CHoCH detection on HTF-1 and HTF-2)
Premium / Discount Position in the HTF dealing range
Liquidity Draw (composite of equal highs/lows, prior day H/L, zone proximity)
Session / Killzone Strength (NY AM, London, NY PM, Asia, Lunch)
Recent Structural Displacement (signed body/range over last 3 bars)
Volatility Regime (ATR expansion vs contraction)

Each factor produces a signed vote in [-1, +1]. The weighted aggregate produces a directional call with a confidence estimate (capped at 75% — no market prediction deserves higher).
A Strong-Liquidity Override kicks in when one side has heavily stacked liquidity within reasonable reach. This encodes the well-known ICT principle that price tends to sweep obvious liquidity before HTF bias plays out.

What You'll See On Your Chart

Auto-detected Order Blocks with text labels (Bull OB / Bear OB) pinned to the origin candle
Auto-detected Fair Value Gaps with text labels (Bull FVG / Bear FVG) pinned to the imbalance bars
Premium / Discount zones with explicit text markings: Heavy Premium, Premium, EQ (50%), Discount, Heavy Discount — drawn as faint background bands
Directional arrow on the current bar pointing toward the predicted first-touch zone
Dashed target line marking the midpoint of the predicted zone
Info panel at middle-right showing First Target, Confidence, HTF Bias, P/D Zone, Session, Liquidity, Target Mid, and Raw Score
Tooltips on every panel row explaining what the metric means and how to interpret it

A ⚡ icon appears next to the Liquidity row when the override rule is active.

How To Use It
This is a bias-confirmation tool, not a signal generator. The intended workflow:

Identify a setup yourself using your own framework
Check the panel — does the directional call agree with your read?
When your analysis and the indicator agree: higher conviction setup, consider standard sizing
When they disagree: stand aside or wait for additional confluence
Always pre-define both scenarios — entry, stop, and target for if first-touch goes upper and if it goes lower. The indicator's job is to bias which scenario is more likely; your job is execution.

The Confidence number is meant to inform position sizing, not certainty. 65–75% means the factors are aligned. 52–58% means thin edge. Below 52% means stand aside.

Configurable Inputs

HTF-1 (Bias) timeframe — default 60m
HTF-2 (Regime) timeframe — default 240m
Swing pivot length, max zones per type, liquidity tolerance
Toggle every visual element independently (zones, labels, P/D zones, panel, arrow, target line)
All six factor weights are exposed and tunable
Strong-Liquidity Override on/off
Color customization (Material palette by default, color-blind friendly)


Built-In Alerts


High-Confidence UP Target (score crosses above +0.60)
High-Confidence DOWN Target (score crosses below -0.60)
Directional Flip (score crosses zero)


Honest Limitations You Should Know
I built this to be useful, not to oversell. Here's what it cannot do:

It is not predictive in any guaranteed sense. No indicator is. Markets are probabilistic; this tool tries to score probability, not prophesy outcomes.
It does not see news. Major economic events (CPI, FOMC, NFP) will override any structural read. Use an economic calendar alongside.
The factor weights are reasoned, not statistically optimized. Future versions may include backtested weight tuning.
Order Block detection is simplified. It catches the most common BOS-origin OB pattern; institutional-grade detection requires more nuance.
Confidence is capped at 75% by design. If you ever see a tool claim 85%+ confidence on directional calls, be skeptical.
Best on liquid instruments during major sessions. Performance degrades in low-volume hours and illiquid pairs.


Why I'm Releasing This Free
This is part of a broader project on multi-factor SMC analysis. I'd rather have thousands of traders stress-testing it on real charts and giving feedback than charge a few people for an unrefined tool. If you find it useful, drop a comment with what's working, what's not, or what factor you'd like to see added. That feedback shapes future versions.

Best Timeframes & Markets
Designed for intraday trading on the 5m, 15m, and 1H charts. Works on:

Index futures (ES, NQ, YM)
Major FX pairs (EURUSD, GBPUSD, USDJPY, etc.)
Liquid crypto (BTC, ETH)
High-volume stocks during regular trading hours

Less reliable on low-volume pairs, illiquid stocks, or weekend crypto.

Credits & Methodology
Built on Smart Money Concepts (SMC) and Inner Circle Trader (ICT) methodology — specifically: Order Blocks, Fair Value Gaps, Premium/Discount theory, liquidity engineering, killzone timing, and displacement analysis. The weighted multi-factor approach is original; the underlying concepts are not.

Disclaimer
This indicator is provided for educational and analytical purposes only. It is not financial advice. Past performance of any market structure does not guarantee future results. Always use proper risk management. Trade your own analysis, not any single indicator's output.

Engagement
Boost the script if it earns its place on your chart. Drop a comment with your timeframe, instrument, and what's working or breaking. I read every comment and the feedback shapes the next version.

免責聲明

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