OPEN-SOURCE SCRIPT
已更新 Daily Bias Liquidity Profiler [MarkitTick]

💡 This advanced analytical framework is engineered to decode market structure, track liquidity sweeps, and map volatility profiles on an intraday basis. Built natively for the sophisticated Pine Script version 6 environment, this indicator transcends basic charting by aggregating Previous Day metrics, session-specific liquidity pools, Fair Value Gap (FVG) confluences, and probabilistic bias models into a single, cohesive visual interface. It is designed for quantitative and algorithmic traders who require a deep understanding of market mechanics, offering unparalleled insight into where resting liquidity is likely positioned and how daily volatility is structured based on pure statistical variance.
✨ Originality and Utility
● Comprehensive Architectural Design
Most standard technical indicators focus on a single mathematical transformation, such as moving averages or simple momentum oscillators. The originality of this profiler lies in its multi-faceted approach, unifying advanced price action concepts that typically require multiple separate scripts. By leveraging Pine Script version 6 User-Defined Types (UDTs), the script maintains an incredibly lightweight footprint while calculating complex, interconnected market states without degrading chart performance.
● Algorithmic Session Tracking
The utility of the indicator is profoundly evident in its automated handling of time-based liquidity. Rather than manually drawing boxes around the Asian and London sessions, the script dynamically profiles these periods. It treats their boundaries not as mere historical artifacts, but as active, magnetic liquidity pools that drive future price action.
● Real-Time Bias Computation
This tool introduces a dynamic probability engine that continuously evaluates the likelihood of price sweeping the Previous Day High or Previous Day Low based on current opening momentum and accumulated volatility. This gives traders a statistical edge in determining their daily directional bias without relying on subjective chart patterns.
🔬 Methodology and Concepts
● Daily Range Profiling
At the core of the script's methodology is the Daily Profile engine. It systematically captures the Previous Day High, Previous Day Low, and Previous Day Close. These levels represent the absolute boundaries of yesterday's value area. The script calculates the total range of the previous day to establish a baseline for current-day expectations and statistical deviation limits.
● Session Liquidity Engineering
The script defines distinct macro-economic windows, specifically targeting the Asian and London trading sessions.
● Fair Value Gap (FVG) Confluence
Market imbalances are identified through a precise Fair Value Gap detection algorithm. The script does not just highlight every random gap on the chart; it specifically looks for FVG formations that align with the directional bias and occur in proximity to session sweeps. This creates a high-probability confluence signal, indicating that the market is rapidly moving to rebalance price delivery.
● Advanced Volatility Metrics
Volatility is not measured through standard lagging indicators. Instead, the script utilizes an Average Daily Range (ADR) calculation. It dynamically tracks the percentage of the ADR that has been fulfilled during the current day. By calculating how many bars it typically takes to reach standard deviation milestones of the ADR, the script provides a predictive model for intraday exhaustion.
● Dynamic Bias Scoring Engine
The indicator calculates a running score to determine the daily bias. It awards positive and negative weights based on several factors: the location of the current price relative to the daily open, whether a session liquidity sweep has occurred, the presence of FVG confluences, and the proximity to the Previous Day's extremes. This score is translated into a probability percentage for sweeping either the high or the low.
🎨 Visual Guide
● Liquidity Zones and Range Boxes
● Structural Lines
● Dynamic Labels and Alerts
📖 How to Use
● Establishing Directional Bias
Begin your analysis by referencing the Bias State metric displayed on the chart. If the script calculates a high probability of sweeping the Previous Day High, prioritize bullish setups. Conversely, a high probability for the Previous Day Low dictates a bearish posture. Do not fight the algorithmic bias without significant contradicting evidence from higher timeframes.
● Executing the Sweep and Reverse
Monitor the Asian and London session boxes. A prime setup occurs when price aggressively breaks outside a session box and immediately faces strong rejection. This false breakout is the trigger for a mean-reversion trade targeting the opposite side of the session range. Look for the script's sweep labels to confirm the level has been compromised.
● Filtering with Volatility
Consult the Volatility Metrics before entering a trade. If the current daily range has already fulfilled a high percentage of the Average Daily Range (ADR), the probability of further directional expansion diminishes. In such cases, avoid breakout trades and look for exhaustion reversals at the projected Range Zone extremes.
● Utilizing FVG Confluence
When a sweep occurs, wait for the algorithm to highlight a valid Fair Value Gap in the opposite direction of the sweep. Enter the market on the retracement into this FVG, placing stop losses just beyond the sweep extreme for optimal risk-to-reward ratios.
⚙️ Inputs and Settings
● Time and Session Configuration
● Volatility Parameters
● Visual Toggles
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Auction Market Theory and Liquidity
The foundational logic of this script is deeply rooted in Auction Market Theory. Financial markets operate as a continuous dual-auction process, seeking areas of high liquidity to facilitate trade execution for large-scale participants. The script mathematically models this by isolating session highs and lows, recognizing them as high-density zones for stop-loss orders and breakout triggers.
● Statistical Variance and Range Forecasting
The Volatility Metrics engine relies on historical variance. By computing the Average Daily Range over a predefined dataset, the script applies a simplified standard deviation model to predict the expected boundaries of the current day. This creates a probabilistic bell curve of expected price distribution, where the extremes of the ADR represent the tails of the distribution curve, indicating areas of high mean-reversion probability.
● Microstructural Order Flow Imbalances
The Fair Value Gap (FVG) detection logic is an algorithmic representation of order flow imbalance. In academic market microstructure, when price moves with extreme velocity, it creates a void in the bid-ask spread where only one side of the market was effectively matched. The script mathematically identifies these structural inefficiencies, utilizing them as high-probability zones for future price retracements, as the market naturally seeks to re-auction these inefficiently traded areas.
● Probabilistic Modeling
The bias engine utilizes a rudimentary form of multi-factor linear weighting. By assigning specific values to isolated market events (e.g., crossing the open price, sweeping a specific session), the model computes a composite score. This deterministic approach strips away emotional trading by replacing it with a quantifiable metric that guides directional expectations.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
✨ Originality and Utility
● Comprehensive Architectural Design
Most standard technical indicators focus on a single mathematical transformation, such as moving averages or simple momentum oscillators. The originality of this profiler lies in its multi-faceted approach, unifying advanced price action concepts that typically require multiple separate scripts. By leveraging Pine Script version 6 User-Defined Types (UDTs), the script maintains an incredibly lightweight footprint while calculating complex, interconnected market states without degrading chart performance.
● Algorithmic Session Tracking
The utility of the indicator is profoundly evident in its automated handling of time-based liquidity. Rather than manually drawing boxes around the Asian and London sessions, the script dynamically profiles these periods. It treats their boundaries not as mere historical artifacts, but as active, magnetic liquidity pools that drive future price action.
● Real-Time Bias Computation
This tool introduces a dynamic probability engine that continuously evaluates the likelihood of price sweeping the Previous Day High or Previous Day Low based on current opening momentum and accumulated volatility. This gives traders a statistical edge in determining their daily directional bias without relying on subjective chart patterns.
🔬 Methodology and Concepts
● Daily Range Profiling
At the core of the script's methodology is the Daily Profile engine. It systematically captures the Previous Day High, Previous Day Low, and Previous Day Close. These levels represent the absolute boundaries of yesterday's value area. The script calculates the total range of the previous day to establish a baseline for current-day expectations and statistical deviation limits.
● Session Liquidity Engineering
The script defines distinct macro-economic windows, specifically targeting the Asian and London trading sessions.
- Asian Session Consolidation: Often characterized by tight ranges, the Asian session builds resting liquidity above its highs and below its lows. The algorithm tracks these exact price levels dynamically.
- London Session Expansion: The script monitors the London open for initial expansion moves that frequently sweep the liquidity accumulated during the Asian session, triggering internal alerts when these specific thresholds are pierced.
● Fair Value Gap (FVG) Confluence
Market imbalances are identified through a precise Fair Value Gap detection algorithm. The script does not just highlight every random gap on the chart; it specifically looks for FVG formations that align with the directional bias and occur in proximity to session sweeps. This creates a high-probability confluence signal, indicating that the market is rapidly moving to rebalance price delivery.
● Advanced Volatility Metrics
Volatility is not measured through standard lagging indicators. Instead, the script utilizes an Average Daily Range (ADR) calculation. It dynamically tracks the percentage of the ADR that has been fulfilled during the current day. By calculating how many bars it typically takes to reach standard deviation milestones of the ADR, the script provides a predictive model for intraday exhaustion.
● Dynamic Bias Scoring Engine
The indicator calculates a running score to determine the daily bias. It awards positive and negative weights based on several factors: the location of the current price relative to the daily open, whether a session liquidity sweep has occurred, the presence of FVG confluences, and the proximity to the Previous Day's extremes. This score is translated into a probability percentage for sweeping either the high or the low.
🎨 Visual Guide
● Liquidity Zones and Range Boxes
- Session Boxes: Distinct, shaded rectangular regions drawn over the chart to encapsulate the high and low bounds of the Asian and London sessions. These boxes visually isolate the accumulation phases.
- Range Zone Boxes: Projected areas above and below the current price action representing high-probability reversal or expansion targets based on the ADR calculations.
● Structural Lines
- Previous Day Boundaries: Solid, distinct horizontal lines marking the exact price levels of the Previous Day High and Previous Day Low.
- Midlines: Subtler horizontal lines traversing the center of the calculated range zones to indicate equilibrium levels where price action may stall or pivot.
● Dynamic Labels and Alerts
- Sweep Labels: Textual annotations that appear exactly when price pierces a session boundary or previous day extreme, explicitly confirming a liquidity sweep.
- Bias State Text: A dedicated label displaying the current statistical bias, updating dynamically as volatility metrics shift throughout the trading day.
📖 How to Use
● Establishing Directional Bias
Begin your analysis by referencing the Bias State metric displayed on the chart. If the script calculates a high probability of sweeping the Previous Day High, prioritize bullish setups. Conversely, a high probability for the Previous Day Low dictates a bearish posture. Do not fight the algorithmic bias without significant contradicting evidence from higher timeframes.
● Executing the Sweep and Reverse
Monitor the Asian and London session boxes. A prime setup occurs when price aggressively breaks outside a session box and immediately faces strong rejection. This false breakout is the trigger for a mean-reversion trade targeting the opposite side of the session range. Look for the script's sweep labels to confirm the level has been compromised.
● Filtering with Volatility
Consult the Volatility Metrics before entering a trade. If the current daily range has already fulfilled a high percentage of the Average Daily Range (ADR), the probability of further directional expansion diminishes. In such cases, avoid breakout trades and look for exhaustion reversals at the projected Range Zone extremes.
● Utilizing FVG Confluence
When a sweep occurs, wait for the algorithm to highlight a valid Fair Value Gap in the opposite direction of the sweep. Enter the market on the retracement into this FVG, placing stop losses just beyond the sweep extreme for optimal risk-to-reward ratios.
⚙️ Inputs and Settings
● Time and Session Configuration
- Asia Session Hours: Allows the user to precisely define the start and end times of the Asian session based on their specific exchange and timezone.
- London Session Hours: Configurable inputs to match the precise opening and closing dynamics of the European market.
● Volatility Parameters
- ADR Lookback Length: The historical window (number of days) used to calculate the Average Daily Range. A shorter lookback makes the indicator more responsive to recent volatility spikes, while a longer lookback provides a smoother, more stable expected range.
● Visual Toggles
- Show Session Boxes: A boolean toggle to enable or disable the shaded background for trading sessions, allowing for a cleaner chart if only the boundary lines are desired.
- Show Sweep Labels: Allows users to turn off the text annotations for liquidity sweeps to reduce visual clutter during highly volatile, choppy market conditions.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Auction Market Theory and Liquidity
The foundational logic of this script is deeply rooted in Auction Market Theory. Financial markets operate as a continuous dual-auction process, seeking areas of high liquidity to facilitate trade execution for large-scale participants. The script mathematically models this by isolating session highs and lows, recognizing them as high-density zones for stop-loss orders and breakout triggers.
● Statistical Variance and Range Forecasting
The Volatility Metrics engine relies on historical variance. By computing the Average Daily Range over a predefined dataset, the script applies a simplified standard deviation model to predict the expected boundaries of the current day. This creates a probabilistic bell curve of expected price distribution, where the extremes of the ADR represent the tails of the distribution curve, indicating areas of high mean-reversion probability.
● Microstructural Order Flow Imbalances
The Fair Value Gap (FVG) detection logic is an algorithmic representation of order flow imbalance. In academic market microstructure, when price moves with extreme velocity, it creates a void in the bid-ask spread where only one side of the market was effectively matched. The script mathematically identifies these structural inefficiencies, utilizing them as high-probability zones for future price retracements, as the market naturally seeks to re-auction these inefficiently traded areas.
● Probabilistic Modeling
The bias engine utilizes a rudimentary form of multi-factor linear weighting. By assigning specific values to isolated market events (e.g., crossing the open price, sweeping a specific session), the model computes a composite score. This deterministic approach strips away emotional trading by replacing it with a quantifiable metric that guides directional expectations.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
版本注释
Fixing some issues in the code开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
💡 Proprietary indicators. Original research. Built by analysts who trade.
👑 Premium: markittick.com
📢 Free Telegram: t.me/MarkitTick_Updates
👑 Premium: markittick.com
📢 Free Telegram: t.me/MarkitTick_Updates
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
💡 Proprietary indicators. Original research. Built by analysts who trade.
👑 Premium: markittick.com
📢 Free Telegram: t.me/MarkitTick_Updates
👑 Premium: markittick.com
📢 Free Telegram: t.me/MarkitTick_Updates
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。