OPEN-SOURCE SCRIPT

Bias & Sweep Dashboard

237
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 ❌.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.