OPEN-SOURCE SCRIPT
MTF SMC Signal v2 - Ready/Fire & Confluence Score

Overview
This indicator generates long/short signals by combining higher-timeframe directional bias with a two-stage confirmation process on the execution timeframe: a Fair Value Gap (FVG) retest ("Ready") followed by a reversal-pattern confirmation ("Fire"). It also computes a 0-100 confluence score from market structure, FVG quality, and premium/discount positioning, and displays everything in an on-chart dashboard with entry/stop/target levels.
How it works
・Bias (HTF/MTF only): Directional bias is derived exclusively from EMA slope/position on two higher timeframes (auto-selected as 1H/4H or 15M/1H depending on the execution mode, or manually overridden). The execution timeframe is intentionally excluded from bias calculation, since EMA-based readings on a fast timeframe tend to lag and produce false flips. Instead, the execution timeframe is reserved entirely for pattern confirmation.
・Structure events: Pivot-based swing highs/lows are tracked to detect Change of Character (CHoCH) and Break of Structure (BOS) events, which set/confirm the working bias and anchor a countdown window ("setup window") during which a trade idea remains valid.
・FVG detection and Ready state: Three-bar imbalances (Fair Value Gaps) are detected using the same bullish/bearish three-bar gap rule popularized by LuxAlgo's open-source "Fair Value Gap [LuxAlgo]" script (gaps above a minimum ATR-based size are plotted as boxes here, instead of that script's percentage-based threshold). When price returns to retest an untouched FVG in the direction of the current bias, the signal enters a "Ready" state.
・Fire confirmation: A "Ready" signal only fires once a reversal confirmation occurs - a bullish/bearish engulfing candle, a pin bar, a fresh micro CHoCH/BOS, or a breakout of the recent range on a lower confirmation timeframe (configurable). This two-step Ready→Fire sequence is designed to reduce premature entries on a bare FVG touch, which the original FVG script does not implement.
・FVG grading: Each FVG used as entry basis is graded S/A/B: Grade S if it overlaps a still-open daily-timeframe FVG, Grade A if price is on the correct side of the recent range's equilibrium (premium/discount), Grade B otherwise. This grade feeds into the confluence score.
・Confluence score (fs): A 0-100 score is calculated from a weighted combination of a "setup" sub-score (structure freshness, FVG proximity, premium/discount alignment) and an "exec" sub-score (recency of the triggering event, retest precision). A signal only reaches "entry candidate" status once the score clears a configurable (or auto-selected) threshold.
・Risk levels: On a confirmed fire, the script plots an entry line and two stop-loss references (most recent swing point, and the FVG boundary when available) along with two take-profit levels based on a user-defined risk-multiple, plus an approximate dollar-risk conversion using lot size and pip value inputs.
・Dashboard: An on-chart table shows current bias, the recommended action in plain language, the higher-timeframe directions, Ready/Fire state, the confluence score versus its threshold, FVG grade, and stop levels, in either a full or mobile-condensed layout with several color presets.
Originality
The three-bar FVG detection rule used here (gap test plus close confirmation on the middle bar) follows the same bullish/bearish definition used in LuxAlgo's open-source script "Fair Value Gap [LuxAlgo]". Credit to LuxAlgo for that detection logic. Beyond that shared detection rule, everything else in this script is an original addition not present in the LuxAlgo script:
・An ATR-based size filter in place of the original's percentage-based threshold.
・A two-stage Ready→Fire workflow that separates "FVG retest" from "reversal confirmed" using candlestick patterns, micro structure breaks, or a lower-timeframe range break - the LuxAlgo script only tracks mitigation/fill, with no retest-and-confirm signal logic.
・An S/A/B grading system for FVGs based on daily-timeframe FVG overlap and premium/discount alignment, feeding into a weighted 0-100 confluence score - not present in the original.
・A bias model that deliberately restricts directional judgment to higher timeframes only, while delegating all execution-timeframe analysis to pattern/structure confirmation.
・A dual stop-loss reference (swing-based and FVG-based) with an approximate monetary-risk readout, automated entry/SL/TP line and label drawing, and a full on-chart decision dashboard - none of which exist in the original FVG script, which is a standalone FVG-plotting tool without a signal or risk-management layer.
This script is published open-source, in line with the reuse terms for the underlying open-source FVG concept.
How to use
1.Choose the execution mode (5 or 15 minutes); higher timeframes for bias are auto-selected accordingly, or can be manually overridden.
2.Watch the dashboard's "Action" cell: it summarizes the current state in plain language (e.g., "waiting for setup," "Ready - waiting for reversal confirm," "check arrow - consider entry").
3.A triangle marker appears on the chart only when a signal reaches "entry candidate" status (bias aligned across higher timeframes, Ready→Fire confirmed or a sufficiently strong setup score, confluence score above threshold, no opposing FVG nearby, and outside the cooldown window).
4.When a marker appears, entry/stop/target lines and labels are drawn automatically; the dollar-risk figures depend on the lot size and pip value you configure for your broker/instrument.
5.The "FVG grade" and "fs" (confluence score) cells let you gauge signal quality even outside a firing bar, useful for anticipating upcoming setups.
6.Optional alerts can be configured to fire on "entry candidate" and "structure break" events via the alert() payload.
Backtest/forward-test before live use. This is a signal/analysis tool, not financial advice, and past structure or score behavior does not guarantee future results.
説明文(日本語版)
概要
本インジケーターは、上位タイムフレームで判定した方向性バイアスと、執行タイムフレーム上の2段階確認プロセス(FVG「リテスト=Ready」→ 反転パターン確認「Fire」)を組み合わせて売買シグナルを生成します。また、構造・FVG品質・プレミアム/ディスカウント位置から0〜100のコンフルエンス(複合)スコアを算出し、チャート上のダッシュボードにエントリー/ストップ/ターゲットのレベルとともに表示します。
ロジックの説明
○バイアス判定(HTF/MTFのみ): 方向性バイアスは2つの上位タイムフレーム(執行モードに応じて1H/4Hまたは15M/1Hを自動選択、手動上書きも可)でのEMAの傾き・位置のみから判定します。執行タイムフレームでのEMA判定は遅行しやすく偽の反転を生みやすいため、意図的にバイアス判定から除外し、執行タイムフレームはパターン確認専用としています。
○構造イベント: ピボットによるスイング高安からCHoCH(性質変化)とBOS(構造ブレイク)を検出し、これによりバイアスの確定/継続判定と、セットアップが有効とみなされる期間(setup window)の起点を設定します。
○FVG検出とReady状態: LuxAlgoのオープンソーススクリプト「Fair Value Gap [LuxAlgo]」で広く知られるようになった、3本足での強気/弱気ギャップ判定ルールと同じ定義でFVGを検出します(サイズフィルターは、元スクリプトのパーセンテージ閾値の代わりにATRベースの最小サイズを使用)。未接触のFVGに現在のバイアス方向で価格が戻ってきた際に「Ready」状態に入ります。
○Fire確認: Ready状態は、反転確認(包み足、ピンバー、新規ミニCHoCH/BOS、または設定可能な下位確認タイムフレームでの直近レンジブレイク)が成立した時点でのみ「Fire」します。この2段階フローにより、FVGへの単純な接触だけでの早すぎるエントリーを抑制する設計です(元のLuxAlgoスクリプトにはこのリテスト確認の仕組みはありません)。
○FVGグレーディング: エントリーの根拠としたFVGをS/A/Bでグレード付けします。未決済の日足FVGと重なる場合はグレードS、価格が直近レンジの均衡点に対して正しい側(プレミアム/ディスカウント)にある場合はグレードA、それ以外はグレードBとし、このグレードがコンフルエンススコアに反映されます。
○コンフルエンススコア(fs): 「setup」サブスコア(構造の新鮮さ、FVGとの近接度、プレミアム/ディスカウント整合)と「exec」サブスコア(トリガーイベントの直近性、リテスト精度)を加重統合し、0〜100のスコアを算出します。このスコアが設定(または自動選択)された閾値を超えた場合のみ「エントリー候補」となります。
○リスクレベル: Fire確定時、直近スイング点とFVG境界(利用可能な場合)の2種類のストップロス基準、ユーザー設定のリスク倍率に基づく2つのテイクプロフィットレベルをライン表示し、ロットサイズとpip価値の入力からおおよそのドル損失額も併記します。
○ダッシュボード: 現在のバイアス、平易な表現での推奨アクション、上位タイムフレームの方向、Ready/Fire状態、閾値に対するコンフルエンススコア、FVGグレード、ストップレベルなどをテーブルで表示します。フル/モバイル簡易表示と複数のカラープリセットを選択可能です。
オリジナリティ
本スクリプトのFVG検出ルール(3本足でのギャップ判定+中間バーの終値確認)は、LuxAlgoのオープンソーススクリプト「Fair Value Gap [LuxAlgo]」で使われている強気/弱気の定義をそのまま踏襲しています。この検出ロジックについてLuxAlgo氏にクレジットを表します。この共通の検出ルールを除き、本スクリプトの以下の要素はLuxAlgoのスクリプトには存在しない独自の追加部分です:
・元スクリプトのパーセンテージ閾値の代わりに、ATRベースのサイズフィルターを使用している点。
・「FVGリテスト」と「反転確認(ローソク足パターン、ミニ構造ブレイク、下位タイムフレームのレンジブレイク)」を分離した2段階のReady→Fireワークフロー。元のLuxAlgoスクリプトはミティゲーション(FVGの消化)の追跡のみで、リテスト確認やシグナルロジックは持っていません。
・日足FVGとの重なりおよびプレミアム/ディスカウント整合に基づくS/A/BのFVGグレーディングと、それを反映した加重0〜100のコンフルエンススコア(元スクリプトには存在しません)。
・方向判定を上位タイムフレームのみに意図的に限定し、執行タイムフレームの分析はすべてパターン/構造確認に委ねるバイアスモデル。
・スイング基準とFVG基準の2系統ストップロス参照、おおよその金額換算リスク表示、エントリー/SL/TPラインとラベルの自動描画、チャート上の総合判断ダッシュボード。これらは、シグナルやリスク管理機能を持たない単体のFVG描画ツールである元のLuxAlgoスクリプトには存在しません。
本スクリプトはオープンソースで公開しており、これは元となるオープンソースのFVG検出概念の再利用条件にも準拠するものです。
使い方
1.執行モード(5分または15分)を選択します。上位タイムフレームは自動的に対応するものが選ばれますが、手動上書きも可能です。
2.ダッシュボードの「Action」セルを確認してください。現在の状態が平易な表現で表示されます(例:「MTF整合済み・setup待ち」「反転確認待ち(Ready)」「矢印を確認・エントリー検討」など)。
3.チャート上の三角マーカーは、シグナルが「entry_candidate」状態に達したときのみ表示されます(上位タイムフレームでのバイアス整合、Ready→Fire確認または十分なセットアップスコア、コンフルエンススコアが閾値超え、反対側FVGが近接していない、クールダウン期間外であること、をすべて満たす場合)。
4.マーカー表示時、エントリー/ストップ/ターゲットのラインとラベルが自動描画されます。ドル損失額の表示は、ご自身のブローカー・銘柄に応じて設定するロットサイズとpip価値の入力値に依存します。
5.「FVG grade」「fs」セルは、シグナル発火前でも信号の質を把握する手がかりとなり、今後のセットアップを予測する際に活用できます。
6.alert()ペイロードにより、「entry_candidate」「structure_break」イベント発生時にアラートを設定できます。
実運用前にバックテスト・フォワードテストを行ってください。本スクリプトはシグナル・分析ツールであり、投資助言ではありません。過去の構造やスコアの挙動が将来の結果を保証するものではありません。
This indicator generates long/short signals by combining higher-timeframe directional bias with a two-stage confirmation process on the execution timeframe: a Fair Value Gap (FVG) retest ("Ready") followed by a reversal-pattern confirmation ("Fire"). It also computes a 0-100 confluence score from market structure, FVG quality, and premium/discount positioning, and displays everything in an on-chart dashboard with entry/stop/target levels.
How it works
・Bias (HTF/MTF only): Directional bias is derived exclusively from EMA slope/position on two higher timeframes (auto-selected as 1H/4H or 15M/1H depending on the execution mode, or manually overridden). The execution timeframe is intentionally excluded from bias calculation, since EMA-based readings on a fast timeframe tend to lag and produce false flips. Instead, the execution timeframe is reserved entirely for pattern confirmation.
・Structure events: Pivot-based swing highs/lows are tracked to detect Change of Character (CHoCH) and Break of Structure (BOS) events, which set/confirm the working bias and anchor a countdown window ("setup window") during which a trade idea remains valid.
・FVG detection and Ready state: Three-bar imbalances (Fair Value Gaps) are detected using the same bullish/bearish three-bar gap rule popularized by LuxAlgo's open-source "Fair Value Gap [LuxAlgo]" script (gaps above a minimum ATR-based size are plotted as boxes here, instead of that script's percentage-based threshold). When price returns to retest an untouched FVG in the direction of the current bias, the signal enters a "Ready" state.
・Fire confirmation: A "Ready" signal only fires once a reversal confirmation occurs - a bullish/bearish engulfing candle, a pin bar, a fresh micro CHoCH/BOS, or a breakout of the recent range on a lower confirmation timeframe (configurable). This two-step Ready→Fire sequence is designed to reduce premature entries on a bare FVG touch, which the original FVG script does not implement.
・FVG grading: Each FVG used as entry basis is graded S/A/B: Grade S if it overlaps a still-open daily-timeframe FVG, Grade A if price is on the correct side of the recent range's equilibrium (premium/discount), Grade B otherwise. This grade feeds into the confluence score.
・Confluence score (fs): A 0-100 score is calculated from a weighted combination of a "setup" sub-score (structure freshness, FVG proximity, premium/discount alignment) and an "exec" sub-score (recency of the triggering event, retest precision). A signal only reaches "entry candidate" status once the score clears a configurable (or auto-selected) threshold.
・Risk levels: On a confirmed fire, the script plots an entry line and two stop-loss references (most recent swing point, and the FVG boundary when available) along with two take-profit levels based on a user-defined risk-multiple, plus an approximate dollar-risk conversion using lot size and pip value inputs.
・Dashboard: An on-chart table shows current bias, the recommended action in plain language, the higher-timeframe directions, Ready/Fire state, the confluence score versus its threshold, FVG grade, and stop levels, in either a full or mobile-condensed layout with several color presets.
Originality
The three-bar FVG detection rule used here (gap test plus close confirmation on the middle bar) follows the same bullish/bearish definition used in LuxAlgo's open-source script "Fair Value Gap [LuxAlgo]". Credit to LuxAlgo for that detection logic. Beyond that shared detection rule, everything else in this script is an original addition not present in the LuxAlgo script:
・An ATR-based size filter in place of the original's percentage-based threshold.
・A two-stage Ready→Fire workflow that separates "FVG retest" from "reversal confirmed" using candlestick patterns, micro structure breaks, or a lower-timeframe range break - the LuxAlgo script only tracks mitigation/fill, with no retest-and-confirm signal logic.
・An S/A/B grading system for FVGs based on daily-timeframe FVG overlap and premium/discount alignment, feeding into a weighted 0-100 confluence score - not present in the original.
・A bias model that deliberately restricts directional judgment to higher timeframes only, while delegating all execution-timeframe analysis to pattern/structure confirmation.
・A dual stop-loss reference (swing-based and FVG-based) with an approximate monetary-risk readout, automated entry/SL/TP line and label drawing, and a full on-chart decision dashboard - none of which exist in the original FVG script, which is a standalone FVG-plotting tool without a signal or risk-management layer.
This script is published open-source, in line with the reuse terms for the underlying open-source FVG concept.
How to use
1.Choose the execution mode (5 or 15 minutes); higher timeframes for bias are auto-selected accordingly, or can be manually overridden.
2.Watch the dashboard's "Action" cell: it summarizes the current state in plain language (e.g., "waiting for setup," "Ready - waiting for reversal confirm," "check arrow - consider entry").
3.A triangle marker appears on the chart only when a signal reaches "entry candidate" status (bias aligned across higher timeframes, Ready→Fire confirmed or a sufficiently strong setup score, confluence score above threshold, no opposing FVG nearby, and outside the cooldown window).
4.When a marker appears, entry/stop/target lines and labels are drawn automatically; the dollar-risk figures depend on the lot size and pip value you configure for your broker/instrument.
5.The "FVG grade" and "fs" (confluence score) cells let you gauge signal quality even outside a firing bar, useful for anticipating upcoming setups.
6.Optional alerts can be configured to fire on "entry candidate" and "structure break" events via the alert() payload.
Backtest/forward-test before live use. This is a signal/analysis tool, not financial advice, and past structure or score behavior does not guarantee future results.
説明文(日本語版)
概要
本インジケーターは、上位タイムフレームで判定した方向性バイアスと、執行タイムフレーム上の2段階確認プロセス(FVG「リテスト=Ready」→ 反転パターン確認「Fire」)を組み合わせて売買シグナルを生成します。また、構造・FVG品質・プレミアム/ディスカウント位置から0〜100のコンフルエンス(複合)スコアを算出し、チャート上のダッシュボードにエントリー/ストップ/ターゲットのレベルとともに表示します。
ロジックの説明
○バイアス判定(HTF/MTFのみ): 方向性バイアスは2つの上位タイムフレーム(執行モードに応じて1H/4Hまたは15M/1Hを自動選択、手動上書きも可)でのEMAの傾き・位置のみから判定します。執行タイムフレームでのEMA判定は遅行しやすく偽の反転を生みやすいため、意図的にバイアス判定から除外し、執行タイムフレームはパターン確認専用としています。
○構造イベント: ピボットによるスイング高安からCHoCH(性質変化)とBOS(構造ブレイク)を検出し、これによりバイアスの確定/継続判定と、セットアップが有効とみなされる期間(setup window)の起点を設定します。
○FVG検出とReady状態: LuxAlgoのオープンソーススクリプト「Fair Value Gap [LuxAlgo]」で広く知られるようになった、3本足での強気/弱気ギャップ判定ルールと同じ定義でFVGを検出します(サイズフィルターは、元スクリプトのパーセンテージ閾値の代わりにATRベースの最小サイズを使用)。未接触のFVGに現在のバイアス方向で価格が戻ってきた際に「Ready」状態に入ります。
○Fire確認: Ready状態は、反転確認(包み足、ピンバー、新規ミニCHoCH/BOS、または設定可能な下位確認タイムフレームでの直近レンジブレイク)が成立した時点でのみ「Fire」します。この2段階フローにより、FVGへの単純な接触だけでの早すぎるエントリーを抑制する設計です(元のLuxAlgoスクリプトにはこのリテスト確認の仕組みはありません)。
○FVGグレーディング: エントリーの根拠としたFVGをS/A/Bでグレード付けします。未決済の日足FVGと重なる場合はグレードS、価格が直近レンジの均衡点に対して正しい側(プレミアム/ディスカウント)にある場合はグレードA、それ以外はグレードBとし、このグレードがコンフルエンススコアに反映されます。
○コンフルエンススコア(fs): 「setup」サブスコア(構造の新鮮さ、FVGとの近接度、プレミアム/ディスカウント整合)と「exec」サブスコア(トリガーイベントの直近性、リテスト精度)を加重統合し、0〜100のスコアを算出します。このスコアが設定(または自動選択)された閾値を超えた場合のみ「エントリー候補」となります。
○リスクレベル: Fire確定時、直近スイング点とFVG境界(利用可能な場合)の2種類のストップロス基準、ユーザー設定のリスク倍率に基づく2つのテイクプロフィットレベルをライン表示し、ロットサイズとpip価値の入力からおおよそのドル損失額も併記します。
○ダッシュボード: 現在のバイアス、平易な表現での推奨アクション、上位タイムフレームの方向、Ready/Fire状態、閾値に対するコンフルエンススコア、FVGグレード、ストップレベルなどをテーブルで表示します。フル/モバイル簡易表示と複数のカラープリセットを選択可能です。
オリジナリティ
本スクリプトのFVG検出ルール(3本足でのギャップ判定+中間バーの終値確認)は、LuxAlgoのオープンソーススクリプト「Fair Value Gap [LuxAlgo]」で使われている強気/弱気の定義をそのまま踏襲しています。この検出ロジックについてLuxAlgo氏にクレジットを表します。この共通の検出ルールを除き、本スクリプトの以下の要素はLuxAlgoのスクリプトには存在しない独自の追加部分です:
・元スクリプトのパーセンテージ閾値の代わりに、ATRベースのサイズフィルターを使用している点。
・「FVGリテスト」と「反転確認(ローソク足パターン、ミニ構造ブレイク、下位タイムフレームのレンジブレイク)」を分離した2段階のReady→Fireワークフロー。元のLuxAlgoスクリプトはミティゲーション(FVGの消化)の追跡のみで、リテスト確認やシグナルロジックは持っていません。
・日足FVGとの重なりおよびプレミアム/ディスカウント整合に基づくS/A/BのFVGグレーディングと、それを反映した加重0〜100のコンフルエンススコア(元スクリプトには存在しません)。
・方向判定を上位タイムフレームのみに意図的に限定し、執行タイムフレームの分析はすべてパターン/構造確認に委ねるバイアスモデル。
・スイング基準とFVG基準の2系統ストップロス参照、おおよその金額換算リスク表示、エントリー/SL/TPラインとラベルの自動描画、チャート上の総合判断ダッシュボード。これらは、シグナルやリスク管理機能を持たない単体のFVG描画ツールである元のLuxAlgoスクリプトには存在しません。
本スクリプトはオープンソースで公開しており、これは元となるオープンソースのFVG検出概念の再利用条件にも準拠するものです。
使い方
1.執行モード(5分または15分)を選択します。上位タイムフレームは自動的に対応するものが選ばれますが、手動上書きも可能です。
2.ダッシュボードの「Action」セルを確認してください。現在の状態が平易な表現で表示されます(例:「MTF整合済み・setup待ち」「反転確認待ち(Ready)」「矢印を確認・エントリー検討」など)。
3.チャート上の三角マーカーは、シグナルが「entry_candidate」状態に達したときのみ表示されます(上位タイムフレームでのバイアス整合、Ready→Fire確認または十分なセットアップスコア、コンフルエンススコアが閾値超え、反対側FVGが近接していない、クールダウン期間外であること、をすべて満たす場合)。
4.マーカー表示時、エントリー/ストップ/ターゲットのラインとラベルが自動描画されます。ドル損失額の表示は、ご自身のブローカー・銘柄に応じて設定するロットサイズとpip価値の入力値に依存します。
5.「FVG grade」「fs」セルは、シグナル発火前でも信号の質を把握する手がかりとなり、今後のセットアップを予測する際に活用できます。
6.alert()ペイロードにより、「entry_candidate」「structure_break」イベント発生時にアラートを設定できます。
実運用前にバックテスト・フォワードテストを行ってください。本スクリプトはシグナル・分析ツールであり、投資助言ではありません。過去の構造やスコアの挙動が将来の結果を保証するものではありません。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。