OPEN-SOURCE SCRIPT
Bias & Sweep Dashboard

1. Inputs & Configuration
Timeframes: Allows you to set the Higher Time Frame (HTF) (default: Daily / D) and the Intermediate/Lower Time Frame (ITF) (default: 4H / 240).
Sweep Settings: Features a customizable Swing Lookback input (default: 10 bars) to determine the structural swing points.
Table Settings: Allows configuration of the visual dashboard placement on the screen (Top Right, Bottom Left, etc.) along with background and text color styling.
2. Detection Logic
Pivots & Liquidity Sweeps:
Finds swing highs and swing lows using ta.pivothigh() and ta.pivotlow().
A Sweep is triggered when a candle's wick breaks past a key swing high/low, but the candle close returns back inside (denoting rejection of liquidity).
Uses request.security() to evaluate these sweeps on your defined HTF and ITF timeframes.
Inversions:
Tracks Fair Value Gaps (FVGs).
An Inversion is triggered when the price closes completely through a recent opposing FVG (e.g. closing above a Bearish FVG, or closing below a Bullish FVG).
Trend Bias:
Calculates trend direction using a standard EMA crossover (50 EMA vs 200 EMA) to decide if the baseline market environment is Bullish, Bearish, or Neutral.
3. Visual Dashboard (Table UI)
At the final bar (barstate.islast), the script builds a 2x4 table panel displaying:
Bias: Displayed as "Bullish" (green), "Bearish" (red), or "Neutral" (gray).
HTF Sweep: Shows ✅ if an HTF sweep is active, else ❌.
ITF Sweep: Shows ✅ if an ITF sweep is active, else ❌.
Inversion: Shows ✅ if an FVG Inversion has occurred, else ❌.
Timeframes: Allows you to set the Higher Time Frame (HTF) (default: Daily / D) and the Intermediate/Lower Time Frame (ITF) (default: 4H / 240).
Sweep Settings: Features a customizable Swing Lookback input (default: 10 bars) to determine the structural swing points.
Table Settings: Allows configuration of the visual dashboard placement on the screen (Top Right, Bottom Left, etc.) along with background and text color styling.
2. Detection Logic
Pivots & Liquidity Sweeps:
Finds swing highs and swing lows using ta.pivothigh() and ta.pivotlow().
A Sweep is triggered when a candle's wick breaks past a key swing high/low, but the candle close returns back inside (denoting rejection of liquidity).
Uses request.security() to evaluate these sweeps on your defined HTF and ITF timeframes.
Inversions:
Tracks Fair Value Gaps (FVGs).
An Inversion is triggered when the price closes completely through a recent opposing FVG (e.g. closing above a Bearish FVG, or closing below a Bullish FVG).
Trend Bias:
Calculates trend direction using a standard EMA crossover (50 EMA vs 200 EMA) to decide if the baseline market environment is Bullish, Bearish, or Neutral.
3. Visual Dashboard (Table UI)
At the final bar (barstate.islast), the script builds a 2x4 table panel displaying:
Bias: Displayed as "Bullish" (green), "Bearish" (red), or "Neutral" (gray).
HTF Sweep: Shows ✅ if an HTF sweep is active, else ❌.
ITF Sweep: Shows ✅ if an ITF sweep is active, else ❌.
Inversion: Shows ✅ if an FVG Inversion has occurred, else ❌.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。