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.
Anomaly
Month of Year Performance█ OVERVIEW
The Month of Year Performance indicator is designed to visualize and compare the cumulative percentage change for each month of the year. By aggregating monthly returns, it helps uncover seasonal trends and potential anomalies in financial markets.
In financial analysis, a calendar based anomaly refers to recurring patterns or tendencies associated with specific time periods, such as days of the week. By calculating the cumulative percentage change for each month (January through December) and displaying the results both graphically and in a summary table, this indicator helps identify whether certain months
consistently outperform others.
█ FEATURES
Customisable time window via Time Settings.
Calculates cumulative percentage change for each month (January to December) separately.
Built-in error check to ensure the indicator is applied on a Monthly timeframe.
Distinct visual representation for each month using unique colours.
Customisable table settings including location and font size.
Displays a performance summary table with metrics such as performance, average return, % positive, and count.
█ HOW TO USE
Add the indicator to a chart set to a Monthly timeframe.
Select your desired Start Time and End Time in the Time Settings.
Toggle the performance table on or off in the Table Settings.
Adjust the table’s location and font size as needed.
View the cumulative monthly performance plotted in distinct colours.
Colour Scheme:
January: Blue
February: Red
March: Green
April: Orange
May: Purple
June: Fuchsia
July: Teal
August: Yellow
September: Navy
October: Lime
November: Maroon
December: Aqua
Day of Week Performance█ OVERVIEW
The Day of Week Performance indicator is designed to visualise and compare the cumulative percentage change for each day of the week. This indicator explores one of the many calendar based anomalies in financial markets.
In financial analysis, a calendar based anomaly refers to recurring patterns or tendencies associated with specific time periods, such as days of the week. By calculating the cumulative percentage change for each day (Monday through Friday) and displaying the results both graphically and in a summary table, this indicator helps identify whether certain days consistently outperform others.
█ FEATURES
Customisable time window via Time Settings.
Calculates cumulative percentage change for each day (Monday to Friday) separately.
Option to use Sunday instead of Friday for CFDs and Futures analysis.
Distinct visual representation for each day using unique colours.
Customisable table settings including position and font size.
Built-in error checks to ensure the indicator is applied on a Daily timeframe.
█ HOW TO USE
Add the indicator to a chart set to a Daily timeframe.
Select your desired Start Time and End Time in the Time Settings.
Toggle the performance table on or off in the Table Settings.
Adjust the table’s location and font size as needed.
Use the "Use Sunday instead of Friday" option if your market requires it.
View the cumulative performance plotted in distinct colours.
Colour Scheme:
Monday: Blue
Tuesday: Red
Wednesday: Green
Thursday: Orange
Friday: Purple
Quarterly Performance█ OVERVIEW
The Quarterly Performance indicator is designed to visualise and compare the performance of different Quarters of the year. This indicator explores one of the many calendar based anomalies that exist in financial markets.
In the context of financial analysis, a calendar based anomaly refers to patterns or tendencies that are linked to specific time periods, such as days of the week, weeks of the month, or months of the year. This indicator helps explore whether such a calendar based anomaly exists between quarters.
By calculating cumulative quarterly performance and counting the number of quarters with positive returns, it provides a clear snapshot of whether one set of quarters tends to outperform the others, potentially highlighting a calendar based anomaly if a significant difference is observed.
█ FEATURES
Customisable time window through input settings.
Tracks cumulative returns for each quarter separately.
Easily adjust table settings like position and font size via input options.
Clear visual distinction between quarterly performance using different colours.
Built-in error checks to ensure the indicator is applied to the correct timeframe.
█ HOW TO USE
Add the indicator to a chart with a 3 Month (Quarterly) timeframe.
Choose your start and end dates in the Time Settings.
Enable or disable the performance table in the Table Settings as needed.
View the cumulative performance, with Q1 in blue, Q2 in red, Q3 in green and Q4 in purple.
Even vs Odd Days Performance█ OVERVIEW
The Even vs Odd Days Performance indicator is designed to visualise and compare the performance of even-numbered days versus odd-numbered days. This indicator explores one of the many calendar based anomalies that exist in financial markets.
In the context of financial analysis, a calendar based anomaly refers to patterns or tendencies that are linked to specific time periods, such as days of the week, weeks of the month, or months of the year. This indicator helps explore whether such a calendar based anomaly exists between even and odd days.
By calculating cumulative daily performance and counting the number of days with positive returns, it provides a clear snapshot of whether one set of days tends to outperform the other, potentially highlighting a calendar based anomaly if a significant difference is observed.
█ FEATURES
Customisable time window through input settings.
Tracks cumulative returns for even and odd days separately.
Easily adjust table settings like position and font size via input options.
Clear visual distinction between even and odd day performance using different colours.
Built-in error checks to ensure the indicator is applied to the correct timeframe.
█ HOW TO USE
Add the indicator to a chart with a Daily timeframe.
Choose your start and end dates in the Time Settings.
Enable or disable the performance table in the Table Settings as needed.
View the cumulative performance, with even days in green and odd days in red.
Even vs Odd Weeks Performance█ OVERVIEW
The Even vs Odd Weeks Performance indicator is designed to visualise and compare the performance of even-numbered weeks versus odd-numbered weeks. This indicator explores one of the many calendar based anomalies that exist in financial markets.
In the context of financial analysis, a calendar based anomaly refers to patterns or tendencies that are linked to specific time periods, such as days of the week, weeks of the month, or months of the year. This indicator helps explore whether such a calendar based anomaly exists between even and odd weeks.
By calculating cumulative weekly performance and counting the number of weeks with positive returns, it provides a clear snapshot of whether one set of weeks tends to outperform the other, potentially highlighting a calendar based anomaly if a significant difference is observed.
█ FEATURES
Customisable time window through input settings.
Tracks cumulative returns for even and odd weeks separately.
Easily adjust table settings like position and font size via input options.
Clear visual distinction between even and odd week performance using different colours.
Built-in error checks to ensure the indicator is applied to the correct timeframe.
█ HOW TO USE
Add the indicator to a chart with a Weekly timeframe.
Choose your start and end dates in the Time Settings.
Enable or disable the performance table in the Table Settings as needed.
View the cumulative performance, with even weeks in green and odd weeks in red.
Bull/Bear Ratio By Month Table [MsF]Japanese below / 日本語説明は英文の後にあります。
-------------------------
This is an indicator that shows monthly bull-bear ratio in a table.
By specifying the start year and end year, the ratio will be calculated and showed based on the number of bullish and bearish lines in the monthly bar. It allows you to analyze the trend of each symbol and month (bullish / bearish). Up to 10 symbols can be specified.
You can take monthly bull-bear ratio for the past 10 or 20 years on the web, but with this indicator, you can narrow it down to the period in which you want to see the symbols you want to see. It is very convenient because you can take statistics at will.
Furthermore, if the specified ratio is exceeded, the font color can be changed to any color, making it very easy to read.
=== Parameter description ===
- From … Year of start of aggregation
- To … Year of end of aggregation
- Row Background Color … Row title background color
- Col Background Color … Column title background color
- Base Text Color … Text color
- Background Color … Background Color
- Border Color … Border Color
- Location … Location
- Text Size … Text Size
- Highlight Threshold … Ratio threshold, and color
- Display in counter? … Check if you want to show the number of times instead of the ratio
-------------------------
月別陰陽確率をテーブル表示するインジケータです。
開始年から終了年を指定することで、月足における陽線数および陰線数を元に確率を計算して表示します。
この機能により各シンボルおよび各月の特徴(買われやすい/売られやすい)を認識することができアノマリー分析が可能です。
シンボルは10個まで指定可能です。
過去10年、20年の月別陰陽確率は、Web上でよく見かけますが、このインジケータでは見たいシンボルを見たい期間に絞って、
自由自在に統計を取ることができるため大変便利です。
なお、指定した確率を上回った場合、文字色を任意の色に変更することができるため、大変見やすくなっています。
=== パラメータの説明 ===
- From … 集計開始年
- To … 集計終了年
- Row Background Color … 行タイトルの背景色
- Col Background Color … 列タイトルの背景色
- Base Text Color … テキストカラー
- Background Color … 背景色
- Border Color … 区切り線の色
- Location … 配置
- Text Size … テキストサイズ
- Highlight Threshold … 色変更する確率の閾値、および色
- Display in counter? … 確率ではなく回数表示する場合はチェックする
Scalp Pump-Dump Detector with AlertsThis script displays the percentage of movement of all candles on the chart, as well as identifying abnormal movements to which you can attach alerts. An abnormal movement is considered a rise or fall that exceeds the parameter set in the settings (by default, 1% per 1 bar).
Added a function to display the volume on abnormal candlesticks.
Anomaly Detection Indicator[Fournier-Eaton]Detect unusual activity with this script.
This algorithm should detect significant events RELATIVE to the benchmark of your choice. The default is benchmark is QQQ.
upcoming earnings should be visible
dividend announcements
news events relative to the stock
possible reversals
etc.
The granularity of the algorithm changes with selected time-frame.
This is an early version. Please suggest changes.
V0.1
Empirical MomentsBINANCE:BTCUSDT I thought I’d make an indicator for the “fast trader”. This indicator compares the changing high prices with the close prices and in doing so, detects positive “anomalies” (the outlier drift). It gets more complicated than that; the practical indicator is the “empirically weighted drift”, which is a weighted average of the former with its derivatives up to the third order I.e. the “outlier yank”. The empirically weighted drift crossing above and below zero with long and short actions, respectively is used as the strategy. With this strategy, current backtesting for the 15 minute BTCUSDT on the Binance market yields a Sharpe ratio of 1.47 and profit factor of 1.12. Publishing the strategy as well.
WaveTrend Anomaly by HypesterAs requested by the Alpha community, here's our release.
This is a different type of Wavetrend indicator; here, we have a statistical approach to the waves. We normalize the trends as a reference to measure how much every move differs from the average.
If the move is too far out, it tends to go back to the average as a rule. This indicator yields a %. As you can see, most of the moves tend to stay within 0.5 and -0.5. Remember the fact that 0.5 means 50%, the negative factor here only determines direction.
Funny the fact that most crossings happen within the 0.5 and -0.5, which means they occur before the odds are against them all the time. That highlights the chaotic nature of the markets.
However, the outliers, the moves that extrapolate the 50%, tend to go back to the average quickly, and the big triangles highlight this crossing.
You can also display every single crossing and its direction in the options panel.
There're more customization capabilities in the panel, too, like length, source, and so on.
Now to the background color options, when it's green, we have a confirmed bull movement, and red is a confirmed bear.
The area oscillator is the slope between the fast and slow oscillator lines. Here you can see when the trend is reversing or losing its strength. The orange slope color happens when you have a bearish trend, for instance. The yellow slope happens with a bull trend but a negative momentum. By mixing the colors, you can evaluate if it's strong enough for a full reversal and so on.
This same approach could be handy to spot bottoms and tops.
Anomaly Indicator V1.1 The Anomaly Indicator is an idea I recently come up with. Its very simple, yet it can be extremely useful. The Anomaly indicator detects the current and general trend channels. When the yellow line which is the current channel, exits the general channel this will usually mean an anomaly. Anomalies can vary within meaning, from a trend reversal, a market change (trending or rangebound) and lastly it can also give you an entering point. You can even use it to know the volatility of the market.
This is a very early version of the indicator and has pre-set values. I personally use it among a 5 minute chart for daytrading.
NOTE : Have in mind my indicator as ny other is not perfect, it might give fake signals. I suggest using Williams Alligator, and RSI with it. Best of luck. Follow my predictions under your own risk.