Volume Footprint Anomaly Scanner [PhenLabs]📊 PhenLabs - Volume Footprint Anomaly Scanner (VFAS)
Version: PineScript™ v6
📌 Description
The PhenLabs Volume Footprint Anomaly Scanner (VFAS) is an advanced Pine Script indicator designed to detect and highlight significant imbalances in buying and selling pressure within individual price bars. By analyzing a calculated "Delta" – the net difference between estimated buy and sell volume – and employing statistical Z-score analysis, VFAS pinpoints moments when buying or selling activity becomes unusually dominant. This script was created not in hopes of creating a "Buy and Sell" indicator but rather providing the user with a more in-depth insight into the intrabar volume delta and how it can fluctuate in unusual ways, leading to anomalies that can be capitalized on.
This indicator helps traders identify high-conviction points where strong market participants are active, signaling potential shifts in momentum or continuation of a trend. It aims to provide a clearer understanding of underlying market dynamics, allowing for more informed decision-making in various trading strategies, from identifying entry points to confirming trend strength.
🚀 Points of Innovation
● Z-Score for Delta Analysis : Utilizes statistical Z-scores to objectively identify statistically significant anomalies in buying/selling pressure, moving beyond simple, arbitrary thresholds.
● Dynamic Confidence Scoring : Assigns a multi-star confidence rating (1-4 stars) to each signal, factoring in high volume, trend alignment, and specific confirmation criteria, providing a nuanced view of signal strength.
● Integrated Trend Filtering : Offers an optional Exponential Moving Average (EMA)-based trend filter to ensure signals align with the broader market direction, reducing false positives in ranging markets.
● Strict Confirmation Logic : Implements specific confirmation criteria for higher-confidence signals, including price action and a time-based gap from previous signals, enhancing reliability.
● Intuitive Info Dashboard : Provides a real-time summary of market trend and the latest signal's direction and confidence directly on the chart, streamlining information access.
🔧 Core Components
● Core Delta Engine : Estimates the net buying/selling pressure (bar Delta) by analyzing price movement within each bar relative to volume. It also calculates average volume to identify bars with unusually high activity.
● Anomaly Detection (Z-Score) : Computes the Z-score for the current bar's Delta, indicating how many standard deviations it is from its recent average. This statistical measure is central to identifying significant anomalies.
● Trend Filter : Utilizes a dual Exponential Moving Average (EMA) cross-over system to define the prevailing market trend (uptrend, downtrend, or range), providing contextual awareness.
● Signal Processing & Confidence Algorithm : Evaluates anomaly conditions against trend filters and confirmation rules, then calculates a dynamic confidence score to produce actionable, contextualized signal information.
🔥 Key Features
● Advanced Delta Anomaly Detection : Pinpoints bars with exceptionally high buying or selling pressure, indicating potential institutional activity or strong market conviction.
● Multi-Factor Confidence Scoring : Each signal comes with a 1-4 star rating, clearly communicating its reliability based on high volume, trend alignment, and specific confirmation criteria.
● Optional Trend Alignment : Users can choose to filter signals, so only those aligned with the prevailing EMA-defined trend are displayed, enhancing signal quality.
● Interactive Signal Labels : Displays compact labels on the chart at anomaly points, offering detailed tooltips upon hover, including signal type, direction, confidence, and contextual information.
● Customizable Bar Colors : Visually highlights bars with Delta anomalies, providing an immediate visual cue for strong buying or selling activity.
● Real-time Info Dashboard : A clean, customizable dashboard shows the current market trend and details of the latest detected signal, keeping key information accessible at a glance.
● Configurable Alerts : Set up alerts for bullish or bearish Delta anomalies to receive real-time notifications when significant market pressure shifts occur.
🎨 Visualization
Signal Labels :
* Placed at the top/bottom of anomaly bars, showing a "📈" (bullish) or "📉" (bearish) icon.
* Tooltip: Hovering over a label reveals detailed information: Signal Type (e.g., "Delta Anomaly"), Direction, Confidence (e.g., "★★★☆"), and a descriptive explanation of the anomaly.
* Interpretation: Clearly marks actionable signals and provides deep insights without cluttering the chart, enabling quick assessment of signal strength and context.
● Info Dashboard :
* Located at the top-right of the chart, providing a clean summary.
* Displays: "PhenLabs - VFAS" header, "Market Trend" (Uptrend/Downtrend/Range with color-coded status), and "Direction | Conf." (showing the last signal's direction and star confidence).
* Optional "💡 Hover over signals for details" reminder.
* Interpretation: A concise, real-time summary of the market's pulse and the most recent high-conviction event, helping traders stay informed at a glance.
📖 Usage Guidelines
Setting Categories
⚙️ Core Delta & Volume Engine
● Minimum Volume Lookback (Bars)
○ Default: 9
○ Range: Integer (e.g., 5-50)
○ Description: Defines the number of preceding bars used to calculate the average volume and delta. Bars with volume below this average won't be considered for high-volume signals. A shorter lookback is more reactive to recent changes, while a longer one provides a smoother average.
📈 Anomaly Detection Settings
Delta Z-Score Anomaly Threshold
○ Default: 2.5
○ Range: Float (e.g., 1.0-5.0+)
○ Description: The number of standard deviations from the mean that a bar's delta must exceed to be considered a significant anomaly. A higher threshold means fewer, but potentially stronger, signals. A lower threshold will generate more signals, which might include less significant events. Experiment to find the optimal balance for your trading style.
🔬 Context Filters
Enable Trend Filter
○ Default: False
○ Range: Boolean (True/False)
○ Description: When enabled, signals will only be generated if they align with the current market trend as determined by the EMAs (e.g., only bullish signals in an uptrend, bearish in a downtrend). This helps to filter out counter-trend noise.
● Trend EMA Fast
○ Default: 50
○ Range: Integer (e.g., 10-100)
○ Description: The period for the faster Exponential Moving Average used in the trend filter. In combination with the slow EMA, it defines the trend direction.
● Trend EMA Slow
○ Default: 200
○ Range: Integer (e.g., 100-400)
○ Description: The period for the slower Exponential Moving Average used in the trend filter. The relationship between the fast and slow EMA determines if the market is in an uptrend (fast > slow) or downtrend (fast < slow).
🎨 Visual & UI Settings
● Show Info Dashboard
○ Default: True
○ Range: Boolean (True/False)
○ Description: Toggles the visibility of the dashboard on the chart, which provides a summary of market trend and the last detected signal.
● Show Dashboard Tooltip
○ Default: True
○ Range: Boolean (True/False)
○ Description: Toggles a reminder message in the dashboard to hover over signal labels for more detailed information.
● Show Delta Anomaly Bar Colors
○ Default: True
○ Range: Boolean (True/False)
○ Description: Enables or disables the coloring of bars based on their delta direction and whether they represent a significant anomaly.
● Show Signal Labels
○ Default: True
○ Range: Boolean (True/False)
○ Description: Controls the visibility of the “📈” or “📉” labels that appear on the chart when a delta anomaly signal is generated.
🔔 Alert Settings
Alert on Delta Anomaly
○ Default: True
○ Range: Boolean (True/False)
○ Description: When enabled, this setting allows you to set up alerts in TradingView that will trigger whenever a new bullish or bearish delta anomaly is detected.
✅ Best Use Cases
Early Trend Reversal / Continuation Detection: Identify strong surges of buying/selling pressure at key support/resistance levels that could indicate a reversal or the continuation of a strong move.
● Confirmation of Breakouts: Use high-confidence delta anomalies to confirm the validity of price breakouts, indicating strong conviction behind the move.
● Entry and Exit Points: Pinpoint precise entry opportunities when anomalies align with your trading strategy, or identify potential exhaustion signals for exiting trades.
● Scalping and Day Trading: The indicator’s sensitivity to intraday buying/selling imbalances makes it highly effective for short-term trading strategies.
● Market Sentiment Analysis: Gain a real-time understanding of underlying market sentiment by observing the prevalence and strength of bullish vs. bearish anomalies.
⚠️ Limitations
Estimated Delta: The script uses a simplified method to estimate delta based on bar close relative to its range, not actual order book or footprint data. While effective, it’s an approximation.
● Sensitivity to Z-Score Threshold: The effectiveness heavily relies on the `Delta Z-Score Anomaly Threshold`. Too low, and you’ll get many false positives; too high, and you might miss valid signals.
● Confirmation Criteria: The 4-star confidence level’s “confirmation” relies on specific subsequent bar conditions and previous confirmed signals, which might be too strict or specific for all contexts.
● Requires Context: While powerful, VFAS is best used in conjunction with other technical analysis tools and price action to form a comprehensive trading strategy. It is not a standalone “buy/sell” signal.
💡 What Makes This Unique
Statistical Rigor: The application of Z-score analysis to bar delta provides an objective, statistically-driven way to identify true anomalies, moving beyond arbitrary thresholds.
● Multi-Factor Confidence Scoring: The unique 1-4 star confidence system integrates multiple market dynamics (volume, trend alignment, specific follow-through) into a single, easy-to-interpret rating.
● User-Friendly Design: From the intuitive dashboard to the detailed signal tooltips, the indicator prioritizes clear and accessible information for traders of all experience levels.
🔬 How It Works
1. Bar Delta Calculation:
● The script first estimates the “buy volume” and “sell volume” for each bar. This is done by assuming that volume proportional to the distance from the low to the close represents buying, and volume proportional to the distance from the high to the close represents selling.
● How this contributes: This provides a proxy for the net buying or selling pressure (delta) within that specific price bar, even without access to actual footprint data.
2. Volume & Delta Z-Score Analysis:
● The average volume over a user-defined lookback period is calculated. Bars with volume less than twice this average are generally considered of lower interest.
● The Z-score for the calculated bar delta is computed. The Z-score measures how many standard deviations the current bar’s delta is from its average delta over the `Minimum Volume Lookback` period.
● How this contributes: A high positive Z-score indicates a bullish delta anomaly (significantly more buying than usual), while a high negative Z-score indicates a bearish delta anomaly (significantly more selling than usual). This identifies statistically unusual levels of pressure.
3. Trend Filtering (Optional):
● Two Exponential Moving Averages (Fast and Slow EMA) are used to determine the prevailing market trend. An uptrend is identified when the Fast EMA is above the Slow EMA, and a downtrend when the Fast EMA is below the Slow EMA.
● How this contributes: If enabled, the indicator will only display bullish delta anomalies during an uptrend and bearish delta anomalies during a downtrend, helping to confirm signals within the broader market context and avoid counter-trend signals.
4. Signal Generation & Confidence Scoring:
● When a delta Z-score exceeds the user-defined anomaly threshold, a signal is generated.
● This signal is then passed through a multi-factor confidence algorithm (`f_calculateConfidence`). It awards stars based on: high volume presence, alignment with the overall trend (if enabled), and a fourth star for very strong Z-scores (above 3.0) combined with specific follow-through candle patterns after a cooling-off period from a previous confirmed signal.
● How this contributes: Provides a qualitative rating (1-4 stars) for each anomaly, allowing traders to quickly assess the potential significance and reliability of the signal.
💡 Note:
The PhenLabs Volume Footprint Anomaly Scanner is a powerful analytical tool, but it’s crucial to understand that no indicator guarantees profit. Always backtest and forward-test the indicator settings on your chosen assets and timeframes. Consider integrating VFAS with your existing trading strategy, using its signals as confirmation for entries, exits, or trend bias. The Z-score threshold is highly customizable; lower values will yield more signals (including potential noise), while higher values will provide fewer but potentially higher-conviction signals. Adjust this parameter based on market volatility and your risk tolerance. Remember to combine statistical insights from VFAS with price action, support/resistance levels, and your overall market outlook for optimal results.
Deltaanalysis
Thin Liquidity Zones [PhenLabs]Thin Liquidity Zones with Volume Delta
Our advanced volume analysis tool identifies and visualizes significant liquidity zones using real-time volume delta analysis. This indicator helps traders pinpoint and monitor critical price levels where substantial trading activity occurs, providing precise volume flow measurement through lower timeframe analysis.
The tool works by leveraging the fact that hedge funds, institutions, and other large market participants strategically fill their orders in areas of thin liquidity to minimize slippage and market impact. By detecting these zones, traders gain valuable insights into potential areas of accumulation, distribution, and liquidity traps, allowing for more informed trading decisions.
🔍 Key Features
Real-time volume delta calculation using lower timeframe data
Dynamic zone creation based on volume spikes
Automatic timeframe optimization
Size-filtered zones to avoid noise
Custom delta timeframe scanning
Flexible analysis period selection
📊 Visual Demonstration
💡 How It Works
The indicator continuously scans for high-volume areas where trading activity exceeds the specified threshold (default 6.0x average volume). When detected, it creates zones that display the net volume delta, showing whether buying or selling pressure dominated that price level.
Key zone characteristics:
Size filtering prevents noise from large price swings
Volume delta shows actual buying/selling pressure
Zones automatically expire based on lookback period
Real-time updates as new volume data arrives
⚙️ Settings
Time Settings
Analysis Timeframe: 15M to 1W options
Custom Period: User-defined bar count
Delta Timeframe: Automatic or manual selection
Volume Analysis
Volume Threshold: Minimum spike multiple
Volume MA Length: Averaging period
Maximum Zone Size: Size filter percentage
Display Options
Zone Color: Customizable with transparency
Delta Display: On/Off toggle
Text Position: Left/Center/Right alignment
📌 Tips for Best Results
Adjust volume threshold based on instrument volatility
Monitor zone clusters for potential support/resistance
Consider reducing max zone size in volatile markets
Use in conjunction with price action and other indicators
⚠️ Important Notes
Requires volume data from your data provider
Lower timeframe scanning may impact performance
Maximum 500 zones maintained for optimization
Zone creation is filtered by both volume and size
🔧 Volume Delta Calculation
The indicator uses TradingView’s advanced volume delta calculation, which:
Scans lower timeframe data for precision
Measures actual buying vs selling pressure
Updates in real-time with new data
Provides clear positive/negative flow indication
This tool is ideal for traders focusing on volume analysis and order flow. It helps identify key levels where significant trading activity has occurred and provides insight into the nature of that activity through volume delta analysis.
Note: Performance may vary based on your chart’s timeframe. Adjust settings according to your trading style and the instrument’s characteristics. Past performance is not indicative of future results, DYOR.