LVN/HVN Auto Detection [PhenLabs]📊 PhenLabs - LVN/HVN Auto Detection
Version: PineScript™ v6
📌 Description
The PhenLabs LVN/HVN Auto Detection indicator is an advanced volume profile analysis tool that automatically identifies Low Volume Nodes (LVN) and High Volume Nodes (HVN) across multiple trading sessions. This sophisticated indicator analyzes volume distribution patterns to pinpoint critical support and resistance levels where price is likely to react, providing traders with high-probability zones for entries, exits, and risk management.
Unlike traditional volume indicators that only show current activity, this tool builds comprehensive volume profiles from historical sessions and intelligently filters the most significant levels. It combines real-time volume analysis with dynamic level detection, offering both visual bubbles for immediate volume activity and persistent horizontal lines that act as ongoing support/resistance references.
🚀 Points of Innovation
Multi-Session Volume Profile Analysis - Automatically calculates and analyzes volume profiles across the last 5 trading sessions
Intelligent Level Separation Logic - Prevents overlapping signals by maintaining minimum separation between LVN and HVN levels
Dynamic Timeframe Adaptation - Automatically adjusts session lengths based on chart timeframe for optimal level detection
Real-Time Activity Bubbles - Shows volume activity strength through different bubble sizes at key levels
Persistent Line Management - Creates horizontal lines that extend until price crosses them, providing ongoing reference points
Dual Threshold System - Independent percentage-based thresholds for both LVN and HVN identification
🔧 Core Components
Volume Profile Engine : Builds 20-row volume profiles for each analyzed session, distributing volume across price levels
Level Identification Algorithm : Uses percentage-based thresholds to classify volume distribution patterns
Separation Logic : Ensures minimum distance between conflicting levels, prioritizing HVN when overlap occurs
Line Management System : Tracks active support/resistance lines and removes them when price crosses through
Volume Activity Monitor : Compares current volume to 13-period moving average for activity classification
🔥 Key Features
Customizable Thresholds : LVN threshold (5-35%, default 20%) and HVN threshold (65-95%, default 80%) for precise level filtering
Volume Activity Multiplier : Adjustable volume threshold (0.5+, default 1.5) for bubble and line creation sensitivity
Flexible Display Modes : Choose between Lines only, Bubbles only, or Both for optimal chart clarity
Smart Level Separation : Minimum separation percentage (0.1-2%, default 0.5%) prevents conflicting signals
Color Customization : Independent color controls for LVN (red) and HVN (blue) elements
Performance Optimization : Processes every 15 bars with maximum 500 active lines for smooth operation
🎨 Visualization
Colored Bubbles : Three sizes (large, medium, small) indicate volume activity strength at key levels
Horizontal Lines : Persistent support/resistance lines with width corresponding to volume activity
Dual Color System : Semi-transparent red for LVN areas, semi-transparent blue for HVN zones
Information Tooltip : Optional table showing usage guidelines and optimization tips
📖 Usage Guidelines
Volume Thresholds
LVN Threshold
○ Default: 20.0%
○ Range: 5.0-35.0%
○ Description: Price levels with volume below this percentage are marked as LVNs. Lower values create fewer, more significant levels. Typical range 15-25% works for most instruments.
HVN Threshold
○ Default: 80.0%
○ Range: 65.0-95.0%
○ Description: Price levels with volume above this percentage are marked as HVNs. Higher values create fewer, stronger levels. Range 75-85% is optimal for most trading.
Display Controls
Volume Threshold
○ Default: 1.5
○ Range: 0.5+
○ Description: Multiplier for volume significance (High=2+threshold, Medium=1+threshold, Low=0+threshold). Higher values require more volume for signals.
✅ Best Use Cases
Swing Trading : Identify key levels for position entries and exits over multiple days
Scalping : Use bubbles for immediate volume activity confirmation at critical levels
Risk Management : Place stops beyond LVN levels where price moves quickly
Breakout Trading : Monitor HVN levels for potential breakout or rejection scenarios
Multi-Timeframe Analysis : Combine with higher timeframe levels for confluence
⚠️ Limitations
Timeframe Sensitivity : Lower timeframes may produce too many levels; higher timeframes recommended for cleaner signals
Volume Data Dependency : Accuracy depends on reliable volume data from your data provider
Historical Analysis : Uses past volume data which may not predict future price behavior
Performance Impact : High number of active lines may affect chart performance on slower devices
💡 What Makes This Unique
Automated Session Analysis : No manual drawing required - automatically analyzes multiple sessions
Intelligent Filtering : Advanced separation logic prevents overlapping and conflicting signals
Adaptive Processing : Adjusts to different timeframes automatically for optimal level detection
Dual Visualization System : Combines persistent lines with real-time activity indicators
🔬 How It Works
1. Volume Profile Construction :
Analyzes the last 5 trading sessions with dynamic session length based on timeframe
Divides each session’s price range into 20 equal levels for volume distribution analysis
2. Level Classification :
Calculates volume percentage at each price level relative to session maximum
Identifies LVN levels below threshold and HVN levels above threshold
3. Signal Generation :
Creates bubbles when volume activity exceeds thresholds at identified levels
Draws horizontal lines that persist until price crosses through them
💡 Note : For optimal results, increase your chart timeframe if you see too many levels. The indicator performs best on 15-minute and higher timeframes where volume patterns are more meaningful and less noisy.