Liquidity Heatmap Concepts [sma] Overview
Liquidity Heatmap Concepts is a sophisticated visualization tool that maps potential liquidation zones for leveraged positions across multiple timeframes. It calculates and displays where high-volume liquidations might occur at various leverage levels (25x, 50x, 100x, 150x), helping traders identify potential support/resistance zones created by cascading liquidations. Additionally, it includes a quarterly volume profile to show historical price distribution and Point of Control  levels.
### Volume-Based Trigger System
Lines are only drawn when volume exceeds a threshold:
1. Calculates 14-period simple moving average of volume
2. Applies configurable multiplier (default 1.2x) to determine significance
3. Only plots liquidation levels when current volume > (Volume SMA × Multiplier)
4. This filters out low-volume noise and focuses on meaningful zones
### Visual Intensity System
The indicator uses a gradient coloring system based on relative volume:
- **Peak Volume (White)**: When current bar has maximum volume in the dataset
  - Line width: 3 pixels
  - Brightest color intensity
- **Above Average Volume**: Volume exceeds average but isn't peak
  - Line width: 2 pixels  
  - Medium color intensity
- **Standard Volume**: Exceeds threshold but below average
  - Line width: 1 pixel
  - Base color intensity
### Line Extension & Management
- Lines extend horizontally to the right until price crosses them
- Automatic cleanup removes lines after maximum count (default 500)
- Lines persist until invalidated by price action crossing the level
- Oldest lines are removed first when limit is reached
### Quarterly Volume Profile
An optional fixed-range volume profile that:
1. **Automatic Quarter Detection**: Identifies Q1 (Jan-Mar), Q2 (Apr-Jun), Q3 (Jul-Sep), Q4 (Oct-Dec)
2. **Price Distribution Analysis**: Divides the quarter's price range into configurable rows (default 20)
3. **Volume Aggregation**: Accumulates volume at each price level throughout the quarter
4. **POC Identification**: Highlights the price level with highest volume (Point of Control)
5. **Value Area**: Shows the price range containing 70% (configurable) of total volume
6. **Profile Drawing**: At the start of each new quarter, draws the previous quarter's profile as horizontal bars
The volume profile can be positioned on either left or right side of the quarter range with adjustable width.
## Key Features
- **Multi-Leverage Display**: Toggle between 25x, 50x, 100x, and 150x leverage levels independently
- **Dual Side Tracking**: Separate visualization for long and short liquidation zones
- **Volume-Weighted Importance**: Visual intensity correlates with volume significance
- **Gradient Coloring**: Color intensity reflects relative volume magnitude
- **Smart Line Management**: Automatic cleanup prevents chart clutter
- **Historical Context**: Quarterly volume profile shows where price spent most time
- **Fully Customizable**: All colors, thresholds, and display options are adjustable
- **HD Mode**: Uses absolute volume for more precise visualization
## Parameters
### Leverage Selection
- **25x, 50x, 100x, 150x Toggles**: Enable/disable specific leverage levels
- Each level can be controlled independently
### Volume Configuration
- **Minimum Volume Multiplier** (default 1.2): Threshold above volume SMA to trigger lines
- Higher values = fewer but more significant levels
- Lower values = more levels but increased noise
### Advanced Settings
- **Maximum Lines** (default 500, range 50-500): Memory management limit
- Controls how many historical liquidation lines are maintained
### Quarterly Volume Profile
- **Show Previous Q Volume Profile** (default on): Toggle profile visibility
- **Number of Rows** (default 20, range 10-50): Price distribution granularity
- **Profile Width** (default 30%): Visual width as percentage of quarter range
- **Value Area** (default 70%): Percentage of volume for value area calculation
- **Position** (Left/Right): Profile placement relative to quarter
- **Show Values** (default off): Display POC volume label
- **Colors**: Customizable base and POC colors
### Color Customization
- **Long Colors**: Individual colors for each leverage level (25x, 50x, 100x, 150x)
- **Short Colors**: Separate color scheme for short liquidation zones
- **VP Colors**: Base color and POC highlight color for volume profile
## Interpretation
### Liquidation Clusters
- **Dense Line Areas**: Multiple overlapping liquidation levels suggest strong magnetic zones
- **High-Volume Lines**: Brighter/thicker lines indicate more significant potential liquidations
- **Line Breaks**: Price crossing multiple liquidation lines may trigger cascade effects
### Trading Applications
- **Support/Resistance**: Liquidation clusters often act as temporary support/resistance
- **Stop Hunt Zones**: Areas where price may spike to trigger liquidations before reversing
- **Momentum Acceleration**: Breaking through dense clusters can indicate strong directional moves
- **Risk Management**: Avoid placing stops directly at obvious liquidation levels
### Volume Profile Usage
- **POC (Point of Control)**: Price level with highest volume - often acts as strong support/resistance
- **Value Area**: Where most trading activity occurred - indicates fair value range
- **Profile Shape**: 
  - Balanced profile (bell curve) = ranging market
  - Skewed profile = trending market with acceptance at extremes
- **Profile Gaps**: Low volume areas suggest price may move quickly through these zones
### Combined Analysis
- Liquidation lines near quarterly POC create extra-strong zones
- Price returning to value area from outside often finds support/resistance
- Liquidation clusters at value area edges suggest potential reversal points
## Technical Implementation
This indicator features:
- **Custom Type Structures**: Uses type definitions for organized data storage
  - `BarData`: Stores OHLCV and index information
  - `LiquidityBin`: Manages arrays of line objects for each leverage level
  - `VolumeProfileData`: Handles profile boxes, labels, and range data
- **Dynamic Line Objects**: Creates, updates, and deletes line primitives programmatically
- **Array-Based History**: Maintains volume history for gradient calculations
- **Intelligent Cleanup**: Automatic memory management prevents performance degradation
- **Mathematical Precision**: Leverage-based liquidation formulas ensure accurate price levels
- **Quarterly Aggregation**: Efficient volume accumulation with automatic period detection
- **Box Drawing System**: Dynamic profile visualization using box primitives
## Originality Statement
This indicator presents a unique approach to liquidity visualization:
- Implements leverage-specific liquidation price calculations based on mathematical formulas
- Uses volume-weighted gradient coloring system that adapts to relative volume significance
- Combines real-time liquidation mapping with historical volume profile analysis
- Features intelligent line lifecycle management with automatic extension and cleanup
- Integrates quarterly volume profile with configurable value area and POC detection
- Employs multi-layer visual hierarchy (line width + color intensity) for information density
- Uses custom data structures to efficiently manage hundreds of line objects simultaneously
The combination of mathematical liquidation pricing, volume-based filtering, gradient visualization, and quarterly volume distribution creates a comprehensive liquidity analysis tool.
## Best Practices
- Use on liquid markets (major cryptocurrencies, forex pairs) for best accuracy
- Lower timeframes (1m-15m) for day trading and scalping
- Higher timeframes (1h-4h) for swing trading context
- Combine with volume profile to identify high-probability reversal zones
- Watch for price reactions when approaching dense liquidation clusters
- Increase volume multiplier in choppy markets to reduce noise
- Reduce maximum lines on lower timeframes to maintain performance
- Use quarterly volume profile to understand longer-term fair value
## Important Notes
- Liquidation prices are estimates based on leverage ratios
- Actual exchange liquidation prices may vary due to:
  - Maintenance margin requirements
  - Mark price vs last price calculations
  - Individual exchange liquidation engines
  - Insurance fund mechanisms
- This tool shows potential zones, not guaranteed liquidation prices
- Volume profile resets each quarter automatically
---
Works on all timeframes and asset classes. Designed for crypto/forex leverage markets. For educational purposes only. Not financial advice.
Heatmap
Malama's Heat MapOverview
Malama's Heat Map is an overlay indicator that visualizes historical liquidity as a dynamic heatmap aligned with the price chart, using volume as a proxy to map activity across time (X-axis) and price levels (Y-axis). It constructs a grid of up to 5000 cells via a matrix, distributing bar volume into discrete price bins to highlight concentration zones, creating a color-graded visualization from cool (low activity) to hot (high liquidity). This aids in identifying "Type II" fair value areas, support/resistance from past volume clusters, or potential imbalances without order book access. Built for v6 compatibility with efficiency in mind—computations run solely on the last bar, includes object limit enforcement, and offers two intra-bar volume distribution methods for flexible approximation.
Core Mechanics
The indicator generates a trailing heatmap through binning, accumulation, and box-based rendering:
Grid Setup: Configurable lookback (bars back, default 100) sets horizontal time span; bins (price divisions, default 50) define vertical resolution, limited to 5000 total cells to prevent errors. Bin height dynamically = max(mintick, (lookback high - low) / bins).
Y-Axis Stabilization: Anchors boundaries to the prior bar's high/low (if available) for a flicker-free view during live bar updates. All historical bar data (high/low/close/volume) is clipped to these bounds.
Volume Distribution Proxy:
Even: Divides bar volume equally across spanned bins (straightforward uniform spread).
POC Weighted (Inverse): Treats bar close as POC proxy; applies inverse distance weighting (1/(|bin - POC bin| + 1), normalized) to emphasize volume near the estimated control point, simulating clustered intra-bar trading.
Matrix Building: On last bar only, loops backward over lookback bars (newest right-aligned). For each, computes low/high bin indices, distributes volume per selected method into the matrix (columns=time, rows=price bins from low to high).
Scaling & Palette: Extracts max matrix value for relative normalization (0-1); maps to a 5-tier stepped color scheme (user-customizable: blue 90% transp. low → red 50% transp. high) for non-linear intensity.
Rendering: Clears old boxes, then iterates matrix to draw only non-zero cells as thin boxes: X spans one bar width (left=historical index from bar_index, right=next bar), Y fills bin height. Borderless for seamless heatmap effect.
The result is a right-leaning, chart-scrolling visualization emphasizing recent liquidity buildup.
Why This Adds Value & Originality
While session-based volume profiles exist, this heatmap captures ongoing multi-bar liquidity evolution ("Type II" style), revealing horizontal value areas or gaps dynamically. Originality shines in the custom inverse-weighting for POC realism (no ta.* dependencies), matrix-driven persistence for quick redraws, and stabilization to eliminate repaints—issues plaguing similar scripts. v6 adaptations (e.g., custom clamp, matrix recreation on input change) ensure broad compatibility without bloat. It condenses complex liquidity scanning into one tool: spot red "hot" bands as magnets, blue voids as FVGs. Unlike generic heatmaps, the proxy options and limit-aware design scale across timeframes/assets (e.g., forex vs. crypto), reducing the need for layered indicators.
How to Use
Setup: Apply as overlay. Defaults suit ~4-day 1H view; tune lookback/bins (e.g., 50x100 for intraday fine-detail, but watch 5000 cap—errors auto-flag excesses). Select "POC Weighted" for nuanced clustering, "Even" for simplicity. Customize palette (e.g., desaturate for dark themes).
Reading the Heatmap:
X-Axis (Time): Left=older (fainter context), right=recent focus; tracks evolving liquidity trails.
Y-Axis (Price): Bottom=range low, top=high; vertical density shows price-level attraction.
Colors: Faint blue (sparse volume, possible inefficiencies) → vivid red (dense activity, likely SR). Horizontal streaks = sustained value zones.
Trading Insights: Price wicking into red? Anticipate fills/reversals. Blue gaps post-break? Targets for retraces. Ideal on 5M–Daily; layer with candlesticks off for purity.
Example: In BTCUSD 4H, a yellow-red band at $60K from prior consolidation → treat as dynamic support for longs on dips.
Tips
Balance settings: High bins = sharper verticals but cap lookback (e.g., 80x60=4800 cells). Test on volatile pairs first.
"POC Weighted" excels in ranging markets; switch to "Even" for trending (avoids close-bias skew).
For deeper analysis, screenshot/export or pair with divergence tools; add manual alerts via box counts if extended.
Efficiency: Last-bar only keeps it snappy; refresh on input tweaks.
Limitations & Disclaimer
Visualization is historical/proxy-based—lagging by one bar, no forward projection or tick-level precision (close-as-POC is estimate). Clipping may trim outlier wicks; low-volume bars dilute globally. Stepped colors are relative (max scales per redraw), potentially compressing extremes. Exceeds 5000 cells? Runtime error halts—no fallback resize. Not real liquidity (volume ≠ depth); best as visual aid, not quantitative. Updates post-close only. Backtest zones on specific symbols—correlation ≠ causation. Not advice; trade responsibly. Ideas in comments!
DCT - Liquidity Heatmap - ProOVERVIEW
--------
The DCT Liquidity Heatmap Pro is an advanced order flow visualization tool designed specifically for cryptocurrency markets operating 24/7. This indicator identifies and tracks liquidity accumulation zones where significant buy and sell orders cluster, helping traders understand potential support/resistance areas and market microstructure.
WHAT IT DOES
------------
This script creates a visual heatmap of liquidity levels by analyzing volume intensity and price action across multiple timeframes. It automatically detects and displays:
- BID LEVELS (below price): Areas where buy-side liquidity accumulates
- ASK LEVELS (above price): Areas where sell-side liquidity accumulates  
- SWEPT ZONES: Levels that have been taken out by price action
- VOLUME INTENSITY: Color-coded gradient showing relative strength of each level
The indicator uses a pure gradient system:
- Purple (Low): 0-25% volume intensity
- Yellow (Mid): 25-50% volume intensity
- Orange (High): 50-75% volume intensity
- Red (Extreme): 75%+ volume intensity
When CVD (Cumulative Volume Delta) is enabled, colors adapt to show directional bias:
- Green tint: Buy pressure dominant (>60%)
- Red tint: Sell pressure dominant (<40%)
KEY FEATURES
------------
1. AUTO-DETECTION: Automatically identifies market type (BTC/ETH, Major Altcoins, Low Cap/Volatile) and exchange type (Perpetual/Spot) based on the ticker symbol
2. DYNAMIC ADJUSTMENTS: Automatically adapts spacing, level count, and retention based on:
   - Current timeframe (5m to Daily+)
   - ATR-based volatility (Low, Normal, High, Extreme)
   - Market type characteristics
3. CVD TRACKING: Optional Cumulative Volume Delta calculation showing net buy/sell pressure over time, with real-time dollar values displayed in the info table
4. SWEPT LEVEL PRESERVATION: Maintains swept levels on the chart with original color coding for historical reference and pattern analysis
5. FORWARD PROJECTION: Extends active (non-swept) levels into the future to show where liquidity currently exists
6. SMART CLEANUP: Automatic memory management removes old swept levels based on configurable retention period (default: 2000 bars)
7. IMBALANCE DETECTION: Visual markers (triangles) indicating significant buy/sell imbalances at current price
8. REAL-TIME ALERTS: Configurable alerts for:
   - Level sweeps (when price takes out a liquidity level)
   - Price approaching significant levels
9. COMPREHENSIVE INFO TABLE: Live statistics showing:
   - Auto-detection status
   - Market and exchange type
   - Current volatility state (with ATR percentage)
   - CVD values and directional bias
   - Dollar liquidity estimates above/below price
   - Count of swept and total levels
ORIGINALITY & VALUE PROPOSITION
--------------------------------
This script is completely original code developed from the ground up for cryptocurrency trading. Unlike generic liquidity indicators designed for traditional markets, this tool addresses specific challenges in crypto:
CRYPTO-SPECIFIC OPTIMIZATIONS:
- 24/7 market operation (session-based analysis removed as irrelevant for crypto)
- Higher volatility handling with ATR-based dynamic adjustments
- Perpetual vs Spot differentiation
- Market-cap based calibration (BTC/ETH, Major Alts, Low Cap)
TECHNICAL INNOVATIONS:
- Pure gradient intensity system eliminating redundant major/minor classifications
- Volume accumulation algorithm that builds strength over time
- Smart memory management preventing performance degradation on long charts
- Swept level preservation with color retention for pattern recognition
WHY CLOSED-SOURCE:
The proprietary algorithms for volume intensity calculation, dynamic parameter adjustment, and liquidity level clustering represent significant research and development. The specific mathematical models and calibration for crypto markets provide a competitive edge that warrants code protection.
WHAT THIS SCRIPT IS NOT
------------------------
IMPORTANT LIMITATIONS TO UNDERSTAND:
1. NOT PREDICTIVE: This indicator shows where liquidity EXISTS, not where price WILL go. Liquidity levels can be swept without reversals, or price may never reach certain levels. No future performance is implied or guaranteed.
2. NOT A COMPLETE SYSTEM: This is a visualization tool for understanding order flow and market microstructure. It should be used alongside proper risk management, fundamental analysis, and other technical tools. It does not generate entry/exit signals.
3. TIMEFRAME DEPENDENT: Effectiveness varies by timeframe. Lower timeframes (5m-15m) show more granular but potentially noisier data. Higher timeframes (4H-Daily) show broader structure but with less precision for intraday trading.
4. VOLUME LIMITATIONS: Crypto exchange volume data can vary significantly between exchanges and may include wash trading or other manipulated volume. The indicator works with whatever volume data your exchange provides.
5. BACKTESTING CONSTRAINTS: While swept levels are preserved historically, the indicator calculates levels in real-time. Historical visualization shows where levels WERE, not how they would have appeared to a trader in real-time at that moment.
6. NOT FOR ALL MARKETS: Optimized specifically for cryptocurrency perpetual and spot markets. May not perform optimally on traditional stocks, forex, or futures without parameter adjustment.
HOW TO USE
----------
1. Add the indicator to your chart
2. Verify auto-detection has correctly identified your market (check info table)
3. Adjust "Spacing" slider if you want wider/tighter level clustering
4. Enable CVD if you want directional volume bias analysis
5. Configure alerts for sweeps or level approaches if desired
6. Use "Compact" mode on smaller screens to reduce table size
RECOMMENDED SETTINGS BY TIMEFRAME:
- Scalping (5m-15m): Default settings, focus on immediate levels
- Swing Trading (1H-4H): Enable "Extend All" for broader view
- Position Trading (Daily+): Increase spacing 20-30% for major levels only
PERFORMANCE NOTES
-----------------
The script is optimized for performance but users should be aware:
- Maximum 500 boxes can be displayed (TradingView limitation)
- Retention set to 2000 bars by default (configurable 10-5000)
- On very long charts (>5000 bars), older swept levels will be deleted
- Lower timeframes generate more levels and may hit box limits faster
ALERT CONDITIONS
----------------
Two alert types available:
1. SWEEP ALERTS: Triggered when price takes out a liquidity level
2. PROXIMITY ALERTS: (Disabled by default) Warns when price approaches significant levels
Configure alert distance threshold in settings (default: 0.5% of price)
SUPPORT & USAGE
---------------
This is an advanced tool requiring understanding of:
- Order flow concepts and liquidity sweeps
- Volume profile interpretation  
- Crypto market microstructure
- Risk management principles
Successful use requires combining this tool with your existing trading methodology and proper risk controls. Past swept levels and current liquidity zones do not guarantee future price behavior.
TECHNICAL SPECIFICATIONS
-------------------------
- Pine Script v6
- Overlay: true
- Max boxes: 500
- Max labels: 50 (though labels removed in Pro edition)
- Memory optimized with smart cleanup routines
- Compatible with Perpetual and Spot crypto markets
NO WARRANTIES
-------------
As with all technical indicators, this tool is provided for informational and educational purposes. No representations are made regarding future performance or profitability. Trading cryptocurrencies involves substantial risk of loss. Always conduct your own research and never risk more than you can afford to lose.
The indicator displays levels based on historical and current volume data, which does not constitute investment advice or a recommendation to buy or sell. Market conditions change, and what worked in the past may not work in the future.
MILLION MEN  - MatrixWhat it is
MILLION MEN – Matrix is a confluence tool that blends a multi-horizon directional heatmap (10→120 windows, LinReg/Slope) with a refined VZO-style volume oscillator to highlight accumulation vs. overbought regimes and print concise BUY/SELL labels only when both sides align. It’s designed for visual clarity and discretionary workflows—not a black-box signal engine.
How it works (high level)
Directional heatmap: 12 windows (10..120). Counts positive vs. negative slopes.
Accumulation zone: negCnt ≥ threshold (default 12-level threshold).
Overbought zone: posCnt ≥ threshold.
Optional bar coloring with transparency.
VZO-style engine: volume direction via price delta, linear-regression normalization, optional smoothing/noise filter, and explicit repaint toggle for intrabar responsiveness.
Confluence signals:
BUY when heatmap = accumulation and VZO makes a bullish triangle (crossover from below a lower band).
SELL when heatmap = overbought and VZO makes a bearish triangle (crossunder from above an upper band).
Quality-of-life: a cyan CONFOR dot marks “green→neutral + bullish body” near recent BUY; a compact profit panel tracks entry, live/max %, TP1/TP2/TP3 stamps, and a special Exit 100% event.
How to use
Treat signals as contextual prompts. Accumulation+VZO upturn hints at potential mean-reversion/expansion; Overbought+VZO downturn warns of exhaustion. Calibrate: heatmap threshold, VZO length/bands, smoothing/noise, and the repaint setting (on = faster intrabar feedback; off = close-confirmed).
Originality & value
Instead of a simple mashup, Matrix enforces dual confirmation: breadth across 12 directional windows plus a normalized volume-pressure oscillator. The result is a stable, readable regime map with minimal labels and a built-in progress panel—useful as a primary bias filter or an add-on to your setups.
Tested markets
Primarily tested on Gold (XAUUSD) and major crypto assets (BTC, XRP, ETH, BNB, LTC).
Behavior on other symbols may vary—validate before use.
Designed for analysis on the Daily timeframe (1D). Non-standard chart types are not supported for
Limitations & transparency
Strong trends can keep regimes extended; add structure/HTF/volume confirmation.
Repaint option can change intrabar labels; use close-confirmed mode if you prefer stability.
Non-standard bar types aren’t supported for signal logic.
No future data is used. This is not financial advice.
Arabic summary (optional)
أداة “Matrix” تجمع خريطة اتجاه متعددة الآفاق (10→120) مع مذبذب حجمي محسّن بأسلوب VZO لإبراز مناطق تجميع مقابل تشبّع/ارتفاع مبالغ، وتطبع BUY/SELL فقط عند توافق الشرطين. مُجرّبة أساسًا على الذهب (XAUUSD) والعملات الرئيسية (BTC, XRP, ETH, BNB, LTC). يُنصح بالتحقق في الأسواق الأخرى وباستخدام وضع الإغلاق لمنع أي تغيّر لحظي (repaint)
: مُصمّم للتحليل على الإطار اليومي (1D). أنواع الشموع غير القياسية غير مدعومة للإشارات.
Volume Heatmap + Buy/Sell splitits the most powerful volume based heatmap you can see on this platform. It tells you when the high volume is coming into the market with clear signs.
Sell - You will see the red bar below the split to confirm its a sell and the strength or the sell you can see above the split line in various colors e.g. lite green (low) to Dark red (extra high).
Buy - If there is a Buying trade being registered, it will appear above the spit line in opaque green with the heatmap colors to show the strength of volume.
This tool will help you identify the volume strength and based on that you can plan your trade.
PS, its always recommended to not to rely on a single oscillator and combine few. I would recommend you to use RSI and S/R lines with this for better decision.
Note, this tool has been put together for educational purposes and I do not take any responsibility of your trade.
Range Oscillator (Zeiierman)█  Overview 
 Range Oscillator (Zeiierman)  is a dynamic market oscillator designed to visualize how far the price is trading relative to its equilibrium range. Instead of relying on traditional overbought/oversold thresholds, it uses adaptive range detection and heatmap coloring to reveal where price is trading within a volatility-adjusted band.
The oscillator maps market movement as a heat zone, highlighting when the price approaches the upper or lower range boundaries and signaling potential breakout or mean-reversion conditions.
   
 Highlights 
 
 Adaptive range detection based on ATR and weighted price movement.
 Heatmap-driven coloring that visualizes volatility pressure and directional bias.
 Clear transition zones for detecting trend shifts and equilibrium points.
 
█  How It Works 
 ⚪  Range Detection 
The indicator identifies a dynamic price range using two main parameters:
 
 Minimum Range Length:  The number of bars required to confirm that a valid range exists.
 Range Width Multiplier:  Expands or contracts the detected range proportionally to the ATR (Average True Range).
 
This approach ensures that the oscillator automatically adapts to both trending and ranging markets without manual recalibration.
⚪  Weighted Mean Calculation 
Instead of a simple moving average, the script calculates a weighted equilibrium mean based on the size of consecutive candle movements:
 
 Larger price changes are given greater weight, emphasizing recent volatility.
 
⚪  Oscillator Formula 
Once the range and equilibrium mean are defined, the oscillator computes:
 Osc = 100 * (Close - Mean) / RangeATR 
This normalizes price distance relative to the dynamic range size — producing consistent readings across volatile and quiet periods.
 
█  Heatmap Logic 
The Range Oscillator includes a built-in heatmap engine that color-codes each oscillator value based on recent price interaction intensity:
 
 Strong Bullish Zones:  Bright green — price faces little resistance upward.
 Weak Bullish Zones:  Muted green — uptrend continuation but with minor hesitation.
 Transition Zones:  Blue — areas of uncertainty or trend shift.
 Weak Bearish Zones:  Maroon — downtrend pressure but soft momentum.
 Strong Bearish Zones:  Bright red — strong downside continuation with low resistance.
 
 Each color band adapts dynamically using: 
 
 Number of Heat Levels:  Controls granularity of the heatmap.
 Minimum Touches per Level:  Defines how reactive or “sensitive” each color zone is.
 
█  How to Use 
⚪  Trend & Momentum Confirmation 
When the oscillator stays above +0 with green coloring, it suggests sustained bullish pressure.
   
Similarly, readings below –0 with red coloring, it suggests sustained bearish pressure.
   
⚪  Range Breakouts 
When the oscillator line breaks above +100 or below –100, the price is exceeding its normal volatility range, often signaling breakout potential or exhaustion extremes.
  
⚪  Mean Reversion Trades 
Look for the oscillator to cross back toward zero after reaching an extreme. These transitions (often marked by blue tones) can identify early reversals or range resets.
   
⚪  Divergence 
Use oscillator peaks and troughs relative to price action to spot hidden strength or weakness before the next move.
  
█  Settings 
 
 Minimum Range Length:  Number of bars needed to confirm a valid range.
 Range Width Multiplier:  Expands or contracts range width based on ATR.
 Number of Heat Levels:  Number of gradient bands used in the oscillator.
 Minimum Touches per Level:  Sensitivity threshold for when a zone becomes “hot.”
 
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Historical Matrix Analyzer [PhenLabs]📊Historical Matrix Analyzer  
 Version:  PineScriptv6
 📌Description 
The Historical Matrix Analyzer is an advanced probabilistic trading tool that transforms technical analysis into a data-driven decision support system. By creating a comprehensive 56-cell matrix that tracks every combination of RSI states and multi-indicator conditions, this indicator reveals which market patterns have historically led to profitable outcomes and which have not.
At its core, the indicator continuously monitors seven distinct RSI states (ranging from Extreme Oversold to Extreme Overbought) and eight unique indicator combinations (MACD direction, volume levels, and price momentum). For each of these 56 possible market states, the system calculates average forward returns, win rates, and occurrence counts based on your configurable lookback period. The result is a color-coded probability matrix that shows you exactly where you stand in the historical performance landscape.
The standout feature is the Current State Panel, which provides instant clarity on your active market conditions. This panel displays signal strength classifications (from Strong Bullish to Strong Bearish), the average return percentage for similar past occurrences, an estimated win rate using Bayesian smoothing to prevent small-sample distortions, and a confidence level indicator that warns you when insufficient data exists for reliable conclusions.
 🚀Points of Innovation 
 
 Multi-dimensional state classification combining 7 RSI levels with 8 indicator combinations for 56 unique trackable market conditions
 Bayesian win rate estimation with adjustable smoothing strength to provide stable probability estimates even with limited historical samples
 Real-time active cell highlighting with “NOW” marker that visually connects current market conditions to their historical performance data
 Configurable color intensity sensitivity allowing traders to adjust heat-map responsiveness from conservative to aggressive visual feedback
 Dual-panel display system separating the comprehensive statistics matrix from an easy-to-read current state summary panel
 Intelligent confidence scoring that automatically warns traders when occurrence counts fall below reliable thresholds
 
 🔧Core Components 
 
 RSI State Classification:  Segments RSI readings into 7 distinct zones (Extreme Oversold <20, Oversold 20-30, Weak 30-40, Neutral 40-60, Strong 60-70, Overbought 70-80, Extreme Overbought >80) to capture momentum extremes and transitions
 Multi-Indicator Condition Tracking:  Simultaneously monitors MACD crossover status (bullish/bearish), volume relative to moving average (high/low), and price direction (rising/falling) creating 8 binary-encoded combinations
 Historical Data Storage Arrays:  Maintains rolling lookback windows storing RSI states, indicator states, prices, and bar indices for precise forward-return calculations
 Forward Performance Calculator:  Measures price changes over configurable forward bar periods (1-20 bars) from each historical state, accumulating total returns and win counts per matrix cell
 Bayesian Smoothing Engine:  Applies statistical prior assumptions (default 50% win rate) weighted by user-defined strength parameter to stabilize estimated win rates when sample sizes are small
 Dynamic Color Mapping System:  Converts average returns into color-coded heat map with intensity adjusted by sensitivity parameter and transparency modified by confidence levels
 
 🔥Key Features 
 
 56-Cell Probability Matrix:  Comprehensive grid displaying every possible combination of RSI state and indicator condition, with each cell showing average return percentage, estimated win rate, and occurrence count for complete statistical visibility
 Current State Info Panel:  Dedicated display showing your exact position in the matrix with signal strength emoji indicators, numerical statistics, and color-coded confidence warnings for immediate situational awareness
 Customizable Lookback Period:  Adjustable historical window from 50 to 500 bars allowing traders to focus on recent market behavior or capture longer-term pattern stability across different market cycles
 Configurable Forward Performance Window:  Select target holding periods from 1 to 20 bars ahead to align probability calculations with your trading timeframe, whether day trading or swing trading
 Visual Heat Mapping:  Color-coded cells transition from red (bearish historical performance) through gray (neutral) to green (bullish performance) with intensity reflecting statistical significance and occurrence frequency
 Intelligent Data Filtering:  Minimum occurrence threshold (1-10) removes unreliable patterns with insufficient historical samples, displaying gray warning colors for low-confidence cells
 Flexible Layout Options:  Independent positioning of statistics matrix and info panel to any screen corner, accommodating different chart layouts and personal preferences
 Tooltip Details:  Hover over any matrix cell to see full RSI label, complete indicator status description, precise average return, estimated win rate, and total occurrence count
 
 🎨Visualization 
 
 Statistics Matrix Table:  A 9-column by 8-row grid with RSI states labeling vertical axis and indicator combinations on horizontal axis, using compact abbreviations (XOverS, OverB, MACD↑, Vol↓, P↑) for space efficiency
 Active Cell Indicator:  The current market state cell displays “⦿ NOW ⦿” in yellow text with enhanced color saturation to immediately draw attention to relevant historical performance
 Signal Strength Visualization:  Info panel uses emoji indicators (🔥 Strong Bullish, ✅ Bullish, ↗️ Weak Bullish, ➖ Neutral, ↘️ Weak Bearish, ⛔ Bearish, ❄️ Strong Bearish, ⚠️ Insufficient Data) for rapid interpretation
 Histogram Plot:  Below the price chart, a green/red histogram displays the current cell’s average return percentage, providing a time-series view of how historical performance changes as market conditions evolve
 Color Intensity Scaling:  Cell background transparency and saturation dynamically adjust based on both the magnitude of average returns and the occurrence count, ensuring visual emphasis on reliable patterns
 Confidence Level Display:  Info panel bottom row shows “High Confidence” (green), “Medium Confidence” (orange), or “Low Confidence” (red) based on occurrence counts relative to minimum threshold multipliers
 
 📖Usage Guidelines 
 RSI Period 
 
 Default: 14
 Range: 1 to unlimited
 Description: Controls the lookback period for RSI momentum calculation. Standard 14-period provides widely-recognized overbought/oversold levels. Decrease for faster, more sensitive RSI reactions suitable for scalping. Increase (21, 28) for smoother, longer-term momentum assessment in swing trading. Changes affect how quickly the indicator moves between the 7 RSI state classifications.
 
 MACD Fast Length 
 
 Default: 12
 Range: 1 to unlimited
 Description: Sets the faster exponential moving average for MACD calculation. Standard 12-period setting works well for daily charts and captures short-term momentum shifts. Decreasing creates more responsive MACD crossovers but increases false signals. Increasing smooths out noise but delays signal generation, affecting the bullish/bearish indicator state classification.
 
 MACD Slow Length 
 
 Default: 26
 Range: 1 to unlimited
 Description: Defines the slower exponential moving average for MACD calculation. Traditional 26-period setting balances trend identification with responsiveness. Must be greater than Fast Length. Wider spread between fast and slow increases MACD sensitivity to trend changes, impacting the frequency of indicator state transitions in the matrix.
 
 MACD Signal Length 
 
 Default: 9
 Range: 1 to unlimited
 Description: Smoothing period for the MACD signal line that triggers bullish/bearish state changes. Standard 9-period provides reliable crossover signals. Shorter values create more frequent state changes and earlier signals but with more whipsaws. Longer values produce more confirmed, stable signals but with increased lag in detecting momentum shifts.
 
 Volume MA Period 
 
 Default: 20
 Range: 1 to unlimited
 Description: Lookback period for volume moving average used to classify volume as “high” or “low” in indicator state combinations. 20-period default captures typical monthly trading patterns. Shorter periods (10-15) make volume classification more reactive to recent spikes. Longer periods (30-50) require more sustained volume changes to trigger state classification shifts.
 
 Statistics Lookback Period 
 
 Default: 200
 Range: 50 to 500
 Description: Number of historical bars used to calculate matrix statistics. 200 bars provides substantial data for reliable patterns while remaining responsive to regime changes. Lower values (50-100) emphasize recent market behavior and adapt quickly but may produce volatile statistics. Higher values (300-500) capture long-term patterns with stable statistics but slower adaptation to changing market dynamics.
 
 Forward Performance Bars 
 
 Default: 5
 Range: 1 to 20
 Description: Number of bars ahead used to calculate forward returns from each historical state occurrence. 5-bar default suits intraday to short-term swing trading (5 hours on hourly charts, 1 week on daily charts). Lower values (1-3) target short-term momentum trades. Higher values (10-20) align with position trading and longer-term pattern exploitation.
 
 Color Intensity Sensitivity 
 
 Default: 2.0
 Range: 0.5 to 5.0, step 0.5
 Description: Amplifies or dampens the color intensity response to average return magnitudes in the matrix heat map. 2.0 default provides balanced visual emphasis. Lower values (0.5-1.0) create subtle coloring requiring larger returns for full saturation, useful for volatile instruments. Higher values (3.0-5.0) produce vivid colors from smaller returns, highlighting subtle edges in range-bound markets.
 
 Minimum Occurrences for Coloring 
 
 Default: 3
 Range: 1 to 10
 Description: Required minimum sample size before applying color-coded performance to matrix cells. Cells with fewer occurrences display gray “insufficient data” warning. 3-occurrence default filters out rare patterns. Lower threshold (1-2) shows more data but includes unreliable single-event statistics. Higher thresholds (5-10) ensure only well-established patterns receive visual emphasis.
 
 Table Position 
 
 Default: top_right
 Options: top_left, top_right, bottom_left, bottom_right
 Description: Screen location for the 56-cell statistics matrix table. Position to avoid overlapping critical price action or other indicators on your chart. Consider chart orientation and candlestick density when selecting optimal placement.
 
 Show Current State Panel 
 
 Default: true
 Options: true, false
 Description: Toggle visibility of the dedicated current state information panel. When enabled, displays signal strength, RSI value, indicator status, average return, estimated win rate, and confidence level for active market conditions. Disable to declutter charts when only the matrix table is needed.
 
 Info Panel Position 
 
 Default: bottom_left
 Options: top_left, top_right, bottom_left, bottom_right
 Description: Screen location for the current state information panel (when enabled). Position independently from statistics matrix to optimize chart real estate. Typically placed opposite the matrix table for balanced visual layout.
 
 Win Rate Smoothing Strength 
 
 Default: 5
 Range: 1 to 20
 Description: Controls Bayesian prior weighting for estimated win rate calculations. Acts as virtual sample size assuming 50% win rate baseline. Default 5 provides moderate smoothing preventing extreme win rate estimates from small samples. Lower values (1-3) reduce smoothing effect, allowing win rates to reflect raw data more directly. Higher values (10-20) increase conservatism, pulling win rate estimates toward 50% until substantial evidence accumulates.
 
 ✅Best Use Cases 
 
 Pattern-based discretionary trading where you want historical confirmation before entering setups that “look good” based on current technical alignment
 Swing trading with holding periods matching your forward performance bar setting, using high-confidence bullish cells as entry filters
 Risk assessment and position sizing, allocating larger size to trades originating from cells with strong positive average returns and high estimated win rates
 Market regime identification by observing which RSI states and indicator combinations are currently producing the most reliable historical patterns
 Backtesting validation by comparing your manual strategy signals against the historical performance of the corresponding matrix cells
 Educational tool for developing intuition about which technical condition combinations have actually worked versus those that feel right but lack historical evidence
 
 ⚠️Limitations 
 
 Historical patterns do not guarantee future performance, especially during unprecedented market events or regime changes not represented in the lookback period
 Small sample sizes (low occurrence counts) produce unreliable statistics despite Bayesian smoothing, requiring caution when acting on low-confidence cells
 Matrix statistics lag behind rapidly changing market conditions, as the lookback period must accumulate new state occurrences before updating performance data
 Forward return calculations use fixed bar periods that may not align with actual trade exit timing, support/resistance levels, or volatility-adjusted profit targets
 
 💡What Makes This Unique 
 
 Multi-Dimensional State Space:  Unlike single-indicator tools, simultaneously tracks 56 distinct market condition combinations providing granular pattern resolution unavailable in traditional technical analysis
 Bayesian Statistical Rigor:  Implements proper probabilistic smoothing to prevent overconfidence from limited data, a critical feature missing from most pattern recognition tools
 Real-Time Contextual Feedback:  The “NOW” marker and dedicated info panel instantly connect current market conditions to their historical performance profile, eliminating guesswork
 Transparent Occurrence Counts:  Displays sample sizes directly in each cell, allowing traders to judge statistical reliability themselves rather than hiding data quality issues
 Fully Customizable Analysis Window:  Complete control over lookback depth and forward return horizons lets traders align the tool precisely with their trading timeframe and strategy requirements
 
 🔬How It Works 
 1. State Classification and Encoding 
 
 Each bar’s RSI value is evaluated and assigned to one of 7 discrete states based on threshold levels (0: <20, 1: 20-30, 2: 30-40, 3: 40-60, 4: 60-70, 5: 70-80, 6: >80)
 Simultaneously, three binary conditions are evaluated: MACD line position relative to signal line, current volume relative to its moving average, and current close relative to previous close
 These three binary conditions are combined into a single indicator state integer (0-7) using binary encoding, creating 8 possible indicator combinations
 The RSI state and indicator state are stored together, defining one of 56 possible market condition cells in the matrix
 
 2. Historical Data Accumulation 
 
 As each bar completes, the current state classification, closing price, and bar index are stored in rolling arrays maintained at the size specified by the lookback period
 When the arrays reach capacity, the oldest data point is removed and the newest added, creating a sliding historical window
 This continuous process builds a comprehensive database of past market conditions and their subsequent price movements
 
 3. Forward Return Calculation and Statistics Update 
 
 On each bar, the indicator looks back through the stored historical data to find bars where sufficient forward bars exist to measure outcomes
 For each historical occurrence, the price change from that bar to the bar N periods ahead (where N is the forward performance bars setting) is calculated as a percentage return
 This percentage return is added to the cumulative return total for the specific matrix cell corresponding to that historical bar’s state classification
 Occurrence counts are incremented, and wins are tallied for positive returns, building comprehensive statistics for each of the 56 cells
 The Bayesian smoothing formula combines these raw statistics with prior assumptions (neutral 50% win rate) weighted by the smoothing strength parameter to produce estimated win rates that remain stable even with small samples
 
 💡Note: 
The Historical Matrix Analyzer is designed as a decision support tool, not a standalone trading system. Best results come from using it to validate discretionary trade ideas or filter systematic strategy signals. Always combine matrix insights with proper risk management, position sizing rules, and awareness of broader market context. The estimated win rate feature uses Bayesian statistics specifically to prevent false confidence from limited data, but no amount of smoothing can create reliable predictions from fundamentally insufficient sample sizes. Focus on high-confidence cells (green-colored confidence indicators) with occurrence counts well above your minimum threshold for the most actionable insights.
Project Pegasus SideMap • VRP Heatmap • Volume Node DetectionDescription   CME_MINI:NQ1!  
 Project Pegasus – Volume SideMap V 1.0 builds a right-anchored horizontal volume heatmap silhouette, visualizing buy/sell participation per price level over any chosen lookback or visible range. It automatically detects Low-Volume Nodes (LVN), Medium-Volume Nodes (MVN), and High-Volume Nodes (HVN), while also marking Top Volume Peaks, POI Lines (Most-Touched Levels), and complete Value Area Levels (POC / VAH / VAL) including optional session highs/lows. 
 What’s Unique 
 Right-Fixed Rendering – All profile rows are anchored to the chart’s right edge, creating a consistent visual reference during live trading.
Gap-Free Silhouette – Each price row blends seamlessly with its neighbors, producing a clean and continuous volume shape.
Triple-Tier Node Detection (LVN / MVN / HVN) – Automatically highlights zones of rejection, transition, and acceptance based on relative volume strength.
Dynamic Binning System – Adapts to price range and lookback while preserving proportional per-row volume distribution.
POI Finder (Most Touches) – Highlights price rows that have been touched most frequently by bars (traffic clusters).
Top-N Peaks – Sorts and draws the strongest single-price clusters by total volume while respecting minimum spacing.
Integrated Value Area Metrics – Calculates and plots POC, VAH, and VAL with optional session High/Low markers.
Color Modes – Choose between heatmap intensity (volume-based) or buy/sell ratio blending for directional context.
Performance Optimized – Rebuilds only when structure changes, ensuring smooth operation even with large histories. 
 Technical Overview  
 1. Binning & Aggregation
The full price range is divided into a user-defined number of rows (bins) of equal height.
For each bar, traded volume is distributed across all intersecting bins proportionally to price overlap.
A buy/sell proxy is estimated based on candle close position, producing per-row Buy, Sell, and Total Volume arrays.
2. Silhouette Rendering
Each row’s strength = total volume ÷ maximum volume.
Two color modes:
• Volume Mode → intensity scales by relative volume (heatmap).
• Ratio Mode → blend between sell and buy base colors based on dominance (close position).
Weak or neutral rows can be faded or forced to minimum width via strength and ratio-deviation filters.
3. Node Detection (LVN / MVN / HVN)
Relative bands are defined by lower/upper % thresholds.
Consecutive rows meeting criteria are grouped into “bands.”
Optional gap-merge unifies nearby bands separated by small gaps (in ticks).
Quality filters:
• Min. Average in Band (%) → enforces minimum average participation.
• Min. Prominence vs. Neighbors (%) → compares contrast against adjacent volume peaks.
Enforces minimum center distance (in ticks) to prevent overlap.
Each valid band draws a Top/Bottom line pair and optional mid-label (LVN/MVN/HVN).
4. Volume Peaks
Ranks all rows by total volume (descending) and selects top N peaks with spacing filters.
Drawn as horizontal lines or labeled markers (P1, P2, etc.).
5. POI Lines (Most Touches)
During aggregation, each row counts how many bars overlap it.
The top X rows with highest touch counts are drawn as POI lines—often strong participation or mean-retest zones.
6. Value Area (POC / VAH / VAL)
POC = row with highest total volume.
Expands outward symmetrically until the configured Value Area % of total volume is covered.
VAH and VAL mark the acceptance range; optional High/Low lines outline total range boundaries.
7. Right-Fix Layout
All components are rendered relative to the chart’s rightmost bar.
Width dynamically scales with visible bars × % width setting, ensuring proportional scaling across zoom levels.
 How to Use 
Read market structure:
HVNs = high acceptance or balance areas → likely mean-reversion zones.
LVNs = thin participation → breakout or rejection points (“air pockets”).
MVNs = transition areas between acceptance and rejection.
Trade around POC / VAH / VAL:
These levels represent fair-value boundaries and rotational pivots.
POI & Peaks:
Use them as strong reference lines for responsive trading decisions.
Ratio-Color Mode:
Exposes directional imbalance and potential absorption zones visually.
Best practice:
Live trading → right-fix active, moderate row count.
Post-session analysis → higher granularity, LVN/HVN/MVN and peaks enabled with labels. 
 Key Settings 
 Core
Lookback length or visible-range mode
Row count (granularity)
Profile width (% of visible bars)
Right offset, minimum box width, transparency
Date Filter
Aggregate only bars from a defined start date onward.
Coloring
Buy/Sell ratio mode toggle
Base colors for buy and sell volume
Filters
Minimum ratio deviation (±) → ignore nearly balanced rows
Minimum volume strength (%) → fade weak rows
LVN / MVN / HVN Detection
Independent enable toggles
Lower/upper % thresholds
Minimum band height (rows)
Merge small gaps (ticks)
Minimum average in band (%)
Minimum prominence vs. neighbors (%)
Minimum distance between bands (ticks)
Line color, width, style, and label options
Peaks
Number of peaks (0–20)
Minimum distance between peaks (ticks)
Color, width, style, label placement
POI Lines
Enable toggle
POI count (1–5)
Minimum gap between POIs (rows)
Color, width, style, label offset
Value Levels (POC / VAH / VAL)
Show/hide Value Area Levels
Value Area % coverage
POC / VAH / VAL line styles, widths, colors
Optional Session High/Low lines 
 Notes & Limitations 
 Optimized for intraday and swing data; accuracy depends on chart volume granularity.
Large lookbacks with high row counts and all detection layers enabled may impact performance—adjust parameters for balance.
Buy/Sell ratio is a visual approximation based on candle structure, not actual order-book delta.
Designed as a contextual visualization tool, not a trade signal generator. 
 Disclaimer 
 For educational and informational purposes only.
Not financial advice.
Tick-Based Delta Volume BubblesTICK-BASED DELTA VOLUME BUBBLES
OVERVIEW
A real-time order flow indicator that displays volume delta at the tick level, helping traders identify buying and selling pressure as it develops during live market hours. Unlike traditional volume delta indicators that rely on bar close data, this indicator captures actual tick-by-tick volume changes and directional bias, providing granular insight into market dynamics.
HOW IT WORKS
The indicator monitors live tick data during real-time trading by tracking volume increases between consecutive price updates. Each time volume increments, the script calculates the volume delta, determines price direction, assigns directional bias to the volume, and accumulates net delta for each bar.
This methodology is identical to the tick detection mechanism used in professional cumulative volume delta tools, ensuring accuracy and reliability.
FEATURES
Real-Time Tick Detection
- Captures genuine tick-by-tick volume flow using varip persistence
- Not estimated from OHLC data
- Processes actual market ticks as they occur
Adaptive Bubble Sizing
- Bubbles scale based on delta strength relative to a customizable moving average (default 20 bars)
- Highlights significant order flow imbalances
- Five size levels from tiny to huge
Dual Display Modes
- Normal Mode: Sized bubbles with optional volume labels positioned at bar midpoint
- Minimal Mode: Clean dots above/below bars for unobtrusive delta visualization
Flow Classification
- Aggressive Buy (bright green): Strong positive delta with greater than 1.2x strength
- Aggressive Sell (bright red): Strong negative delta with greater than 1.2x strength
- Passive Buy (light green): Moderate positive delta
- Passive Sell (light red): Moderate negative delta
Intensity Mode (Optional)
- Gray: Low intensity (less than 0.5x average)
- Blue: Medium intensity (0.5-1.0x average)
- Orange: High intensity (1.0-2.0x average)
- Red: Extreme intensity (greater than 2.0x average)
Smart Filtering
- Percentile-based filters (customizable) ensure only significant delta events are displayed
- Reduces chart clutter while highlighting important order flow
- Separate thresholds for bubble display and numeric labels
Data Collection Status
- Optional progress box in top-right corner
- Shows real-time bar collection progress
- Displays percentage completion and bars remaining
- Automatically hides when sufficient data is collected
Hide Until Ready Option
- Suppresses bubble display until the averaging period is complete
- Prevents misleading signals from incomplete data
- Default requires 20 bars before displaying bubbles
SETTINGS
Delta Average Length (1-200, default 20)
- Lookback period for calculating delta strength baseline
- Higher values = longer-term delta comparison
- Lower values = more sensitive to recent changes
Hide Bubbles Until Enough Data
- Prevents display until averaging period completes
- Ensures reliable delta strength calculations
Show Data Collection Status Box
- Displays progress indicator during initialization
- Can be disabled if you understand the warmup period
Minimal Mode
- Switches to simple dot display above/below bars
- Green dots above bars = positive delta
- Red dots below bars = negative delta
- Maintains color intensity or flow type classification
Show Bubbles
- Master toggle for bubble display
Bubble Volume Percentile (0-100, default 60)
- Minimum percentile rank required to display bubble
- Higher values = fewer, more significant bubbles
- Lower values = more bubbles displayed
Show Numbers in Bubbles
- Toggle delta value labels
- Only appears in normal mode
- Disabled automatically in minimal mode
Label Volume Percentile (0-100, default 90)
- Higher threshold for displaying numeric labels
- Typically set higher than bubble percentile
- Reduces label clutter on chart
Intensity Mode
- Switch from flow-type coloring to magnitude-based coloring
- Useful for identifying volume spikes regardless of direction
IMPORTANT NOTES
Real-Time Only: This indicator processes live tick data and does not provide historical analysis. It begins collecting data when added to a live chart.
Volume Required: Symbol must have volume data available. Will not function on symbols without volume (most forex pairs from retail brokers).
Initialization Period: Requires the specified number of bars (default 20) to calculate accurate delta strength. Use the "Hide Until Ready" option to prevent premature signals.
Market Hours: Only collects data during live market hours. Does not backfill historical data.
CREDITS
Tick detection methodology inspired by the Kioseff Trading Tick CVD indicator. This implementation adapts the same core tick-level volume delta calculation for bubble-style visualization and per-bar delta analysis.
Seasonality Heatmap [QuantAlgo]🟢 Overview 
The  Seasonality Heatmap  analyzes years of historical data to reveal which months and weekdays have consistently produced gains or losses, displaying results through color-coded tables with statistical metrics like consistency scores (1-10 rating) and positive occurrence rates. By calculating average returns for each calendar month and day-of-week combination, it identifies recognizable seasonal patterns (such as which months or weekdays tend to rally versus decline) and synthesizes this into actionable buy low/sell high timing possibilities for strategic entries and exits. This helps traders and investors spot high-probability seasonal windows where assets have historically shown strength or weakness, enabling them to align positions with recurring bull and bear market patterns.
  
 🟢 How It Works 
 1. Monthly Heatmap 
  
 How % Return is Calculated: 
 
 The indicator fetches monthly closing prices (or Open/High/Low based on user selection) and calculates the percentage change from the previous month:
 (Current Month Price - Previous Month Price) / Previous Month Price × 100 
 Each cell in the heatmap represents one month's return in a specific year, creating a multi-year historical view
 Colors indicate performance intensity: greener/brighter shades for higher positive returns, redder/brighter shades for larger negative returns
 
 What Averages Mean: 
  
 
 The "Avg %" row displays the arithmetic mean of all historical returns for each calendar month (e.g., averaging all Januaries together, all Februaries together, etc.)
 This metric identifies historically recurring patterns by showing which months have tended to rise or fall on average
 Positive averages indicate months that have typically trended upward; negative averages indicate historically weaker months
 Example: If April shows +18.56% average, it means April has averaged a 18.56% gain across all years analyzed
 
 What Months Up % Mean: 
  
 
 Shows the percentage of historical occurrences where that month had a positive return (closed higher than the previous month)
 Calculated as:
 (Number of Months with Positive Returns / Total Months) × 100 
 Values above 50% indicate the month has been positive more often than negative; below 50% indicates more frequent negative months
 Example: If October shows "64%", then 64% of all historical Octobers had positive returns
 
 What Consistency Score Means: 
  
 
 A 1-10 rating that measures how predictable and stable a month's returns have been
 Calculated using the coefficient of variation (standard deviation / mean) - lower variation = higher consistency
 High scores (8-10, green): The month has shown relatively stable behavior with similar outcomes year-to-year
 Medium scores (5-7, gray): Moderate consistency with some variability
 Low scores (1-4, red): High variability with unpredictable behavior across different years
 Example: A consistency score of 8/10 indicates the month has exhibited recognizable patterns with relatively low deviation
 
 What Best Means: 
  
 
 Shows the highest percentage return achieved for that specific month, along with the year it occurred
 Reveals the maximum observed upside and identifies outlier years with exceptional performance
 Useful for understanding the range of possible outcomes beyond the average
 Example: "Best: 2016: +131.90%" means the strongest January in the dataset was in 2016 with an 131.90% gain
 
 What Worst Means: 
  
 
 Shows the most negative percentage return for that specific month, along with the year it occurred
 Reveals maximum observed downside and helps understand the range of historical outcomes
 Important for risk assessment even in months with positive averages
 Example: "Worst: 2022: -26.86%" means the weakest January in the dataset was in 2022 with a 26.86% loss
 
 2. Day-of-Week Heatmap 
  
 How % Return is Calculated: 
 
 Calculates the percentage change from the previous day's close to the current day's price (based on user's price source selection)
 Returns are aggregated by day of the week within each calendar month (e.g., all Mondays in January, all Tuesdays in January, etc.)
 Each cell shows the average performance for that specific day-month combination across all historical data
 Formula:
 (Current Day Price - Previous Day Close) / Previous Day Close × 100 
 
 What Averages Mean: 
  
 
 The "Avg %" row at the bottom aggregates all months together to show the overall average return for each weekday
 Identifies broad weekly patterns across the entire dataset
 Calculated by summing all daily returns for that weekday across all months and dividing by total observations
 Example: If Monday shows +0.04%, Mondays have averaged a 0.04% change across all months in the dataset
 
 What Days Up % Mean: 
  
 
 Shows the percentage of historical occurrences where that weekday had a positive return
 Calculated as:
 (Number of Positive Days / Total Days Observed) × 100 
 Values above 50% indicate the day has been positive more often than negative; below 50% indicates more frequent negative days
 Example: If Fridays show "54%", then 54% of all Fridays in the dataset had positive returns
 
 What Consistency Score Means: 
  
 
 A 1-10 rating measuring how stable that weekday's performance has been across different months
 Based on the coefficient of variation of daily returns for that weekday across all 12 months
 High scores (8-10, green): The weekday has shown relatively consistent behavior month-to-month
 Medium scores (5-7, gray): Moderate consistency with some month-to-month variation
 Low scores (1-4, red): High variability across months, with behavior differing significantly by calendar month
 Example: A consistency score of 7/10 for Wednesdays means they have performed with moderate consistency throughout the year
 
 What Best Means: 
  
 
 Shows which calendar month had the strongest average performance for that specific weekday
 Identifies favorable day-month combinations based on historical data
 Format shows the month abbreviation and the average return achieved
 Example: "Best: Oct: +0.20%" means Mondays averaged +0.20% during October months in the dataset
 
 What Worst Means: 
  
 
 Shows which calendar month had the weakest average performance for that specific weekday
 Identifies historically challenging day-month combinations
 Useful for understanding which month-weekday pairings have shown weaker performance
 Example: "Worst: Sep: -0.35%" means Tuesdays averaged -0.35% during September months in the dataset
 
 3. Optimal Timing Table/Summary Table 
  
 → Best Month to BUY:  Identifies the month with the lowest average return (most negative or least positive historically), representing periods where prices have historically been relatively lower
 
 Based on the observation that buying during historically weaker months may position for subsequent recovery
 Shows the month name, its average return, and color-coded performance
 Example: If May shows -0.86% as "Best Month to BUY", it means May has historically averaged -0.86% in the analyzed period
 
 → Best Month to SELL:  Identifies the month with the highest average return (most positive historically), representing periods where prices have historically been relatively higher
 
 Based on historical strength patterns in that month
 Example: If July shows +1.42% as "Best Month to SELL", it means July has historically averaged +1.42% gains
 
 → 2nd Best Month to BUY:  The second-lowest performing month based on average returns
 
 Provides an alternative timing option based on historical patterns
 Offers flexibility for staged entries or when the primary month doesn't align with strategy
 Example: Identifies the next-most favorable historical buying period
 
 → 2nd Best Month to SELL:  The second-highest performing month based on average returns
 
 Provides an alternative exit timing based on historical data
 Useful for staged profit-taking or multiple exit opportunities
 Identifies the secondary historical strength period
 
 Note:  The same logic applies to "Best Day to BUY/SELL" and "2nd Best Day to BUY/SELL" rows, which identify weekdays based on average daily performance across all months. Days with lowest averages are marked as buying opportunities (historically weaker days), while days with highest averages are marked for selling (historically stronger days).
 🟢 Examples 
 
 Example 1:  NVIDIA  NASDAQ:NVDA  - Strong May Pattern with High Consistency
 
  
Analyzing NVIDIA from 2015 onwards, the Monthly Heatmap reveals May averaging +15.84% with 82% of months being positive and a consistency score of 8/10 (green). December shows -1.69% average with only 40% of months positive and a low 1/10 consistency score (red). The Optimal Timing table identifies December as "Best Month to BUY" and May as "Best Month to SELL." A trader recognizes this high-probability May strength pattern and considers entering positions in late December when prices have historically been weaker, then taking profits in May when the seasonal tailwind typically peaks. The high consistency score in May (8/10) provides additional confidence that this pattern has been relatively stable year-over-year.
 
 Example 2:  Crypto Market Cap  CRYPTOCAP:TOTALES  - October Rally Pattern
 
  
An investor examining total crypto market capitalization notices September averaging -2.42% with 45% of months positive and 5/10 consistency, while October shows a dramatic shift with +16.69% average, 90% of months positive, and an exceptional 9/10 consistency score (blue). The Day-of-Week heatmap reveals Mondays averaging +0.40% with 54% positive days and 9/10 consistency (blue), while Thursdays show only +0.08% with 1/10 consistency (yellow). The investor uses this multi-layered analysis to develop a strategy: enter crypto positions on Thursdays during late September (combining the historically weak month with the less consistent weekday), then hold through October's historically strong period, considering exits on Mondays when intraweek strength has been most consistent.
 
 Example 3:  Solana  BINANCE:SOLUSDT  - Extreme January Seasonality
 
  
A cryptocurrency trader analyzing Solana observes an extraordinary January pattern: +59.57% average return with 60% of months positive and 8/10 consistency (teal), while May shows -9.75% average with only 33% of months positive and 6/10 consistency. August also displays strength at +59.50% average with 7/10 consistency. The Optimal Timing table confirms May as "Best Month to BUY" and January as "Best Month to SELL." The Day-of-Week data shows Sundays averaging +0.77% with 8/10 consistency (teal). The trader develops a seasonal rotation strategy: accumulate SOL positions during May weakness, hold through the historically strong January period (which has shown this extreme pattern with reasonable consistency), and specifically target Sunday exits when the weekday data shows the most recognizable strength pattern.
Volume Cluster Heatmap [BackQuant]Volume Cluster Heatmap  
A visualization tool that maps traded volume across price levels over a chosen lookback period. It highlights where the market builds balance through heavy participation and where it moves efficiently through low-volume zones. By combining a heatmap, volume profile, and high/low volume node detection, this indicator reveals structural areas of support, resistance, and liquidity that drive price behavior.
 What Are Volume Clusters? 
A volume cluster is a horizontal aggregation of traded volume at specific price levels, showing where market participants concentrated their buying and selling.
 High Volume Nodes (HVN) : Price levels with significant trading activity; often act as support or resistance.
 Low Volume Nodes (LVN) : Price levels with little trading activity; price moves quickly through these areas, reflecting low liquidity.
Volume clusters help identify key structural zones, reveal potential reversals, and gauge market efficiency by highlighting where the market is balanced versus areas of thin liquidity.
By creating heatmaps, profiles, and highlighting high and low volume nodes (HVNs and LVNs), it allows traders to see where the market builds balance and where it moves efficiently through thin liquidity zones. 
Example: Bitcoin breaking away from the high-volume zone near 118k and moving cleanly through the low-volume pocket around 113k–115k, illustrating how markets seek efficiency: 
 Core Features 
 Visual Analysis Components: 
 
 Heatmap Display : Displays volume intensity as colored boxes, lines, or a combination for a dynamic view of market participation.
 Volume Profile Overlay : Shows cumulative volume per price level along the right-hand side of the chart.
 HVN & LVN Labels : Marks high and low volume nodes with color-coded lines and labels.
 Customizable Colors & Transparency : Adjust high and low volume colors and minimum transparency for clear differentiation.
 Session Reset & Timeframe Control : Dynamically resets clusters at the start of new sessions or chosen timeframes (intraday, daily, weekly).
 
 Alerts 
 
 HVN / LVN Alerts : Notify when price reaches a significant high or low volume node.
 High Volume Zone Alerts : Trigger when price enters the top X% of cumulative volume, signaling key areas of market interest.
 
 How It Works 
Each bar’s volume is distributed proportionally across the horizontal price levels it touches. Over the lookback period, this builds a cumulative volume profile, identifying price levels with the most and least trading activity. The highest cumulative volume levels become HVNs, while the lowest are LVNs. A side volume profile shows aggregated volume per level, and a heatmap overlay visually reinforces market structure.
 Applications for Traders 
 
 Identify strong support and resistance at HVNs.
 Detect areas of low liquidity where price may move quickly (LVNs).
 Determine market balance zones where price may consolidate.
 Filter noise: because volume clusters aggregate activity into levels, minor fluctuations and irrelevant micro-moves are removed, simplifying analysis and improving strategy development.
 Combine with other indicators such as VWAP, Supertrend, or CVD for higher-probability entries and exits.
 Use volume clusters to anticipate price reactions to breaking points in thin liquidity zones.
 
 Advanced Display Options 
 
   Heatmap Styles : Boxes, lines, or both. Boxes provide a traditional heatmap, lines are better for high granularity data.
   Line Mode Example : Simplified line visualization for easier reading at high level counts: 
 Profile Width & Offset : Adjust spacing and placement of the volume profile for clarity alongside price.
   Transparency Control : Lower transparency for more opaque visualization of high-volume zones.
 
 Best Practices for Usage 
 
 Reduce the number of levels when using line mode to avoid clutter.
 Use HVN and LVN markers in conjunction with volume profiles to plan entries and exits.
 Apply session resets to monitor intraday vs. multi-day volume accumulation.
 Combine with other technical indicators to confirm high-probability trading signals.
 Watch price interactions with LVNs for potential rapid movements and with HVNs for possible support/resistance or reversals.
 
 Technical Notes 
 
  Each bar contributes volume proportionally to the price levels it spans, creating a dynamic and accurate representation of traded interest.
 Volume profiles are scaled and offset for visual clarity alongside live price.
  Alerts are fully integrated for HVN/LVN interaction and high-volume zone entries.
  Optimized to handle large lookback windows and numerous price levels efficiently without performance degradation.
 
This indicator is ideal for understanding market structure, detecting key liquidity areas, and filtering out noise to model price more accurately in high-frequency or algorithmic strategies.
Volume Profile Two-Tone - Hit Counter - Meter V1 Volume Profile Two-Tone - Hit Counter - Meter V1 
 Overview 
The Volume Profile Two-Tone - Hit Counter - Meter V1 is a Pine Script v6 indicator for TradingView, designed to visualize buy and sell activity distribution across price levels within a user-defined window or intraday session. It plots a dual-color horizontal histogram showing buying (green) and selling (red) volume intensity, along with optional hit-count numbers and meter overlays. The profile dynamically updates as new bars form, providing an intuitive picture of where market participants are most active.
The enhanced V1 edition introduces persistent hit counts, real-time adaptive row rebuilding, and improved memory management for smoother performance in both rolling-window and session modes.
 
 How It Works 
The indicator divides the selected range into rows (price bins) and aggregates trade volume (or tick volume) per bar.
Each bin separately sums up bullish and bearish contributions based on candle direction and delta logic, then draws side-by-side histogram bars:
•  Buy Volume (green):  Total volume from bullish bars within the bin.
•  Sell Volume (red):  Total volume from bearish bars within the bin.
A rolling or session-based window determines how many recent bars are analyzed. Value Area (VA), Point of Control (POC), and total hits per bin are computed continuously. The display auto-adjusts as price moves, keeping the profile anchored to the latest visible bars.
Behind the scenes, optimized arrays manage active boxes, lines, and labels for each bin. Functions like ensure_rows() rebuild buffers only when necessary, guaranteeing efficiency without repainting past data. Persistent hit-tracking ensures each price level maintains its count even when temporarily hidden.
 
 Key Features 
•  Dual-Tone Volume Histogram:  Buy/sell split with distinct colors for immediate visual contrast.
•  Rolling or Session Profiles:  Choose between continuous rolling windows or intraday session resets.
•  Persistent Hit Counts:  Displays total touches per bin, remaining stored even when bins refresh.
•  Adaptive Row Management:  Automatic rebuilding when zooming, scrolling, or changing resolution.
•  Value Area + POC Detection:  Highlights the most active price levels and volume concentration zones.
•  Meter Overlay Option:  Adds gradient bars or directional meters for quick trend context.
•  Performance Optimized:  Uses lightweight arrays and cached line handles for minimal CPU load.
•  Custom Color Control:  Editable buy/sell colors, opacity, row count, and profile width.
•  Full Persistence Mode:  Profiles remain visually consistent across bar updates without redraw gaps.
 
 What It Displays 
The Volume Profile Two-Tone - Hit Counter - Meter V1 presents an adaptive horizontal histogram beside the chart’s candles, revealing how volume is distributed across price.
• Green segments show dominant buying interest; red segments reveal selling pressure.
• POC line identifies the highest-volume price.
• Hit-count numbers quantify how often price traded at each level.
• Optional meters display relative directional strength within the same range.
This visual layering helps traders quickly identify supply/demand zones, balance areas, and developing auction profiles across intraday or multi-session contexts.
Originality
The Pine Script v6 indicator uses efficient array management (array.new_*, array.set, array.get) and native math operations for rendering.
It avoids external dependencies, relying only on built-in TradingView functions like request.security, box.new, line.new, and label.new for dynamic plotting.
 Common Ways People Use It 
•  Scalpers:  Study short-term imbalances or high-activity levels to time entries/exits.
•  Day Traders:  Track evolving session volume and POC migration.
•  Swing Analysts:  Compare rolling distributions to identify value shifts over multiple days.
•  Volume Profilers:  Combine with VWAP or order-flow tools for deeper context.
 Configuration Notes 
 
 Profile Mode: Select Rolling Window (bars) or Session (intraday).
 Rows and Width: Default = 72 rows, 44 bars width.
 Colors and Opacity: Adjust to match chart theme.
 Performance Mode: Choose Accurate or Fast (approximate) for speed control.
 Show Hits / Meter: Enable hit-count numbers and gradient meters for added context.
 
 Legal Disclaimer 
For informational and educational purposes only—not investment, financial, or trading advice. Past performance does not guarantee future results; trading involves significant risk. Provided “as is,” without warranties. Consult a qualified professional before making decisions. By using, you accept all risks and agree to this disclaimer.
Cumulative Volume Delta Profile and Heatmap [BackQuant]Cumulative Volume Delta Profile and Heatmap  
 A multi-view CVD workstation that measures buying vs selling pressure, renders a price-aligned CVD profile with Point of Control, paints an optional heatmap of delta intensity, and detects classical CVD divergences using pivot logic. Built for reading who is in control, where participation clustered, and when effort is failing to produce result.
 What is CVD 
 Cumulative Volume Delta accumulates the difference between aggressive buys and aggressive sells over time. When CVD rises, buyers are lifting the offer more than sellers are hitting the bid. When CVD falls, the opposite is true. Plotting CVD alongside price helps you judge whether price moves are supported by real participation or are running on fumes.
 Core Features 
  Visual Analysis Components 
  
  CVD Columns  - Plot of cumulative delta, colored by side, for quick read of participation bias.
  CVD Profile  - Price-aligned histogram of CVD accumulation using user-set bins. Shows where net initiative clustered.
  Split Buy and Sell CVD  - Optional two-sided profile that separates positive and negative CVD into distinct wings.
  POC - Point of Control  - The price level with the highest absolute CVD accumulation, labeled and line-marked.
  Heatmap  - Semi-transparent blocks behind price that encode CVD intensity across the last N bars.
  Divergence Engine  - Pivot-based detection of Bearish and Bullish CVD divergences with optional lines and labels.
  Stats Panel  - Top level metrics: Total CVD, Buy and Sell totals with percentages, Delta Ratio, and current POC price.
  
 How it works 
  Delta source and sampling 
  
  You select an Anchor Timeframe that defines the higher time aggregation for reading the trend of CVD.
  The script pulls lower timeframe volume delta and aggregates it to the anchor window. You can let it auto-select the lower timeframe or force a custom one.
  CVD is then accumulated bar by bar to form a running total. This plot shows the direction and persistence of initiative.
  
 Profile construction 
  
  The recent price range is split into  Profile Granularity  bins.
  As price traverses a bin, the current delta contribution is added to that bin.
  If  Split Buy and Sell CVD  is enabled, positive CVD goes to the right wing and negative CVD to the left wing.
  Widths are scaled by each side’s maximum so you can compare distribution shape at a glance.
  The  Point of Control  is the bin with the highest absolute CVD. This marks where initiative concentrated the most.
  
 Heatmap 
  
  For each bin, the script computes intensity as absolute CVD relative to the maximum bin value.
  Color is derived from the side in control in that bin and shaded by intensity.
  Heatmap Length  sets how far back the panels extend, highlighting recurring participation zones.
  
 Divergence model 
  
  You define pivot sensitivity with  Pivot Left  and  Right .
  Bearish divergence triggers when price confirms a higher high while CVD fails to make a higher high within a configurable  Delta Tolerance .
  Bullish divergence triggers when price confirms a lower low while CVD fails to make a lower low.
  On trigger, optional link lines and labels are drawn at the pivots for immediate context.
  
 Key Settings 
  Delta Source 
  
  Anchor Timeframe  - Higher TF for the CVD narrative.
  Custom Lower TF  and  Lower Timeframe  - Force the sampling TF if desired.
  
 Pivot Logic 
  
  Pivot Left  and  Right  - Bars to each side for swing confirmation.
  Delta Tolerance  - Small allowance to avoid near-miss false positives.
  
 CVD Profile 
  
  Show CVD Profile  - Toggle profile rendering.
  Split Buy and Sell CVD  - Two-sided profile for clearer side attribution.
  Show Heatmap  - Project intensity panels behind price.
  Show POC  and  POC Color  - Mark the dominant CVD node.
  Profile Granularity  - Number of bins across the visible price range.
  Profile Offset  and  Profile Width  - Position and scale the profile.
  Profile Position  - Right, Left, or Current bar alignment.
  
 Visuals 
  
  Bullish Div Color  and  Bearish Div Color  - Colors for divergence artifacts.
  Show Divergence Lines  and  Labels  - Visualize pivots and annotations.
  Plot CVD  - Column plot of total CVD.
  Show Statistics  and  Position  - Toggle and place the summary table.
  
 Reading the display 
  CVD columns 
  
  Rising CVD confirms buyers are in control. Falling CVD confirms sellers.
  Flat or choppy CVD during wide price moves hints at passive or exhausted participation.
  
 CVD profile wings 
  
  Thick right wing  near a price zone implies heavy buy initiative accumulated there.
  Thick left wing  implies heavy sell initiative.
  POC  marks the strongest initiative node. Expect reactions on first touch and rotations around this level when the tape is balanced.
  
 Heatmap 
  
  Brighter blocks indicate stronger historical net initiative at that price.
  Stacked bright bands form CVD high volume nodes. These often behave like magnets or shelves for future trade.
  
 Divergences 
  
  Bearish  - Price prints a higher high while CVD fails to do so. Effort is not producing result. Potential fade or pause.
  Bullish  - Price prints a lower low while CVD fails to do so. Capitulation lacks initiative. Potential bounce or reversal.
  
 Stats panel 
  
  Total CVD  - Net initiative over the window.
  Buy and Sell volume with percentages  - Side composition.
  Delta Ratio  - Buy over Sell. Values above 1 favor buyers, below 1 favor sellers.
  POC Price  - Current control node for plan and risk.
  
 Workflows 
  Trend following 
  
  Choose an Anchor Timeframe that matches your holding period.
  Trade in the direction of CVD slope while price holds above a bullish POC or below a bearish POC.
  Use pullbacks to CVD nodes on your profile as entry locations.
  Trend weakens when price makes new highs but CVD stalls, or new lows while CVD recovers.
  
 Mean reversion 
  
  Look for divergences at or near prior CVD nodes, especially the POC.
  Fade tests into thick wings when the side that dominated there now fails to push CVD further.
  Target rotations back toward the POC or the opposite wing edge.
  
 Liquidity and execution map 
  
  Treat strong wings and heatmap bands as probable passive interest zones.
  Expect pauses, partial fills, or flips at these shelves.
  Stops make sense beyond the far edge of the active wing supporting your idea.
  
 Alerts included 
  
  CVD Bearish Divergence and CVD Bullish Divergence.
  Price Cross Above POC and Price Cross Below POC.
  Extreme Buy Imbalance and Extreme Sell Imbalance from Delta Ratio.
  CVD Turn Bullish and CVD Turn Bearish when net CVD crosses zero.
  Price Near POC proximity alert.
  
 Best practices 
  
  Use a higher Anchor Timeframe to stabilize the CVD story and a sensible Profile Granularity so wings are readable without clutter.
  Keep Split mode on when you want to separate initiative attribution. Turn it off when you prefer a single net profile.
  Tune Pivot Left and Right by instrument to avoid overfitting. Larger values find swing divergences. Smaller values find micro fades.
  If volume is thin or synthetic for the symbol, CVD will be less reliable. The script will warn if volume is zero.
  
 Trading applications 
  
  Context  - Confirm or question breakouts with CVD slope.
  Location  - Build entries at CVD nodes and POC.
  Timing  - Use divergence and POC crosses for triggers.
  Risk  - Place stops beyond the opposite wing or outside the POC shelf.
  
 Important notes and limits 
  
  This is a price and volume based study. It does not access off-book or venue-level order flow.
  CVD profiles are built from the data available on your chart and the chosen lower timeframe sampling.
  Like all volume tools, readings can distort during roll periods, holidays, or feed anomalies. Validate on your instrument.
  
 Technical notes 
  
  Delta is aggregated from a lower timeframe into an Anchor Timeframe narrative.
  Profile bins update in real time. Splitting by side scales each wing independently so both are readable in the same panel.
  Divergences are confirmed using standard pivot definitions with user-set tolerances.
  All profile drawing uses fixed X offsets so panels and POC do not swim when you scroll.
  
 Quick start 
  
  Anchor Timeframe = Daily for intraday context.
  Split Buy and Sell CVD = On.
  Profile Granularity = 100 to 200, Profile Position = Right, Width to taste.
  Pivot Left and Right around 8 to 12 to start, then adapt.
  Turn on Heatmap for a fast map of interest bands.
  
 Bottom line 
 CVD tells you who is doing the lifting. The profile shows where they did it. Divergences tell you when effort stops paying. Put them together and you get a clear read on control, location, and timing for both trend and mean reversion.
Anchored Session Volume Profile • Heatmap Profiles • Asia/EU/US Description
This indicator builds Anchored Session Volume Profiles for Asia, EU, and US sessions on intraday charts and renders them as right-docked line histograms (heatmap or classic style). Each session computes its own POC, VAH, VAL and optional Session High/Low lines. An optional per-price-bin Delta overlay estimates buy/sell pressure inside the profile rows for quick order-flow context.
What’s unique
Three independent session anchors (Asia/EU/US) with custom start/end times, bin size in ticks, and Value Area %.
Right-fixed live rendering or post-close persistence (draw levels only after the session closes).
Adaptive width: profile width scales with elapsed session length (anchor → now/end) within user limits.
Heatmap profile: row tint scales by relative volume; or Classic single-color with optional gradient.
Per-row Delta ticks (outside/inside, configurable direction) derived from bar delta and overlap with each price bin.
Clean POC/VAH/VAL line styling, optional ray extension, and Session High/Low rays per session.
How it works (technical)
Binning: Rows are built with a user-defined bin height in ticks. Arrays expand/shrink as price extends; the base is shifted when new lows appear to keep bins aligned.
Accumulation: For each bar within the active session window, traded volume is distributed to intersecting bins proportionally to the price overlap with that bin.
Value Area: POC is the highest-volume bin. VA is grown symmetrically around the POC until the selected coverage (VA%) is reached.
Delta per bin (optional): A bar-level delta proxy volume * (close − open) / range (clamped) is split into buy/sell and allocated to bins proportionally to the same overlap share, producing a per-row delta magnitude for rendering ticks.
Rendering modes:
Right fixed: refreshes each bar; lines/histogram are docked at the anchor X-position.
Draw Levels after Session Close: on close, only POC/VAH/VAL (and optional Session High/Low) are persisted.
No lookahead: All computations use confirmed bars; levels are deterministic on close.
How to use
Use the Asia/EU/US profiles to read participation hand-offs and session-driven rotations.
Trade off POC/VAH/VAL as acceptance/rejection references; confluence with session High/Low often marks responsive flows.
Employ Delta ticks per row to spot absorption, one-sided stacking, or fading participation inside the profile without leaving TradingView.
Prefer right-fixed during live trading and post-close when you want persistent session levels.
Key settings
General per session: Start/End (hh:mm), Bin size (ticks), Value Area %, toggle POC/VAH/VAL lines.
Rendering: Heatmap vs. Classic, orientation (Left/Right), gradient on/off, row thickness, right offset, adaptive width limits.
Delta (per price bin): global on/off, per-session on/off, tick width, max tick length (bars), outside/inside placement, direction (sign-based / always left / always right), colors.
Levels: POC/VAH/VAL styles (solid/dashed/dotted), widths, colors, extend right (ray).
Session High/Low: per-session on/off, style, width, colors, optional right-ray extension.
Notes & limitations
Designed for intraday data; accuracy depends on the feed’s volume granularity.
Large histories + small bins + delta ticks can be heavy; tune bin size, adaptive width, and delta max length for performance.
Timezone for anchors is set internally to Europe/Berlin.
Educational tool — not a signal generator.
Disclaimer
For educational and informational purposes only. Not financial advice.
Liquidity Zones - Joe v1This script lets you plot liquidity/order levels (similar to what you see on Bookmap) directly on your TradingView chart.
It is designed to help traders spot support/resistance levels where large limit orders sit and to visualize whether those liquidity pools are still active, already taken, or being replenished.
 Key Features 
Session-based
 
 Works during a defined trading session.
 
 Resets automatically at the first bar of the session.
 
 Up to 8 Liquidity Zones, each of which includes: 
 
 Price level
 
 Size (affects line thickness)
 
 Status (Active, Taken, Re-Stocking, or Automatic).
 
 Zone Statuses 
 
 
 Active → Untouched liquidity (potential support/resistance).
 
 Taken → Liquidity consumed after price trades through it.
 
 Re-Stocking → Level is being reloaded with fresh orders.
 
 Automatic → Updates dynamically (switches to Taken when crossed, otherwise stays Active).
 
 Visual Representation 
 
 Zones are drawn as horizontal lines.
 
 Labels show price + size (e.g., 4010 (200k)).
 
 Customizable line styles and colors: 
 
 Active = solid red
 
 Taken = gray dashed
 
 Re-Stocking = purple dotted
 
 Dynamic Updates 
 
 Levels automatically update during the session.
 
 If price crosses a zone → it’s marked as Taken.
 
 Labels, line styles, and colors adjust live.
 
 Line thickness = zone size ÷ 10 → visually represents liquidity strength.
 
 How this indicator is Used 
Upon market open, the order book tends to fill with limit orders. Using Bookmap, you can see where these orders are placed at each relative price point, along with their sizes. The most important ones to focus on are the larger levels, which are typically highlighted in reddish tones (depending on your Bookmap settings).
I then manually enter these levels into this indicator. It only takes a few seconds, and since there’s no direct way to connect TradingView to Bookmap, this method works as an effective workaround. Once entered, the levels will stay visible on your TradingView chart.
This seemingly simple script is very powerful and provides a strong edge. More often than not, price action gravitates toward these larger liquidity levels. Remember, the price of a security is influenced by market makers whose role is to fill orders and earn commissions on transactions. They have little interest in arbitrarily pushing price higher or lower; instead, their primary function is to guide price toward liquidity—where the large orders sit.
Of course, this is a general principle, and many other variables can affect price movement. Still, by keeping this concept in mind, you’ll often find yourself on the right side of the market.
Extreme Pressure Zones Indicator (EPZ) [BullByte]Extreme Pressure Zones Indicator(EPZ) 
The Extreme Pressure Zones (EPZ) Indicator is a proprietary market analysis tool designed to highlight potential overbought and oversold "pressure zones" in any financial chart. It does this by combining several unique measurements of price action and volume into a single, bounded oscillator (0–100). Unlike simple momentum or volatility indicators, EPZ captures multiple facets of market pressure: price rejection, trend momentum, supply/demand imbalance, and institutional (smart money) flow. This is not a random mashup of generic indicators; each component was chosen and weighted to reveal extreme market conditions that often precede reversals or strong continuations.
 What it is? 
EPZ estimates buying/selling pressure and highlights potential extreme zones with a single, bounded 0–100 oscillator built from four normalized components. Context-aware weighting adapts to volatility, trendiness, and relative volume. Visual tools include adaptive thresholds, confirmed-on-close extremes, divergence, an MTF dashboard, and optional gradient candles.
 Purpose and originality (not a mashup) 
 Purpose:  Identify when pressure is building or reaching potential extremes while filtering noise across regimes and symbols.
 Originality:  EPZ integrates price rejection, momentum cascade, pressure distribution, and smart money flow into one bounded scale with context-aware weighting. It is not a cosmetic mashup of public indicators.
 Why a trader might use EPZ 
EPZ provides a multi-dimensional gauge of market extremes that standalone indicators may miss. Traders might use it to:
 Spot Reversals:  When EPZ enters an "Extreme High" zone (high red), it implies selling pressure might soon dominate. This can hint at a topside reversal or at least a pause in rallies. Conversely, "Extreme Low" (green) can highlight bottom-fish opportunities. The indicator's divergence module (optional) also finds hidden bullish/bearish divergences between price and EPZ, a clue that price momentum is weakening.
 Measure Momentum Shifts:  Because EPZ blends momentum and volume, it reacts faster than many single metrics. A rising MPO indicates building bullish pressure, while a falling MPO shows increasing bearish pressure. Traders can use this like a refined RSI: above 50 means bullish bias, below 50 means bearish bias, but with context provided by the thresholds.
 Filter Trades:  In trend-following systems, one could require EPZ to be in the bullish (green) zone before taking longs, or avoid new trades when EPZ is extreme. In mean-reversion systems, one might specifically look to fade extremes flagged by EPZ.
 Multi-Timeframe Confirmation:  The dashboard can fetch a higher timeframe EPZ value. For example, you might trade a 15-minute chart only when the 60-minute EPZ agrees on pressure direction.
 Components and how they're combined 
 Rejection (PRV)  – Captures price rejection based on candle wicks and volume (see Price Rejection Volume).
 Momentum Cascade (MCD)  – Blends multiple momentum periods (3,5,8,13) into a normalized momentum score.
 Pressure Distribution (PDI)  – Measures net buy/sell pressure by comparing volume on up vs down candles.
 Smart Money Flow (SMF)  – An adaptation of money flow index that emphasizes unusual volume spikes.
Each of these components produces a 0–100 value (higher means more bullish pressure). They are then weighted and averaged into the final Market Pressure Oscillator (MPO), which is smoothed and scaled. By combining these four views, EPZ stands out as a comprehensive pressure gauge – the whole is greater than the sum of parts
 Context-aware weighting: 
Higher volatility → more PRV weight
Trendiness up (RSI of ATR > 25) → more MCD weight
Relative volume > 1.2x → more PDI weight
SMF holds a stable weight
The weighted average is smoothed and scaled into MPO ∈   with 50 as the neutral midline.
 What makes EPZ stand out 
Four orthogonal inputs (price action, momentum, pressure, flow) unified in a single bounded oscillator with consistent thresholds.
Adaptive thresholds (optional) plus robust extreme detection that also triggers on crossovers, so static thresholds work reliably too.
Confirm Extremes on Bar Close (default ON): dots/arrows/labels/alerts print on closed bars to avoid repaint confusion.
Clean dashboard, divergence tools, pre-alerts, and optional on-price gradients. Visual 3D layering uses offsets for depth only,no lookahead.
 Recommended markets and timeframes 
 Best:  liquid symbols (index futures, large-cap equities, major FX, BTC/ETH).
 Timeframes:  5–15m (more signals; consider higher thresholds), 1H–4H (balanced), 1D (clear regimes).
 Use caution on illiquid or very low TFs where wick/volume geometry is erratic. 
 Logic and thresholds 
 MPO ∈  ; 50 = neutral. Above 50 = bullish pressure; below 50 = bearish. 
 Static thresholds (defaults):  thrHigh = 70, thrLow = 30; warning bands 5 pts inside extremes (65/35).
 Adaptive thresholds (optional): 
thrHigh = min(BaseHigh + 5, mean(MPO,100) + stdev(MPO,100) × ExtremeSensitivity)
thrLow = max(BaseLow − 5, mean(MPO,100) − stdev(MPO,100) × ExtremeSensitivity)
 Extreme detection 
High: MPO ≥ thrHigh with peak/slope or crossover filter.
Low: MPO ≤ thrLow with trough/slope or crossover filter.
 Cooldown:  5 bars (default). A new extreme will not print until the cooldown elapses, even if MPO re-enters the zone.
 Confirmation 
"Confirm Extremes on Bar Close" (default ON) gates extreme markers, pre-alerts, and alerts to closed bars (non-repainting).
 Divergences 
Pivot-based bullish/bearish divergence; tags appear only after left/right bars elapse (lookbackPivot).
 MTF 
HTF MPO retrieved with lookahead_off; values can update intrabar and finalize at HTF close. This is disclosed and expected.
 Inputs and defaults (key ones) 
 Core:  Sensitivity=1.0; Analysis Period=14; Smoothing=3; Adaptive Thresholds=OFF.
 Extremes:  Base High=70, Base Low=30; Extreme Sensitivity=1.5; Confirm Extremes on Bar Close=ON; Cooldown=5; Dot size Small/Tiny.
 Visuals:  Heatmap ON; 3D depth optional; Strength bars ON; Pre-alerts OFF; Divergences ON with tags ON; Gradient candles OFF; Glow ON.
 Dashboard:  ON; Position=Top Right; Size=Normal; MTF ON; HTF=60m; compact overlay table on price chart.
 Advanced caps:  Max Oscillator Labels=80; Max Extreme Guide Lines=80; Divergence objects=60.
 Dashboard: what each element means 
 Header:  EPZ ANALYSIS.
 Large readout:  Current MPO; color reflects state (extreme, approaching, or neutral).
 Status badge:  "Extreme High/Low", "Approaching High/Low", "Bullish/Neutral/Bearish".
 HTF cell (when MTF ON):  Higher-timeframe MPO, color-coded vs extremes; updates intrabar, settles at HTF close.
 Predicted (when MTF OFF):  Simple MPO extrapolation using momentum/acceleration—illustrative only.
 Thresholds:  Current thrHigh/thrLow (static or adaptive).
 Components:  ASCII bars + values for PRV, MCD, PDI, SMF.
 Market metrics:  Volume Ratio (x) and ATR% of price.
 Strength:  Bar indicator of |MPO − 50| × 2.
 Confidence:  Heuristic gauge (100 in extremes, 70 in warnings, 50 with divergence, else |MPO − 50|). Convenience only, not probability.
 How to read the oscillator 
 MPO Value (0–100):  A reading of 50 is neutral. Values above ~55 are increasingly bullish (green), while below ~45 are increasingly bearish (red). Think of these as "market pressure".
 Extreme Zones:  When MPO climbs into the bright orange/red area (above the base-high line, default 70), the chart will display a dot and downward arrow marking that extreme. Traders often treat this as a sign to tighten stops or look for shorts. Similarly, a bright green dot/up-arrow appears when MPO falls below the base-low (30), hinting at a bullish setup.
 Heatmap/Candles:  If "Pressure Heatmap" is enabled, the background of the oscillator pane will fade green or red depending on MPO. Users can optionally color the price candles by MPO value (gradient candles) to see these extremes on the main chart.
 Prediction Zone(optional):  A dashed projection line extends the MPO forward by a small number of bars (prediction_bars) using current MPO momentum and acceleration. This is a heuristic extrapolation best used for short horizons (1–5 bars) to anticipate whether MPO may touch a warning or extreme zone. It is provisional and becomes less reliable with longer projection lengths — always confirm predicted moves with bar-close MPO and HTF context before acting.
 Divergences:  When price makes a higher high but EPZ makes a lower high (bearish divergence), the indicator can draw dotted lines and a "Bear Div" tag. The opposite (lower low price, higher EPZ) gives "Bull Div". These signals confirm waning momentum at extremes.
 Zones:  Warning bands near extremes; Extreme zones beyond thresholds.
 Crossovers:  MPO rising through 35 suggests easing downside pressure; falling through 65 suggests waning upside pressure.
 Dots/arrows:  Extreme markers appear on closed bars when confirmation is ON and respect the 5-bar cooldown.
 Pre-alert dots (optional):  Proximity cues in warning zones; also gated to bar close when confirmation is ON.
 Histogram:  Distance from neutral (50); highlights strengthening or weakening pressure.
 Divergence tags:  "Bear Div" = higher price high with lower MPO high; "Bull Div" = lower price low with higher MPO low.
 Pressure Heatmap :  Layered gradient background that visually highlights pressure strength across the MPO scale; adjustable intensity and optional zone overlays (warning / extreme) for quick visual scanning.
 A typical reading:  If the oscillator is rising from neutral towards the high zone (green→orange→red), the chart may see strong buying culminating in a stall. If it then turns down from the extreme, that peak EPZ dot signals sell pressure.
 Alerts 
 EPZ: Extreme Context —  fires on confirmed extremes (respects cooldown).
 EPZ: Approaching Threshold —  fires in warning zones if no extreme.
 EPZ: Divergence —  fires on confirmed pivot divergences.
 Tip:  Set alerts to "Once per bar close" to align with confirmation and avoid intrabar repaint.
 Practical usage ideas 
 Trend continuation:  In positive regimes (MPO > 50 and rising), pullbacks holding above 50 often precede continuation; mirror for bearish regimes.
 Exhaustion caution:  E High/E Low can mark exhaustion risk; many wait for MPO rollover or divergence to time fades or partial exits.
 Adaptive thresholds:  Useful on assets with shifting volatility regimes to maintain meaningful "extreme" levels.
 MTF alignment:  Prefer setups that agree with the HTF MPO to reduce countertrend noise.
 Examples 
Screenshots captured in TradingView Replay to freeze the bar at close so values don't fluctuate intrabar. These examples use default settings and are reproducible on the same bars; they are for illustration, not cherry-picking or performance claims.
 Example 1 — BTCUSDT, 1h — E Low 
  
MPO closed at 26.6 (below the 30 extreme), printing a confirmed E Low. HTF MPO is 26.6, so higher-timeframe pressure remains bearish. Components are subdued (Momentum/Pressure/Smart$ ≈ 29–37), with Vol Ratio ≈ 1.19x and ATR% ≈ 0.37%. A prior Bear Div flagged weakening impulse into the drop. With cooldown set to 5 bars, new extremes are rate-limited. Many traders wait for MPO to curl up and reclaim 35 or for a fresh Bull Div before considering countertrend ideas; if MPO cannot reclaim 35 and HTF stays weak, treat bounces cautiously. Educational illustration only.
 Example 2 — ETHUSD, 30m — E High 
  
A strong impulse pushed MPO into the extreme zone (≥ 70), printing a confirmed E High on close. Shortly after, MPO cooled to ~61.5 while a Bear Div appeared, showing momentum lag as price pushed a higher high. Volume and volatility were elevated (≈ 1.79x / 1.25%). With a 5-bar cooldown, additional extremes won't print immediately. Some treat E High as exhaustion risk—either waiting for MPO rollover under 65/50 to fade, or for a pullback that holds above 50 to re-join the trend if higher-timeframe pressure remains constructive. Educational illustration only.
 Known limitations and caveats 
The MPO line itself can change intrabar; extreme markers/alerts do not repaint when "Confirm Extremes on Bar Close" is ON.
HTF values settle at the close of the HTF bar.
Illiquid symbols or very low TFs can be noisy; consider higher thresholds or longer smoothing.
Prediction line (when enabled) is a visual extrapolation only.
 For coders 
Pine v6. MTF via request.security with lookahead_off.
Extremes include crossover triggers so static thresholds also yield E High/E Low.
Extreme markers and pre-alerts are gated by barstate.isconfirmed when confirmation is ON.
Arrays prune oldest objects to respect resource limits; defaults (80/80/60) are conservative for low TFs.
3D layering uses negative offsets purely for drawing depth (no lookahead).
 Screenshot methodology: 
To make labels legible and to demonstrate non-repainting behavior, the examples were captured in TradingView Replay with "Confirm Extremes on Bar Close" enabled. Replay is used only to freeze the bar at close so plots don't change intrabar. The examples use default settings, include both Extreme Low and Extreme High cases, and can be reproduced by scrolling to the same bars outside Replay. This is an educational illustration, not a performance claim.
 Disclaimer 
This script is for educational purposes only and does not constitute financial advice. Markets involve risk; past behavior does not guarantee future results. You are responsible for your own testing, risk management, and decisions.
Options Max Pain Calculator [BackQuant]Options Max Pain Calculator  
A visualization tool that models option expiry dynamics by calculating "max pain" levels, displaying synthetic open interest curves, gamma exposure profiles, and pin-risk zones to help identify where market makers have the least payout exposure.
 What is Max Pain? 
Max Pain is the theoretical expiration price where the total dollar value of outstanding options would be minimized. At this price level, option holders collectively experience maximum losses while option writers (typically market makers) have minimal payout obligations. This creates a natural gravitational pull as expiration approaches.
 Core Features 
 Visual Analysis Components: 
 
 Max Pain Line: Horizontal line showing the calculated minimum pain level
 Strike Level Grid: Major support and resistance levels at key option strikes  
 Pin Zone: Highlighted area around max pain where price may gravitate
 Pain Heatmap: Color-coded visualization showing pain distribution across prices
 Gamma Exposure Profile: Bar chart displaying net gamma at each strike level
 Real-time Dashboard: Summary statistics and risk metrics
 
 Synthetic Market Modeling** 
Since Pine Script cannot access live options data, the indicator creates realistic synthetic open interest distributions based on configurable market parameters including volume patterns, put/call ratios, and market maker positioning.
 How It Works 
 Strike Generation: 
The tool creates a grid of option strikes centered around the current price. You can control the range, density, and whether strikes snap to realistic market increments.
 Open Interest Modeling: 
Using your inputs for average volume, put/call ratios, and market maker behavior, the indicator generates synthetic open interest that mirrors real market dynamics:
 
 Higher volume at-the-money with decay as strikes move further out
 Adjustable put/call bias to reflect current market sentiment  
 Market maker inventory effects and typical short-gamma positioning
 Weekly options boost for near-term expirations
 
 Pain Calculation: 
For each potential expiry price, the tool calculates total option payouts:
 
 Call options contribute pain when finishing in-the-money
 Put options contribute pain when finishing in-the-money
 The strike with minimum total pain becomes the Max Pain level
 
 Gamma Analysis: 
Net gamma exposure is calculated at each strike using standard option pricing models, showing where hedging flows may be most intense. Positive gamma creates price support while negative gamma can amplify moves.
 Key Settings 
 Basic Configuration: 
 
 Number of Strikes: Controls grid density (recommended: 15-25)
 Days to Expiration: Time until option expiry
 Strike Range: Price range around current level (recommended: 8-15%)
 Strike Increment: Spacing between strikes
 
 Market Parameters: 
 
 Average Daily Volume: Baseline for synthetic open interest
 Put/Call Volume Ratio: Market sentiment bias (>1.0 = bearish, <1.0 = bullish)  It does not work if set to 1.0
 Implied Volatility: Current option volatility estimate
 Market Maker Factors: Dealer positioning and hedging intensity
 
 Display Options: 
 
 Model Complexity: Simple (line only), Standard (+ zones), Advanced (+ heatmap/gamma)
 Visual Elements: Toggle individual components on/off
 Theme: Dark/Light mode
 Update Frequency: Real-time or daily calculation
 
 Reading the Display 
 Dashboard Table (Top Right): 
 
 Current Price vs Max Pain Level
 Distance to Pain: Percentage gap (smaller = higher pin risk)
 Pin Risk Assessment: HIGH/MEDIUM/LOW based on proximity and time
 Days to Expiry and Strike Count
 Model complexity level
 
 Visual Elements: 
 
 Red Line: Max Pain level where payout is minimized
 Colored Zone: Pin risk area around max pain
 Dotted Lines: Major strike levels (green = support, orange = resistance)
 Color Bar: Pain heatmap (blue = high pain, red = low pain/max pain zones)
 Horizontal Bars: Gamma exposure (green = positive, red = negative)
 Yellow Dotted Line: Gamma flip level where hedging behavior changes
 
 Trading Applications 
 Expiration Pinning: 
When price is near max pain with limited time remaining, there's increased probability of gravitating toward that level as market makers hedge their positions.
 Support and Resistance: 
High open interest strikes often act as magnets, with max pain representing the strongest gravitational pull.
 Volatility Expectations: 
 
 Above gamma flip: Expect dampened volatility (long gamma environment)  
 Below gamma flip: Expect amplified moves (short gamma environment)
 
 Risk Assessment: 
The pin risk indicator helps gauge likelihood of price manipulation near expiry, with HIGH risk suggesting potential range-bound action.
 Best Practices 
 Setup Recommendations 
 
 Start with Model Complexity set to "Standard"
 Use realistic strike ranges (8-12% for most assets)  
 Set put/call ratio based on current market sentiment
 Adjust implied volatility to match current levels
 
 Interpretation Guidelines: 
 
 Small distance to pain + short time = high pin probability
 Large gamma bars indicate key hedging levels to monitor
 Heatmap intensity shows strength of pain concentration
 Multiple nearby strikes can create wider pin zones
 
 Update Strategy: 
 
 Use "Daily" updates for cleaner visuals during trading hours
 Switch to "Every Bar" for real-time analysis near expiration
 Monitor changes in max pain level as new options activity emerges
 
 Important Disclaimers 
 
 This is a modeling tool using synthetic data, not live market information. While the calculations are mathematically sound and the modeling realistic, actual market dynamics involve numerous factors not captured in any single indicator.
 Max pain represents theoretical minimum payout levels and suggests where natural market forces may create gravitational pull, but it does not guarantee price movement or predict exact expiration levels. Market gaps, news events, and changing volatility can override these dynamics.
 Use this tool as additional context for your analysis, not as a standalone trading signal. The synthetic nature of the data makes it most valuable for understanding market structure and potential zones of interest rather than precise price prediction.
 
 Technical Notes 
The indicator uses established option pricing principles with simplified implementations optimized for Pine Script performance. Gamma calculations use standard financial models while pain calculations follow the industry-standard definition of minimized option payouts.
All visual elements use fixed positioning to prevent movement when scrolling charts, and the tool includes performance optimizations to handle real-time calculation without timeout errors.
Volume Bubbles & Liquidity Heatmap [LuxAlgo]The  Volume Bubbles & Liquidity Heatmap  indicator highlights volume and liquidity clearly and precisely with its volume bubbles and liquidity heat map, allowing to identify key price areas.
Customize the bubbles with different time frames and different display modes: total volume, buy and sell volume, or delta volume.
🔶  USAGE 
  
The primary objective of this tool is to offer traders a straightforward method for analyzing volume on any selected timeframe.
By default, the tool displays buy and sell volume bubbles for the daily timeframe over the last 2,000 bars. Traders should be aware of the difference between the timeframe of the chart and that of the bubbles.
The tool also displays a liquidity heat map to help traders identify price areas where liquidity accumulates or is lacking.
🔹  Volume Bubbles 
The bubbles have three possible display modes:
 
 Total Volume: Displays the total volume of trades per bubble.
 Buy & Sell Volume: Each bubble is divided into buy and sell volume.
 Delta Volume: Displays the difference between buy and sell volume.
 
Each bubble represents the trading volume for a given period. By default, the timeframe for each bubble is set to daily, meaning each bubble represents the trading volume for each day.
The size of each bubble is proportional to the volume traded; a larger bubble indicates greater volume, while a smaller bubble indicates lower volume.
The color of each bubble indicates the dominant volume: green for buy volume and red for sell volume.
  
One of the tool's main goals is to facilitate simple, clear, multi-timeframe volume analysis.
The previous chart shows Delta Volume bubbles with various chart and bubble timeframe configurations.
  
To correctly visualize the bubbles, traders must ensure there is a sufficient number of bars per bubble. This is achieved by using a lower chart timeframe and a higher bubble timeframe.
As can be seen in the image above, the greater the difference between the chart and bubble timeframes, the better the visualization.
🔹  Liquidity Heatmap 
  
The other main element of the tool is the liquidity heatmap. By default, it divides the chart into 25 different price areas and displays the accumulated trading volume on each.
The image above shows a 4-hour BTC chart displaying only the liquidity heatmap. Traders should be aware of these key price areas and observe how the price behaves in them, looking for possible opportunities to engage with the market.
  
The main parameters for controlling the heatmap on the settings panel are Rows and Cell Minimum Size. Rows modifies the number of horizontal price areas displayed, while Cell Minimum Size modifies the minimum size of each liquidity cell in each row.
As can be seen in the above BTC hourly chart, the cell size is 24 at the top and 168 at the bottom. The cells are smaller on top and bigger on the bottom.
The color of each cell reflects the liquidity size with a gradient; this reflects the total volume traded within each cell. The default colors are:
 
 Red: larger liquidity
 Yellow: medium liquidity
 Blue: lower liquidity
 
🔹  Using Both Tools Together 
This indicator provides the means to identify directional bias and market timing.
The main idea is that if buyers are strong, prices are likely to increase, and if sellers are strong, prices are likely to decrease. This gives us a directional bias for opening long or short positions. Then, we combine our directional bias with price rejection or acceptance of key liquidity levels to determine the timing of opening or closing our positions.
Now, let's review some charts.
  
This first chart is BTC 1H with Delta Weekly Bubbles. Delta Bubbles measure the difference between buy and sell volume, so we can easily see which group is dominant (buyers or sellers) and how strong they are in any given week. This, along with the key price areas displayed by the Liquidity Heatmap, can help us navigate the markets.
We divided market behavior into seven groups, and each group has several bubbles, numbered from 1 to 17.
 
 Bubbles 1, 2, and 3: After strong buyers market consolidates with positive delta, prices move up next week.
 Bubbles 3, 4, and 5: Strength changes from buyers to sellers. Next week, prices go down.
 Bubbles 6 and 7: The market trades at higher prices, but with negative delta. Next week, prices go down.
 Bubbles 7, 8, and 9: Strength changes from sellers to buyers. Next weeks (9 and 10), prices go up.
 Bubbles 10, 11, and 12: After strong buyers prices trade higher with a negative delta. Next weeks (12 and 13) prices go down.
 Bubbles 12, 14, and 15: Strength changes from sellers to buyers; next week, prices increase.
 Bubbles 15 and 16: The market trades higher with a very small positive delta; next week, prices go down.
 
Current bubble/week 17 is not yet finished. Right now, it is trading lower, but with a smaller negative delta than last week. This may signal that sellers are losing strength and that a potential reversal will follow, with prices trading higher.
  
This is the same BTC 1H chart, but with price rejections from key liquidity areas acting as strong price barriers.
When prices reach a key area with strong liquidity and are rejected, it signals a good time to take action.
By observing price behavior at certain key price levels, we can improve our timing for entering or exiting the markets.
🔶  DETAILS 
🔹  Bubbles Display 
  
From the settings panel, traders can configure the bubbles with four main parameters: Mode, Timeframe, Size%, and Shape.
The image above shows five-minute BTC charts with execution over the last 3,500 bars, different display modes, a daily timeframe, 100% size, and shape one.
  
The Size % parameter controls the overall size of the bubbles, while the Shape parameter controls their vertical growth.
Since the chart has two scales, one for time and one for price, traders can use the Shape parameter to make the bubbles round.
The chart above shows the same bubbles with different size and shape parameters.
You can also customize data labels and timeframe separators from the settings panel.
🔶  SETTINGS 
 
 Execute on last X bars: Number of bars for indicator execution
 
🔹  Bubbles 
 
 Display Bubbles: Enable/Disable volume bubbles.
 Bubble Mode: Select from the following options: total volume, buy and sell volume, or the delta between buy and sell volume.
 Bubble Timeframe: Select the timeframe for which the bubbles will be displayed.
 Bubble Size %: Select the size of the bubbles as a percentage.
 Bubble Shape: Select the shape of the bubbles. The larger the number, the more vertical the bubbles will be stretched.
 
🔹  Labels 
 
 Display Labels: Enable/Disable data labels, select size and location.
 
🔹  Separators 
 
 Display Separators: Enable/Disable timeframe separators and select color.
 
🔹  Liquidity Heatmap 
 
 Display Heatmap: Enable/Disable liquidity heatmap.
 Heatmap Rows: select number of rows to be displayed.
 Cell Minimum Size: Select the minimum size for each cell in each row.
 Colors.
 
🔹  Style 
 
 Buy & Sell Volume Colors.
DeltaFlow Volume Profile [BigBeluga]🔵 OVERVIEW 
The  DeltaFlow Volume Profile   builds a compact volume profile next to price and enriches every bin with  flow context : bullish vs. bearish participation (%), a per-bin  Delta % , an optional  Delta Heat Map , and a  PoC band  with the bin’s absolute volume. This lets you see not just where volume clustered, but who (buyers or sellers) dominated inside each price slice.
 🔵 CONCEPTS 
 
   Binned Volume Profile : Price range over a user-defined  LookBack  is split into  Bins ; each bin aggregates traded volume.
  
   Bull/Bear Split : Within every bin, volume is separated by candle direction into  Bull Volume  and  Bear Volume , then normalized to % of the bin’s displayed size.
  
   Delta % : The difference between Bull % and Bear % for the bin. Positive = buyer dominance; negative = seller dominance.
  
   Delta Heat Map : Bin background shading that scales with both total volume strength and delta bias.
  
   PoC (Point of Control) : The most significant bin gets a PoC band and a label with its absolute volume.
  
 
 🔵 FEATURES 
 
   Profile with Flow : A clean horizontal volume bar per bin plus stacked  Bull %  and  Bear % .
   Per-Bin Delta Label : A readable “Δ xx%” tag at the start of each bin shows dominance at a glance.
   Delta Heat Map : Optional gradient that intensifies with higher volume and stronger delta.
   PoC Highlight : Optional PoC band colored separately, labeled with absolute volume (e.g., “1.23M”).
   Configurable Inputs : LookBack, number of Bins (10–100), toggles for Delta, Heat Map, Volume Bars, and PoC color.
   Readable Colors : Separate inputs for bullish (volume +) and bearish (volume –) hues.
 
 🔵 HOW TO USE 
 
   Set the window : Choose  LookBack  and  Bins  to balance detail vs. performance (more bins = finer resolution).
 Enable “Volume Bars”  to display the bull/bear split as two stacked percent bars inside each bin.
 
  High  Bull %  near support → constructive demand.
  High  Bear %  near resistance → active supply.
   Use Δ labels  (toggle “Delta”) to quickly spot bins with clear buyer/seller control; combine with price position for confluence.
   Turn on Delta Heat Map  to prioritize areas with both large volume and strong imbalance.
   Watch the PoC : The PoC band marks the most traded (and often magnet) level; its label shows absolute size for context.
 Trade ideas :
  Breakout continuation when Δ stays positive across consecutive upper bins.
  Reversion risk when price enters a large bearish-Δ cluster below.
  Manage risk around the PoC; reactions there can be sharp.
 
 🔵 CONCLUSION 
 DeltaFlow Volume Profile   upgrades a classic profile with flow intelligence. The bull/bear split, explicit Δ %, heat-weighted backdrop, and PoC volume label make dominant participation and key price shelves obvious. Use it to filter levels, time entries with imbalance, and validate breakouts or fades with objective volume-flow evidence.
Correlation Heatmap Matrix [TradingFinder] 20 Assets Variable🔵 Introduction 
Correlation is one of the most important statistical and analytical metrics in financial markets, data mining, and data science. It measures the strength and direction of the relationship between two variables. 
 The correlation coefficient always ranges between +1 and -1 : a perfect positive correlation (+1) means that two assets or currency pairs move together in the same direction and at a constant ratio, a correlation of zero (0) indicates no clear linear relationship, and a perfect negative correlation (-1) means they move in exactly opposite directions. 
While the Pearson Correlation Coefficient is the most common method for calculation, other statistical methods like Spearman and Kendall are also used depending on the context.
In financial market analysis, correlation is a key tool for Forex, the Stock Market, and the Cryptocurrency Market because it allows traders to assess the price relationship between currency pairs, stocks, or coins. For example, in Forex, EUR/USD and GBP/USD often have a high positive correlation; in stocks, companies from the same sector such as Apple and Microsoft tend to move similarly; and in crypto, most altcoins show a strong positive correlation with Bitcoin. 
Using a Correlation Heatmap in these markets visually displays the strength and direction of these relationships, helping traders make more accurate decisions for risk management and strategy optimization.
🟣 Correlation in Financial Markets 
In finance, correlation refers to measuring how closely two assets move together over time. These assets can be stocks, currency pairs, commodities, indices, or cryptocurrencies. The main goal of correlation analysis in trading is to understand these movement patterns and use them for risk management, trend forecasting, and developing trading strategies.
🟣 Correlation Heatmap 
A correlation heatmap is a visual tool that presents the correlation between multiple assets in a color-coded table. Each cell shows the correlation coefficient between two assets, with colors indicating its strength and direction. Warm colors (such as red or orange) represent strong negative correlation, cool colors (such as blue or cyan) represent strong positive correlation, and mid-range tones (such as yellow or green) indicate correlations that are close to neutral.
🟣 Practical Applications in Markets 
 
 Forex : Identify currency pairs that move together or in opposite directions, avoid overexposure to similar trades, and spot unusual divergences.
  
 Crypto : Examine the dependency of altcoins on Bitcoin and find independent movers for portfolio diversification.
  
 Stocks : Detect relationships between stocks in the same industry or find outliers that move differently from their sector.
 
  
🟣 Key Uses of Correlation in Trading 
 
 Risk management and diversification: Select assets with low or negative correlation to reduce portfolio volatility.
 Avoiding overexposure: Prevent opening multiple positions on highly correlated assets.
 Pairs trading: Exploit temporary deviations between historically correlated assets for arbitrage opportunities.
 Intermarket analysis: Study the relationships between different markets like stocks, currencies, commodities, and bonds.
 Divergence detection: Spot when two typically correlated assets move apart as a possible trend change signal.
 Market forecasting: Use correlated asset movements to anticipate others’ behavior.
 Event reaction analysis: Evaluate how groups of assets respond to economic or political events.
 
❗ Important Note 
It’s important to note that correlation does not imply causation — it only reflects co-movement between assets. Correlation is also dynamic and can change over time, which is why analyzing it across multiple timeframes provides a more accurate picture. Combining correlation heatmaps with other analytical tools can significantly improve the precision of trading decisions.
🔵 How to Use 
The Correlation Heatmap Matrix indicator is designed to analyze and manage the relationships between multiple assets at once. After adding the tool to your chart, start by selecting the assets you want to compare (up to 20).
Then, choose the Correlation Period that fits your trading strategy. Shorter periods (e.g., 20 bars) are more sensitive to recent price movements, making them suitable for short-term trading, while longer periods (e.g., 100 or 200 bars) provide a broader view of correlation trends over time.
The indicator outputs a color-coded matrix where each cell represents the correlation between two assets. Warm colors like red and orange signal strong negative correlation, while cool colors like blue and cyan indicate strong positive correlation. Mid-range tones such as yellow or green suggest correlations that are close to neutral. This visual representation makes it easy to spot market patterns at a glance.
One of the most valuable uses of this tool is in portfolio risk management. Portfolios with highly correlated assets are more vulnerable to market swings. By using the heatmap, traders can find assets with low or negative correlation to reduce overall risk.
Another key benefit is preventing overexposure. For example, if EUR/USD and GBP/USD have a high positive correlation, opening trades on both is almost like doubling the position size on one asset, increasing risk unnecessarily. The heatmap makes such relationships clear, helping you avoid them.
The indicator is also useful for pairs trading, where a trader identifies assets that are usually correlated but have temporarily diverged — a potential arbitrage or mean-reversion opportunity.
Additionally, the tool supports intermarket analysis, allowing traders to see how movements in one market (e.g., crude oil) may impact others (e.g., the Canadian dollar). Divergence detection is another advantage: if two typically aligned assets suddenly move in opposite directions, it could signal a major trend shift or a news-driven move.
Overall, the Correlation Heatmap Matrix is not just an analytical indicator but also a fast, visual alert system for monitoring multiple markets at once. This is particularly valuable for traders in fast-moving environments like Forex and crypto.
🔵 Settings 
🟣 Logic 
 Correlation Period : Number of bars used to calculate correlation between assets.
🟣 Display 
 Table on Chart : Enable/disable displaying the heatmap directly on the chart.
 Table Size : Choose the table size (from very small to very large).
 Table Position : Set the table location on the chart (top, middle, or bottom in various alignments).
  
🟣 Symbol Custom 
 Select Market : Choose the market type (Forex, Stocks, Crypto, or Custom).
Symbol 1 to Symbol 20: In custom mode, you can define up to 20 assets for correlation calculation.
🔵 Conclusion 
The Correlation Heatmap Matrix is a powerful tool for analyzing correlations across multiple assets in Forex, crypto, and stock markets. By displaying a color-coded table, it visually conveys both the strength and direction of correlations — warm colors for strong negative correlation, cool colors for strong positive correlation, and mid-range tones such as yellow or green for near-zero or neutral correlation.
This helps traders select assets with low or negative correlation for diversification, avoid overexposure to similar trades, identify arbitrage and pairs trading opportunities, and detect unusual divergences between typically aligned assets. With support for custom mode and up to 20 symbols, it offers high flexibility for different trading strategies, making it a valuable complement to technical analysis and risk management.
Correlation HeatMap Matrix Data [TradingFinder]🔵 Introduction 
Correlation is a statistical measure that shows the degree and direction of a linear relationship between two assets. 
 Its value ranges from -1 to +1 : +1 means perfect positive correlation, 0 means no linear relationship, and -1 means perfect negative correlation.
In financial markets, correlation is used for portfolio diversification, risk management, pairs trading, intermarket analysis, and identifying divergences.
 Correlation HeatMap Matrix Data TradingFinder  is a Pine Script v6 library that calculates and returns raw correlation matrix data between up to 20 symbols. It only provides the data – it does not draw or render the heatmap – making it ideal for use in other scripts that handle visualization or further analysis. The library uses ta.correlation for fast and accurate calculations.
  
 It also includes two helper functions for visual styling :
 
 CorrelationColor(corr) : takes the correlation value as input and generates a smooth gradient color, ranging from strong negative to strong positive correlation.
 CorrelationTextColor(corr) : takes the correlation value as input and returns a text color that ensures optimal contrast over the background color.
 
 Library  
 "Correlation_HeatMap_Matrix_Data_TradingFinder" 
 CorrelationColor(corr) 
  Parameters:
     corr (float) 
 CorrelationTextColor(corr) 
  Parameters:
     corr (float) 
 Data_Matrix(Corr_Period, Sym_1, Sym_2, Sym_3, Sym_4, Sym_5, Sym_6, Sym_7, Sym_8, Sym_9, Sym_10, Sym_11, Sym_12, Sym_13, Sym_14, Sym_15, Sym_16, Sym_17, Sym_18, Sym_19, Sym_20) 
  Parameters:
     Corr_Period (int) 
     Sym_1 (string) 
     Sym_2 (string) 
     Sym_3 (string) 
     Sym_4 (string) 
     Sym_5 (string) 
     Sym_6 (string) 
     Sym_7 (string) 
     Sym_8 (string) 
     Sym_9 (string) 
     Sym_10 (string) 
     Sym_11 (string) 
     Sym_12 (string) 
     Sym_13 (string) 
     Sym_14 (string) 
     Sym_15 (string) 
     Sym_16 (string) 
     Sym_17 (string) 
     Sym_18 (string) 
     Sym_19 (string) 
     Sym_20 (string) 
 
🔵 How to use 
 
 Import the library into your Pine Script using the import keyword and its full namespace.
 Decide how many symbols you want to include in your correlation matrix (up to 20). Each symbol must be provided as a string, for example  FX:EURUSD  .
 Choose the correlation period (Corr\_Period) in bars. This is the lookback window used for the calculation, such as 20, 50, or 100 bars.
 Call  Data_Matrix(Corr_Period, Sym_1, ..., Sym_20)  with your selected parameters. The function will return an array containing the correlation values for every symbol pair (upper triangle of the matrix plus diagonal).
 For example :
 var string Sym_1 = '' , var string Sym_2 = '' , var string Sym_3 = '' , var string Sym_4 = '' , var string Sym_5 = '' , var string Sym_6 = '' , var string Sym_7 = '' , var string Sym_8 = '' , var string Sym_9 = '' , var string Sym_10 = ''
var string Sym_11 = '', var string Sym_12 = '', var string Sym_13 = '', var string Sym_14 = '', var string Sym_15 = '', var string Sym_16 = '', var string Sym_17 = '', var string Sym_18 = '', var string Sym_19 = '', var string Sym_20 = ''
switch Market
    'Forex' => Sym_1  := 'EURUSD' , Sym_2 := 'GBPUSD' , Sym_3 := 'USDJPY' , Sym_4 := 'USDCHF' , Sym_5 := 'USDCAD' , Sym_6 := 'AUDUSD' , Sym_7 := 'NZDUSD' , Sym_8 := 'EURJPY' , Sym_9 := 'EURGBP' , Sym_10 := 'GBPJPY'
     ,Sym_11 := 'AUDJPY', Sym_12 := 'EURCHF', Sym_13 := 'EURCAD', Sym_14 := 'GBPCAD', Sym_15 := 'CADJPY', Sym_16 := 'CHFJPY', Sym_17 := 'NZDJPY', Sym_18 := 'AUDNZD', Sym_19 := 'USDSEK' , Sym_20 := 'USDNOK'
    'Stock' => Sym_1  := 'NVDA' , Sym_2 := 'AAPL' , Sym_3 := 'GOOGL' , Sym_4 := 'GOOG' , Sym_5 := 'META' , Sym_6 := 'MSFT' , Sym_7 := 'AMZN' , Sym_8 := 'AVGO' , Sym_9 := 'TSLA' , Sym_10 := 'BRK.B'
     ,Sym_11 := 'UNH'  , Sym_12 := 'V'   , Sym_13 := 'JPM'  , Sym_14 := 'WMT' , Sym_15 := 'LLY' , Sym_16 := 'ORCL', Sym_17 := 'HD'  , Sym_18 := 'JNJ' , Sym_19 := 'MA'  , Sym_20 := 'COST'
    'Crypto' => Sym_1  := 'BTCUSD' , Sym_2 := 'ETHUSD' , Sym_3 := 'BNBUSD' , Sym_4 := 'XRPUSD' , Sym_5 := 'SOLUSD' , Sym_6 := 'ADAUSD' , Sym_7 := 'DOGEUSD' , Sym_8 := 'AVAXUSD' , Sym_9 := 'DOTUSD' , Sym_10 := 'TRXUSD'
     ,Sym_11 := 'LTCUSD' , Sym_12 := 'LINKUSD', Sym_13 := 'UNIUSD', Sym_14 := 'ATOMUSD', Sym_15 := 'ICPUSD', Sym_16 := 'ARBUSD', Sym_17 := 'APTUSD', Sym_18 := 'FILUSD', Sym_19 := 'OPUSD' , Sym_20 := 'USDT.D'
    'Custom' => Sym_1  := Sym_1_C , Sym_2 := Sym_2_C , Sym_3 := Sym_3_C , Sym_4 := Sym_4_C , Sym_5 := Sym_5_C , Sym_6 := Sym_6_C , Sym_7 := Sym_7_C , Sym_8 := Sym_8_C , Sym_9 := Sym_9_C , Sym_10 := Sym_10_C
     ,Sym_11 := Sym_11_C, Sym_12 := Sym_12_C, Sym_13 := Sym_13_C, Sym_14 := Sym_14_C, Sym_15 := Sym_15_C, Sym_16 := Sym_16_C, Sym_17 := Sym_17_C, Sym_18 := Sym_18_C, Sym_19 := Sym_19_C , Sym_20 := Sym_20_C
  = Corr.Data_Matrix(Corr_period, Sym_1 ,Sym_2 ,Sym_3 ,Sym_4 ,Sym_5 ,Sym_6 ,Sym_7 ,Sym_8 ,Sym_9 ,Sym_10,Sym_11,Sym_12,Sym_13,Sym_14,Sym_15,Sym_16,Sym_17,Sym_18,Sym_19,Sym_20)
 
 Loop through or index into this array to retrieve each correlation value for your custom layout or logic.
 Pass each correlation value to  CorrelationColor()  to get the corresponding gradient background color, which reflects the correlation’s strength and direction (negative to positive).
 For example :
 Corr.CorrelationColor(SYM_3_10) 
 Pass the same correlation value to  CorrelationTextColor()  to get the correct text color for readability against that background.
 For example :
 Corr.CorrelationTextColor(SYM_1_1) 
 Use these colors in a table or label to render your own heatmap or any other visualization you need.
 
Bollinger Heatmap [Quantitative]Overview 
The Bollinger Heatmap is a composite indicator that synthesizes data derived from 30 Bollinger bands distributed over multiple time horizons, offering a high-dimensional characterization of the underlying asset.
 Algorithm 
The algorithm quantifies the current price’s relative position within each Bollinger band ensemble, generating a normalized position ratio. This ratio is subsequently transformed into a scalar heat value, which is then rendered on a continuous color gradient from red to blue. Red hues correspond to price proximity to or extension below the lower band, while blue hues denote price proximity to or extension above the upper band.
Using default parameters, the indicator maps bands over timeframes increasing in a pattern approximating exponential growth, constrained to multiples of seven days. The lower region encodes relationships with shorter-term bands spanning between 1 and 14 weeks, whereas the upper region portrays interactions with longer-term bands ranging from 15 to 52 weeks.
 Conclusion 
By integrating Bollinger bands across a diverse array of time horizons, the heatmap indicator aims to mitigate the model risk inherent in selecting a single band length, capturing exposure across a richer parameter space.
Correlation HeatMap [TradingFinder] Sessions Data Science Stats🔵 Introduction 
n financial markets, correlation describes the statistical relationship between the price movements of two assets and how they interact over time. It plays a key role in both trading and investing by helping analyze asset behavior, manage portfolio risk, and understand intermarket dynamics. The Correlation Heatmap is a visual tool that shows how the correlation between multiple assets and a central reference asset (the Main Symbol) changes over time. 
It supports four market types forex, stocks, crypto, and a custom mode making it adaptable to different trading environments. The heatmap uses a color-coded grid where warmer tones represent stronger negative correlations and cooler tones indicate stronger positive ones. This intuitive color system allows traders to quickly identify when assets move together or diverge, offering real-time insights that go beyond traditional correlation tables.
🟣 How to Interpret the Heatmap Visually ?
 
 Each cell represents the correlation between the main symbol and one compared asset at a specific time.
 Warm colors (e.g. red, orange) suggest strong negative correlation as one asset rises, the other tends to fall.
 Cool colors (e.g. blue, green) suggest strong positive correlation both assets tend to move in the same direction.
 Lighter shades indicate weaker correlations, while darker shades indicate stronger correlations.
 The heatmap updates over time, allowing users to detect changes in correlation during market events or trading sessions.
 
  
One of the standout features of this indicator is its ability to overlay global market sessions such as Tokyo, London, New York, or major equity opens directly onto the heatmap timeline. This alignment lets traders observe how correlation structures respond to real-world session changes. For example, they can spot when assets shift from being inversely correlated to moving together as a new session opens, potentially signaling new momentum or macro flow. The customizable symbol setup (including up to 20 compared assets) makes it ideal not only for forex and crypto traders but also for multi-asset and sector-based stock analysis.
🟣 Use Cases and Advantages 
 
 Analyze sector rotation in equities by tracking correlation to major indices like SPX or DJI.
 Monitor altcoin behavior relative to Bitcoin to find early entry opportunities in crypto markets.
 Detect changes in currency alignment with DXY across trading sessions in forex.
 Identify correlation breakdowns during market volatility, signaling possible new trends.
 Use correlation shifts as confirmation for trade setups or to hedge multi-asset exposure
 
  
🔵 How to Use 
Correlation is one of the core concepts in financial analysis and allows traders to understand how assets behave in relation to one another. The Correlation Heatmap extends this idea by going beyond a simple number or static matrix. Instead, it presents a dynamic visual map of how correlations shift over time.
In this indicator, a Main Symbol is selected as the reference point for analysis. In standard modes such as forex, stocks, or crypto, the symbol currently shown on the main chart is automatically used as the main symbol. This allows users to begin correlation analysis right away without adjusting any settings. 
The horizontal axis of the heatmap shows time, while the vertical axis lists the selected assets. Each cell on the heatmap shows the correlation between that asset and the main symbol at a given moment.
This approach is especially useful for intermarket analysis. In forex, for example, tracking how currency pairs like  OANDA:EURUSD  EURUSD,  FX:GBPUSD  GBPUSD, and  PEPPERSTONE:AUDUSD  AUDUSD correlate with  TVC:DXY  DXY can give insight into broader capital flow. 
If these pairs start showing increasing positive correlation with DXY say, shifting from blue to light green it could signal the start of a new phase or reversal. Conversely, if negative correlation fades gradually, it may suggest weakening relationships and more independent or volatile movement.
In the crypto market, watching how altcoins correlate with Bitcoin can help identify ideal entry points in secondary assets. In the stock market, analyzing how companies within the same sector move in relation to a major index like  SP:SPX  SPX or  DJ:DJI  DJI is also a highly effective technique for both technical and fundamental analysts.
  
This indicator not only visualizes correlation but also displays major market sessions. When enabled, this feature helps traders observe how correlation behavior changes at the start of each session, whether it's Tokyo, London, New York, or the opening of stock exchanges. Many key shifts, breakouts, or reversals tend to happen around these times, and the heatmap makes them easy to spot.
Another important feature is the market selection mode. Users can switch between forex, crypto, stocks, or custom markets and see correlation behavior specific to each one. In custom mode, users can manually select any combination of symbols for more advanced or personalized analysis. This makes the heatmap valuable not only for forex traders but also for stock traders, crypto analysts, and multi-asset strategists.
Finally, the heatmap's color-coded design helps users make sense of the data quickly. Warm colors such as red and orange reflect stronger negative correlations, while cool colors like blue and green represent stronger positive relationships. This simplicity and clarity make the tool accessible to both beginners and experienced traders.
  
🔵 Settings 
Correlation Period: Allows you to set how many historical bars are used for calculating correlation. A higher number means a smoother, slower-moving heatmap, while a lower number makes it more responsive to recent changes.
Select Market: Lets you choose between Forex, Stock, Crypto, or Custom. In the first three options, the chart’s active symbol is automatically used as the Main Symbol. In Custom mode, you can manually define the Main Symbol and up to 20 Compared Symbols.
Show Open Session: Enables the display of major trading sessions such as Tokyo, London, New York, or equity market opening hours directly on the timeline. This helps you connect correlation shifts with real-world market activity.
Market Mode: Lets you select whether the displayed sessions relate to the forex or stock market.
🔵 Conclusion 
The Correlation Heatmap is a robust and flexible tool for analyzing the relationship between assets across different markets. By tracking how correlations change in real time, traders can better identify alignment or divergence between symbols and gain valuable insights into market structure. 
Support for multiple asset classes, session overlays, and intuitive visual cues make this one of the most effective tools for intermarket analysis.
Whether you’re looking to manage portfolio risk, validate entry points, or simply understand capital flow across markets, this heatmap provides a clear and actionable perspective that you can rely on.






















