PROTECTED SOURCE SCRIPT
SMC OB+HOB

Smart Money OB/HOB Indicator — Quick Guide
Use this as a field manual: what you’re seeing, how it’s decided, and which settings to use for different timeframes and trade styles.
What the tool plots
Bullish Order Block (OB) — teal box
The last small down candle before a bullish displacement/BOS. Height = candle body (default) or wick range (if you choose “Wick”).
Pin (small white dot) at the origin candle’s time to make anchoring obvious.
Bearish Order Block (OB) — red box
The last small up candle before a bearish displacement/BOS.
Hidden Order Block (HOB) — same box but yellow-tinted fill
A valid OB with one or more same-bias FVGs “ahead” (i.e., OB sits “behind” inefficiency). These tend to be stronger.
Mitigation state (fill transparency)
Unmitigated (least transparent): price hasn’t meaningfully traded back into the box. Highest priority.
Partial (more transparent): some penetration; still valid.
Full (most transparent): fully consumed; lower priority (optional to hide).
Top-K border — thin white outline
Only the best-scoring OBs/HOBs per direction are drawn to reduce clutter.
Auto-Fibs (optional)
OTE zone (0.62–0.79) — subtle purple band across the current swing leg.
0.618 / 0.705 / 0.786 — thin white horizontal lines. Confluence here adds score.
Trade idea lines (per Top-K block)
Entry — white line (mid/edge per your setting).
Stop — red line (box edge ± your pad).
TP1/TP2 — lime lines, R-based from entry→stop distance.
Label shows LONG/SHORT, entry, SL, TP1, TP2, time-stop (bars).
Note: Fair Value Gaps (FVGs) are tracked internally to classify HOBs and for pruning, not drawn to avoid noise.
How a block is qualified (in plain English)
BOS + Displacement:
Close breaks the recent swing high/low by at least N ticks and the bar shows impulse (body ≥ X·ATR and ≥ Y% of its total range).
(Settings: “Close beyond ≥ ticks”, “Min impulse body (x ATR)”, “Body/TR min %”)
Seed candle:
Look back ≤ N bars for the last opposite small-body candle (body ≤ Z% of its range). That candle’s body/wick becomes the OB height.
(Settings: “Last opposite candle within N bars”, “OB body ≤ % of TR”, “OB height model”)
Hidden OB:
Count same-bias FVGs “ahead”. If ≥ your threshold → tag the OB as HOB.
(Setting: “Require ≥ N same-bias FVGs ahead”)
Mitigation tracking:
As price trades into the box, we compute penetration %, updating unmitigated / partial / full state each bar.
Ranking (Top-K):
Every OB/HOB gets a score: near price, newer, hidden, near fib, and unmitigated boost. We draw only the Top-K per direction.
Inputs you’ll actually tweak
Timeframe
Compute on: Current (uses your chart TF) or Specific (MTF scan).
Process last N bars: reduce for speed, increase to see more history.
Anchoring
Extend: Right, Limited, or Origin only.
Limited draws boxes to a fixed number of bars so charts stay clean.
Show origin pins: Keep on so you always know the source candle.
Structure / BOS (signal frequency vs. quality)
Require FVG on break bar: ON = stricter, OFF = more signals.
Min impulse body (x ATR): higher = stricter.
Body/TR min %: higher = stricter.
Close beyond ≥ ticks: 0–1 for LTF; 1–3 for HTF.
Order Blocks
OB height model: Body (cleaner) or Wick (wider protection).
Last opposite candle within N bars: 3–8 (higher finds more).
OB body ≤ % of TR: 0.35–0.70 (lower = stricter).
Min OB height (ticks): 1–2 (avoid micro slivers).
Expire on first touch: If ON, removes boxes after first reaction.
Hidden OB
Require ≥ N FVGs ahead: 0–1 for LTF (more HOBs), 1–2 for HTF.
Mitigation Filter (what you show)
Toggle Unmitigated / Partial / Full visibility.
For precision trading, keep Unmitigated on; show others while scanning.
Auto-Fibs
Enable fib confluence: On adds score near 0.618/0.705/0.786.
Draw lines / OTE: Visual only; confluence also boosts ranking.
Tolerance (x ATR): how close price must be to count as “near fib”.
Ranking & Draw
Top-K per direction: how many OBs/HOBs you’ll see each side.
Prefer near / newer / hidden / unmitigated: scoring toggles.
Fib boost: how much fib confluence bumps a level.
Trade Ideas
Entry style: 50% of OB (balanced) or OB edge (faster fills).
Stop pad (ticks/ATR): give a little room beyond the box edge.
TP1/TP2 (R): risk-multiple targets (e.g., 1R, 2R).
Time stop (minutes): exit if it doesn’t go in time.
Execution / Alerts (recommended)
Keep on-close workflow: do not enable calc_on_every_tick.
When creating alerts, choose Once per bar close.
How to use it (mechanical checklist)
Scan: Focus on Top-K boxes. HOBs (yellow-tinted) and unmitigated get first look.
Context (optional): If you like, also check HTF structure or obvious liquidity pools (equal highs/lows).
Confluence: Prefer boxes near 0.618/0.705/0.786 or inside the OTE band.
Trigger: Let the bar close. If entry line is touched next, you have a go-signal with a placed stop and R-targets.
Manage: If TP1 hits, move SL to BE. For HOBs, consider a runner (trail under minor swing/FVG) — they often travel further.
Time stop: If it hasn’t moved within N minutes/bars, cut it; don’t babysit.
Preset recipes (copy these settings)
1) Hyper-Scalp (1–3m) — frequent, fast
Structure / BOS:
FVG on break = OFF | Min impulse = 0.6–0.8 | Body/TR = 0.45–0.55 | Close beyond = 0–1
Order Blocks:
Opposite lookback = 5–6 | OB body ≤ 0.55–0.60 | Min height = 1
HOB: Need FVGs = 0–1
Mitigation view: Show Unmit/Partial, optionally Full while scanning
Ranking: Top-K = 4–6, prefer near/new/hidden/unmit = ON, Fib boost = 0.6–1.0
Trade Ideas: Entry = OB edge, Stop pad = 1–2 ticks, Time stop = 5–8 min
Execution: On bar close alerts
2) Intraday (5–15m) — balanced
Structure / BOS:
FVG on break = OFF | Min impulse = 0.8–1.0 | Body/TR = 0.55–0.60 | Close beyond = 1
Order Blocks:
Opposite lookback = 4–5 | OB body ≤ 0.50–0.55 | Min height = 1–2
HOB: Need FVGs = 1
Ranking: Top-K = 3–4, Fib boost = 1.0–1.5
Trade Ideas: Entry = 50%, Stop pad = 2–3 ticks, Time stop = 10–20 min
3) Swing (1H–4H) — selective, higher quality
Structure / BOS:
FVG on break = ON | Min impulse = ≥1.0 | Body/TR = ≥0.65 | Close beyond = 1–3
Order Blocks:
Opposite lookback = 3–4 | OB body ≤ 0.45–0.50 | Min height = 2–4
HOB: Need FVGs = 1–2
Ranking: Top-K = 2–3, Fib boost = 1.5–2.0
Trade Ideas: Entry = 50%, Stop pad = a few ticks + ATR pad, Time stop = few bars
4) HTF (Daily+) — very selective
Keep swing settings, increase Min impulse and Close beyond a bit, reduce Top-K to 1–2.
Priority rules (what to trade first)
HOB over OB
Unmitigated over partial/full
With fib confluence over without
Near price and recent over far/old
Favor levels that follow a sweep (equal highs/lows taken, then return to your box)
If two boxes tie, take the one with the cleaner origin candle and simpler path to TP (fewer nearby obstacles).
Troubleshooting & tips
“I’m not seeing many signals.”
Loosen Structure/BOS (lower ATR and Body/TR), increase Opposite lookback, allow Partial/Full in view, raise Top-K.
“Too many lines/boxes.”
Lower Top-K, use Limited extension (Anchoring), hide Partial/Full, and keep fib lines if you rely on confluence.
“Stuff looks offset.”
Keep origin pins on. Use xloc.bar_time (already in code) and avoid custom time compressions that desync objects.
Execution discipline:
Use on-close alerts. Respect time stops. Size by fixed risk per trade, not fixed leverage.
Use this as a field manual: what you’re seeing, how it’s decided, and which settings to use for different timeframes and trade styles.
What the tool plots
Bullish Order Block (OB) — teal box
The last small down candle before a bullish displacement/BOS. Height = candle body (default) or wick range (if you choose “Wick”).
Pin (small white dot) at the origin candle’s time to make anchoring obvious.
Bearish Order Block (OB) — red box
The last small up candle before a bearish displacement/BOS.
Hidden Order Block (HOB) — same box but yellow-tinted fill
A valid OB with one or more same-bias FVGs “ahead” (i.e., OB sits “behind” inefficiency). These tend to be stronger.
Mitigation state (fill transparency)
Unmitigated (least transparent): price hasn’t meaningfully traded back into the box. Highest priority.
Partial (more transparent): some penetration; still valid.
Full (most transparent): fully consumed; lower priority (optional to hide).
Top-K border — thin white outline
Only the best-scoring OBs/HOBs per direction are drawn to reduce clutter.
Auto-Fibs (optional)
OTE zone (0.62–0.79) — subtle purple band across the current swing leg.
0.618 / 0.705 / 0.786 — thin white horizontal lines. Confluence here adds score.
Trade idea lines (per Top-K block)
Entry — white line (mid/edge per your setting).
Stop — red line (box edge ± your pad).
TP1/TP2 — lime lines, R-based from entry→stop distance.
Label shows LONG/SHORT, entry, SL, TP1, TP2, time-stop (bars).
Note: Fair Value Gaps (FVGs) are tracked internally to classify HOBs and for pruning, not drawn to avoid noise.
How a block is qualified (in plain English)
BOS + Displacement:
Close breaks the recent swing high/low by at least N ticks and the bar shows impulse (body ≥ X·ATR and ≥ Y% of its total range).
(Settings: “Close beyond ≥ ticks”, “Min impulse body (x ATR)”, “Body/TR min %”)
Seed candle:
Look back ≤ N bars for the last opposite small-body candle (body ≤ Z% of its range). That candle’s body/wick becomes the OB height.
(Settings: “Last opposite candle within N bars”, “OB body ≤ % of TR”, “OB height model”)
Hidden OB:
Count same-bias FVGs “ahead”. If ≥ your threshold → tag the OB as HOB.
(Setting: “Require ≥ N same-bias FVGs ahead”)
Mitigation tracking:
As price trades into the box, we compute penetration %, updating unmitigated / partial / full state each bar.
Ranking (Top-K):
Every OB/HOB gets a score: near price, newer, hidden, near fib, and unmitigated boost. We draw only the Top-K per direction.
Inputs you’ll actually tweak
Timeframe
Compute on: Current (uses your chart TF) or Specific (MTF scan).
Process last N bars: reduce for speed, increase to see more history.
Anchoring
Extend: Right, Limited, or Origin only.
Limited draws boxes to a fixed number of bars so charts stay clean.
Show origin pins: Keep on so you always know the source candle.
Structure / BOS (signal frequency vs. quality)
Require FVG on break bar: ON = stricter, OFF = more signals.
Min impulse body (x ATR): higher = stricter.
Body/TR min %: higher = stricter.
Close beyond ≥ ticks: 0–1 for LTF; 1–3 for HTF.
Order Blocks
OB height model: Body (cleaner) or Wick (wider protection).
Last opposite candle within N bars: 3–8 (higher finds more).
OB body ≤ % of TR: 0.35–0.70 (lower = stricter).
Min OB height (ticks): 1–2 (avoid micro slivers).
Expire on first touch: If ON, removes boxes after first reaction.
Hidden OB
Require ≥ N FVGs ahead: 0–1 for LTF (more HOBs), 1–2 for HTF.
Mitigation Filter (what you show)
Toggle Unmitigated / Partial / Full visibility.
For precision trading, keep Unmitigated on; show others while scanning.
Auto-Fibs
Enable fib confluence: On adds score near 0.618/0.705/0.786.
Draw lines / OTE: Visual only; confluence also boosts ranking.
Tolerance (x ATR): how close price must be to count as “near fib”.
Ranking & Draw
Top-K per direction: how many OBs/HOBs you’ll see each side.
Prefer near / newer / hidden / unmitigated: scoring toggles.
Fib boost: how much fib confluence bumps a level.
Trade Ideas
Entry style: 50% of OB (balanced) or OB edge (faster fills).
Stop pad (ticks/ATR): give a little room beyond the box edge.
TP1/TP2 (R): risk-multiple targets (e.g., 1R, 2R).
Time stop (minutes): exit if it doesn’t go in time.
Execution / Alerts (recommended)
Keep on-close workflow: do not enable calc_on_every_tick.
When creating alerts, choose Once per bar close.
How to use it (mechanical checklist)
Scan: Focus on Top-K boxes. HOBs (yellow-tinted) and unmitigated get first look.
Context (optional): If you like, also check HTF structure or obvious liquidity pools (equal highs/lows).
Confluence: Prefer boxes near 0.618/0.705/0.786 or inside the OTE band.
Trigger: Let the bar close. If entry line is touched next, you have a go-signal with a placed stop and R-targets.
Manage: If TP1 hits, move SL to BE. For HOBs, consider a runner (trail under minor swing/FVG) — they often travel further.
Time stop: If it hasn’t moved within N minutes/bars, cut it; don’t babysit.
Preset recipes (copy these settings)
1) Hyper-Scalp (1–3m) — frequent, fast
Structure / BOS:
FVG on break = OFF | Min impulse = 0.6–0.8 | Body/TR = 0.45–0.55 | Close beyond = 0–1
Order Blocks:
Opposite lookback = 5–6 | OB body ≤ 0.55–0.60 | Min height = 1
HOB: Need FVGs = 0–1
Mitigation view: Show Unmit/Partial, optionally Full while scanning
Ranking: Top-K = 4–6, prefer near/new/hidden/unmit = ON, Fib boost = 0.6–1.0
Trade Ideas: Entry = OB edge, Stop pad = 1–2 ticks, Time stop = 5–8 min
Execution: On bar close alerts
2) Intraday (5–15m) — balanced
Structure / BOS:
FVG on break = OFF | Min impulse = 0.8–1.0 | Body/TR = 0.55–0.60 | Close beyond = 1
Order Blocks:
Opposite lookback = 4–5 | OB body ≤ 0.50–0.55 | Min height = 1–2
HOB: Need FVGs = 1
Ranking: Top-K = 3–4, Fib boost = 1.0–1.5
Trade Ideas: Entry = 50%, Stop pad = 2–3 ticks, Time stop = 10–20 min
3) Swing (1H–4H) — selective, higher quality
Structure / BOS:
FVG on break = ON | Min impulse = ≥1.0 | Body/TR = ≥0.65 | Close beyond = 1–3
Order Blocks:
Opposite lookback = 3–4 | OB body ≤ 0.45–0.50 | Min height = 2–4
HOB: Need FVGs = 1–2
Ranking: Top-K = 2–3, Fib boost = 1.5–2.0
Trade Ideas: Entry = 50%, Stop pad = a few ticks + ATR pad, Time stop = few bars
4) HTF (Daily+) — very selective
Keep swing settings, increase Min impulse and Close beyond a bit, reduce Top-K to 1–2.
Priority rules (what to trade first)
HOB over OB
Unmitigated over partial/full
With fib confluence over without
Near price and recent over far/old
Favor levels that follow a sweep (equal highs/lows taken, then return to your box)
If two boxes tie, take the one with the cleaner origin candle and simpler path to TP (fewer nearby obstacles).
Troubleshooting & tips
“I’m not seeing many signals.”
Loosen Structure/BOS (lower ATR and Body/TR), increase Opposite lookback, allow Partial/Full in view, raise Top-K.
“Too many lines/boxes.”
Lower Top-K, use Limited extension (Anchoring), hide Partial/Full, and keep fib lines if you rely on confluence.
“Stuff looks offset.”
Keep origin pins on. Use xloc.bar_time (already in code) and avoid custom time compressions that desync objects.
Execution discipline:
Use on-close alerts. Respect time stops. Size by fixed risk per trade, not fixed leverage.
保護スクリプト
このスクリプトのソースコードは非公開で投稿されています。 無料かつ制限なしでご利用いただけます ― 詳細についてはこちらをご覧ください。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
保護スクリプト
このスクリプトのソースコードは非公開で投稿されています。 無料かつ制限なしでご利用いただけます ― 詳細についてはこちらをご覧ください。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。