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 อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน