OPEN-SOURCE SCRIPT
Atualizado

Sphinx Multi-Tier SMT Detector

311
OVERVIEW

Sphinx Multi-Tier SMT Detector reads SMT divergence (Smart Money Technique) between two or three correlated instruments and reports it across two complementary structures from one shared engine. An Engine Mode input selects intraday cycle tiers, a higher-timeframe reader, or both together, so the same indicator serves a 1-minute execution chart and a Daily context chart without switching tools.

SMT divergence occurs when correlated markets disagree at a liquidity level: one instrument sweeps a prior swing high or low while a correlated one fails to confirm. That non-confirmation often marks exhaustion or a manipulation leg ahead of a reversal, and is a core read in index-futures trading (for example ES vs NQ vs YM, or their micros).

═════════════════════════════════════════════════════════

CONCEPTS

Leader and sisters. You define three correlated assets. Whichever one matches the chart symbol becomes the leader (A1); the other two become sisters (A2 and A3). Nothing is hardcoded, so any of the three can be charted and the roles reassign automatically. A toggle allows a strict two-asset comparison (A1 vs A2).

Divergence rule. On each structure the engine anchors a reference swing for the leader and records each sister's value at that same anchor bar. It latches a per-instrument swept flag the moment that instrument trades through its own reference. A divergence fires on a symmetric any-swept-not-all rule: at least one instrument takes the level but not all do. The divergence is attributed to the non-confirming sister, so a signal reads A1/A2, A1/A3, or both.

Lag rejection. If the lagging instrument had already cleared the reference between the anchor and the present, an intervening shared extreme existed and the divergence is rejected. This filters false positives from non-simultaneous sweeps.

═════════════════════════════════════════════════════════

THE TWO ENGINES

LTF Cycles. Intraday divergence on a nested cycle grid anchored to the 20:00 New York (CME futures) open: 90-minute blocks with 30-minute and 10-minute sub-cycles. T1 compares against the prior completed session extreme; T2, T3 and T4 compare against prior cycles at their respective scales. Tiers are prioritized (T1 > T2 > T3 > T4): one label per direction is arbitrated to the highest active tier, a lower tier hides while a higher one is active in the same direction, and a confirmed A1/A2 divergence takes precedence over an A3-only divergence.

HTF Multi-TF. The same divergence logic evaluated on 1H, 4H, Daily, Weekly and Monthly in parallel. It draws only the timeframe matching the chart resolution and lists every other live higher-timeframe SMT in a compact table, so a Daily divergence stays visible while you are on a 4H chart.

Mitigation. Signals invalidate and their drawings are removed once price closes through the divergent pivot, keeping the chart to currently relevant levels.

═════════════════════════════════════════════════════════

HOW TO USE

1 — Chart your leader instrument and set the three correlated assets. Turn off
the third asset for a strict two-way comparison.
2 — Choose an Engine Mode: LTF Cycles or Both for intraday execution;
HTF Multi-TF or Both for 1H-and-higher context.
3 — Read the signal. A line connects the reference swing to the divergent
extreme. The LTF label states direction, tier and diverging sister (for
example T1 A2); the HTF label and table state timeframe and pair (for
example Daily A1/A3).
4 — Treat SMT as context, not a standalone trigger. Combine it with your own
execution: a structure shift, displacement, or a fair-value-gap reclaim.

Higher tiers and higher timeframes carry more weight. A lower-tier SMT with no higher-tier or higher-timeframe backing is more prone to being an inducement.

═════════════════════════════════════════════════════════

ORIGINALITY

One engine, two structures. The same leader-sister swept-flag logic
drives both a nested intraday session/cycle model and a five-timeframe
higher-timeframe reader, from a single input rather than separate tools.
Fractal tier arbitration. Four nested intraday tiers with explicit
priority, one-label-per-direction arbitration, higher-hides-lower
suppression and A1/A2-over-A3 precedence, so a busy chart stays legible.
Automatic role assignment. No fixed instrument hierarchy; the chart
symbol is always the leader and the sisters follow, so the same settings
work on any of the correlated charts.
Sister-anchored comparison. Each sister is sampled at the leader's
exact reference bar, and an intervening shared extreme invalidates a
would-be divergence.
CME-anchored cycle grid. Intraday cycles anchor to the 20:00 NY
futures open rather than midnight, matching how index-futures sessions run.

═════════════════════════════════════════════════════════

ALERTS

Per-tier bull/bear, aggregate any-tier, all-tier alignment, and higher-timeframe bull/bear on the chart timeframe. An edge-triggered mode fires once on appearance; an optional repeat mode re-fires each bar close while a signal remains active.

═════════════════════════════════════════════════════════

LIMITATIONS

• Intended for correlated instruments (for example index futures and their
micros). Uncorrelated symbols produce meaningless divergences.
• SMT is a contextual read, not a complete trading system. Past behavior does
not guarantee future results. This is a technical tool, not financial advice.
Notas de Lançamento
UPDATE: consolidated into one multi-tier SMT tool

Merged my separate LTF Cycle & Session SMT Detector into this script, per
moderation guidance to fold related publications into one. Both sides run off
the same leader-sister divergence engine.

Added:
- Engine Mode input: LTF Cycles / HTF Multi-TF / Both.
- LTF intraday tiers T1 Session, T2 90m, T3 30m, T4 10m, anchored to the
20:00 New York (CME) open, with tier priority and one-label-per-direction
arbitration.
- Per-tier show toggles, colors and line styles for T1-T4.
- Per-tier, aggregate and all-tier alignment alerts.

The HTF Multi-Timeframe reader (1H / 4H / D / W / M) is unchanged. See the
description for full detail on how to read and use each mode.
Notas de Lançamento
Update: tier visuals now show one per band (up to two per direction)

Previously the chart showed a single SMT visual per direction - the highest-priority active tier only. Now it shows up to two per direction: the best active slot from the T1/T2 band AND the best active slot from the T3/T4 band can display at the same time.

- A T1 or T2 no longer hides a T3 or T4. They can appear together, one from each band.
- Within a band it is still one: if a T3 is shown, T4 stays hidden; if T1 is shown, T2 stays hidden.
- Asset precedence is unchanged inside each band (A1/A2 outranks A1/A3), and each band mitigates and promotes independently - if the shown higher-band tier clears, the next one in that band takes its slot.

Alerts and the all-tier alignment logic are unchanged; only which tiers draw on the chart is affected.
Notas de Lançamento
Repair labels not reading on T3/T4 SMT's
Notas de Lançamento
Adds a Display toggle to draw all active tiers simultaneously instead of
the highest ranked one per direction. Display only; default behavior
unchanged.
Notas de Lançamento
v5.6.7 - Display

Added "Show T1 and T2 together" to the Display group.

By default the T1/T2 band draws only its higher ranked slot, so a live T1
hides T2 in the same direction. With this toggle ON, T1 and T2 each draw
their own line, label and IFVG box whenever both are active, regardless
of whether either is a two-asset or third-asset-only divergence. The
T3/T4 band keeps its normal arbitration. Implied by "Show all tiers".

Expect up to three signals per direction instead of two, and expect T1
and T2 to overlap where a session reference and a 90m block reference sit
at the same level.


v5.6.6 - Correctness

Engine Mode now gates detection, not just display. Previously, selecting
"HTF Multi-TF" hid every intraday tier visual but left the four tier
state machines running, so tier alerts continued to fire with nothing
drawn. The intraday tiers now stop in that mode. "Both" and "LTF Cycles"
are unaffected.

Mitigation no longer depends on "Hide when mitigated". That input was
wrapping the whole mitigation step, so turning it off froze the tier in
its active state and blocked the swept level from producing another
signal for the rest of the session. Mitigation now always updates state;
the input governs only whether the drawing is removed, which is its
documented purpose. Drawings left on the chart keep their labels and
stop extending their IFVG box.

Signal counts change as a result. A level that mitigates can now produce
a further signal the same session, so expect more prints per day than
previous versions produced. Review against a familiar session before
relying on alert volume.

Sphinx Seal alert text corrected. The condition is T1 and T2 plus either
T3 or T4, not all four tiers, and the message now says so. Alert titles
are unchanged, so existing alerts keep working. The re-arm is now tracked
per direction, so a long-to-short flip issues its own alert instead of
being suppressed by the previous one.

Removed the "Label offset (ATRx)" input. It computed an ATR-based value
that was never applied; labels are centered on the signal line by design.
Two inaccurate tooltips corrected.
Notas de Lançamento
v5.6.7

Fixed: duplicate tier alerts on a single level. A tier slot could retire
and re-arm on the same anchor within a session, emitting a second alert
re-labeled A2 -> A3. Each tier now latches the anchor it last alerted on,
per direction, and suppresses repeats. Latches clear at the 18:00 reset.

Fixed: "T1 + T2 Confluence" required T1 to be the newly-firing leg, so a
T2 firing into a live T1 never triggered it. Now symmetric.

Both alert routes (named conditions and inline alert() calls) share the
same trigger flags. Alert titles unchanged - existing alerts keep working.

No change to signal logic, drawings, suppression, mitigation or the Seal.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.