AI Academy: Volume k-NN [PhenLabs]📊 AI Academy: Volume k-NN
Version: PineScript™ v6
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 Description
AI Academy: Volume k-NN (Theory Edition) is an educational indicator designed to demystify how artificial intelligence pattern recognition works directly on your TradingView charts. Rather than being a black-box signal generator, this tool visualizes the entire k-Nearest Neighbors algorithm process in real-time, showing you exactly how AI identifies similar historical patterns and generates predictions.
The indicator scans up to 2,000 historical bars to find patterns that match your current price action, then uses an ensemble of the closest matches to project potential future movement. What sets this apart is the integrated “AI Grimoire”—an interactive educational book overlay that teaches core machine learning concepts through four illuminating chapters.
Whether you’re a trader curious about AI methodology or a developer learning algorithmic concepts, this indicator transforms abstract machine learning theory into tangible, visual understanding.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Points of Innovation
• First TradingView indicator to visualize k-NN algorithm execution in real-time with full transparency
• Interactive “AI Grimoire” educational overlay teaches machine learning concepts while you trade
• Dual-mode pattern matching combines price action with optional volume confirmation
• Confidence-based opacity system visually communicates prediction reliability
• Historical match visualization shows exactly which past patterns informed the prediction
• Ghost bar projections display averaged ensemble predictions with adjustable forecast horizons
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 Core Components
• Pattern Capture Engine: Converts recent price action into logarithmic returns for normalized comparison across different price levels
• k-NN Search Algorithm: Calculates Euclidean distance between current pattern and historical patterns to find closest matches
• Volume Weighting System: Optional feature that incorporates volume patterns into distance calculations with adjustable influence
• Ensemble Predictor: Averages future returns from k-nearest historical matches to generate consensus forecast
• Confidence Calculator: Measures average distance of top matches to determine prediction reliability on 0-100% scale
• AI Grimoire Display: Table-based educational overlay rendering book-style content with chapter navigation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔥 Key Features
• Adjustable Pattern Length: Define how many bars constitute the current pattern for matching (5-100 bars)
• Configurable Search Depth: Control how far back the algorithm searches for historical matches (500-4,900 bars)
• Flexible k-Neighbors: Select how many closest matches inform the prediction (1-20 neighbors)
• Volume Toggle: Enable or disable volume pattern matching for different market conditions
• Volume Influence Slider: Fine-tune the weight given to volume vs. price patterns (0-100%)
• Ghost Bar Count: Adjust how many future bars the indicator projects (3-15 bars)
• Minimum Confidence Filter: Set threshold to hide low-confidence predictions
• Historical Match Display: Toggle visibility of colored boxes marking source patterns
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 Visualization
• Blue Scanner Box: Highlights current pattern being analyzed labeled “AI INPUT (The Prompt)”
• Green Historical Boxes: Mark past patterns where price subsequently moved bullish
• Red Historical Boxes: Mark past patterns where price subsequently moved bearish
• Ghost Bars: Semi-transparent candles projecting into the future showing predicted price path
• Confidence Label: Displays prediction confidence percentage and number of matches used
• AI Grimoire Book: Leather-bound book overlay in top-right corner with navigable chapters
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📖 Usage Guidelines
Algorithm Settings
• Pattern Length — Default: 20 | Range: 5-100 | Controls how many recent bars define the pattern. Shorter values find more matches but less specific. Longer values find fewer but more precise matches.
• Search Depth — Default: 2000 | Range: 500-4900 | Determines how many historical bars to scan. Higher values find more potential matches but increase computation time.
• k-Neighbors — Default: 5 | Range: 1-20 | Number of closest matches to use for prediction. Higher values smooth predictions but may dilute strong signals.
• Ghost Bar Count — Default: 5 | Range: 3-15 | How many future bars to project. Shorter horizons are typically more reliable.
• Use Volume Matching — Default: Off | When enabled, patterns must match on both price AND volume characteristics.
• Volume Influence — Default: 30% | Range: 0-100% | Weight given to volume pattern when volume matching is enabled.
Visualization Settings
• Bullish/Bearish Match Colors — Customize colors for historical match boxes based on outcome direction.
• Min Confidence % — Default: 60 | Predictions below this threshold will not display.
• Show Historical Matches — Default: On | Toggle visibility of source pattern boxes on chart.
Education Settings
• Select Chapter — Navigate through AI Grimoire chapters or keep book closed for clean chart view.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Best Use Cases
• Learning how k-Nearest Neighbors algorithm functions in a trading context
• Understanding the relationship between historical patterns and forward predictions
• Identifying when current market conditions resemble past scenarios
• Supplementing discretionary analysis with pattern-based confluence
• Teaching others machine learning concepts through visual demonstration
• Validating whether volume confirms price pattern formations
• Building intuition for what AI “sees” when analyzing charts
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Limitations
• Past pattern similarity does not guarantee future outcome similarity
• Requires sufficient historical data (minimum 500+ bars) to function properly
• Computation-intensive on lower timeframes with maximum search depth
• Cannot predict truly novel “black swan” events not represented in historical data
• Volume matching less effective on assets with inconsistent volume reporting
• Predictions become less reliable as forecast horizon extends further out
• Educational overlay may obstruct chart view on smaller screens
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 What Makes This Unique
• Full Transparency: Unlike black-box AI tools, every step of the algorithm is visualized on your chart
• Integrated Education: The AI Grimoire teaches machine learning concepts without leaving TradingView
• Theory Meets Practice: See exactly which historical patterns inform each prediction
• Honest Uncertainty: Confidence scoring and opacity fading acknowledge when the AI “doesn’t know”
• Dual-Mode Analysis: Optional volume weighting adds institutional-quality analysis dimension
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 How It Works
1. Pattern Capture: On each bar, the indicator captures the most recent price changes as logarithmic returns, creating a normalized “fingerprint” of current market behavior. If volume matching is enabled, volume changes are captured similarly.
2. Historical Search: The algorithm iterates through up to 2,000 historical bars, calculating the Euclidean distance between the current pattern fingerprint and each historical pattern. Distance combines price similarity and optional volume similarity based on weight settings.
3. Neighbor Selection: All historical patterns are ranked by similarity (lowest distance = most similar). The k-closest matches are selected as the “ensemble council” that will inform the prediction.
4. Confidence Calculation: Average distance of top-k matches determines confidence. Tighter clustering of similar patterns yields higher confidence scores, while scattered or distant matches produce lower confidence.
5. Prediction Generation: Future returns from each historical match (what happened AFTER those patterns) are averaged together. This ensemble average is applied to current price to generate ghost bar projections.
6. Visualization: Historical match locations are marked with colored boxes (green for bullish outcomes, red for bearish). Ghost bars render with opacity tied to confidence level—higher confidence means more solid bars.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 Note:
This indicator is designed primarily for educational purposes —to help traders understand how AI pattern recognition algorithms function. While the predictions can supplement your analysis, they should never be used as the sole basis for trading decisions. The AI Grimoire chapters explain key concepts including why AI “hallucinates” during unprecedented market events. Always combine with proper risk management and additional confirmation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Forecasting
Pivot Scannerpivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alerts
channeller proChanneller Pro - Statistical Price Channel Detection
What This Script Does
Channeller Pro identifies and draws price channels using pivot points, linear regression, and quality filters. It detects bullish and bearish channels and draws support/resistance lines with quality metrics.
Originality & Methodology
This script combines:
Pivot Point Detection: Uses TradingView's ta.pivothigh() and ta.pivotlow() with configurable left/right lookback to identify swing highs and lows.
Linear Regression Analysis: Fits a least-squares regression line through detected pivot points to determine channel slope and intercept.
R² Quality Scoring: Calculates the coefficient of determination (R²) to measure regression fit quality. R² values closer to 1.0 indicate stronger linear alignment of pivots. Channels below the minimum R² threshold are filtered out.
Pattern Validation:
Bullish channels require higher lows (ascending pivot lows)
Bearish channels require lower highs (descending pivot highs)
This ensures channels align with trend structure
ADX Trend Filter: Uses Average Directional Index (ADX) to show channels only when trend strength exceeds a threshold, reducing false signals in choppy markets.
Volume Confirmation (optional): Filters channels based on volume exceeding a moving average threshold.
Dynamic Channel Width: Calculates channel width by finding the maximum deviation from the regression line within the pivot range, then draws parallel support/resistance lines.
Channel Invalidation Logic: Tracks bounces and pierces. Channels are invalidated after multiple pierces through support/resistance, ensuring only active channels are displayed.
How It Works
Detection Process:
Identifies pivot highs/lows using the specified lookback periods
Stores recent pivots in arrays (configurable max count)
When minimum pivot count is reached, calculates linear regression through pivot points
Validates the channel by checking:
R² score meets minimum threshold (default 0.7)
Slope direction matches trend (positive for bullish, negative for bearish)
Pattern structure (higher lows for bullish, lower highs for bearish)
ADX exceeds threshold (if enabled)
Volume confirmation (if enabled)
If valid, draws support/resistance lines parallel to the regression line
Continuously monitors for channel breaks and invalidates when pierced multiple times
Mathematical Foundation:
Linear regression uses least squares: y = slope × x + intercept
R² calculation: R² = 1 - (SS_res / SS_tot) where SS_res is residual sum of squares and SS_tot is total sum of squares
Channel width = maximum price deviation from regression line within pivot range
How to Use
Basic Setup:
Apply the indicator to your chart
Adjust "Pivot Lookback Left/Right" to control pivot sensitivity (default 10 bars each)
Set "Min Pivots for Channel" (default 3) - higher values require more confirmation but reduce false signals
Configure "Min R² Score" (default 0.7) - higher values show only the best-fitting channels
Filter Configuration:
ADX Filter: Enable to show channels only during trending conditions (ADX > threshold)
Volume Filter: Enable to require volume confirmation for channel formation
HL/LH Pattern: Keep enabled to ensure channels follow proper trend structure
Trading Applications:
Support/Resistance: Use channel boundaries as dynamic support/resistance levels
Trend Following: Trade bounces off channel boundaries in the direction of the trend
Breakout Trading: Monitor for channel breaks as potential trend reversal signals
Channel Quality: Higher R² scores (displayed in labels) indicate stronger, more reliable channels
Display Options:
Toggle channel fills, mid-lines, pivot markers, and labels
Adjust projection length to extend channels into the future
Customize colors for bullish/bearish channels
Alerts:
The script includes alerts for:
New channel formation
Channel break/invalidation
New pivot detection
Important Notes
Channels are statistical constructs based on historical pivot points and do not guarantee future price action
R² scores indicate fit quality, not trading performance
Channels may be invalidated as market conditions change
Past channel performance does not predict future results
Always use proper risk management and combine with other analysis methods
Technical Details
Built-in Pine Script v6
Uses arrays for pivot storage and management
Implements custom linear regression calculation
Real-time channel validation and invalidation
Configurable quality thresholds and filters
MVRV Ratio Indicator [captainua]MVRV Ratio Indicator - Market Value to Realized Value Ratio
Overview
This professional indicator calculates and visualizes the MVRV (Market Value to Realized Value) ratio (raw, non-Z-score) with optional MVRV-Z overlay, comparing current market capitalization to realized capitalization to help identify potential market tops and bottoms for cryptocurrency markets.
Unlike MVRV-Z which normalizes the ratio using standard deviation (creating a Z-score), the raw MVRV ratio provides direct comparison between market cap and realized cap. This indicator enhances the raw ratio with historical percentile bands, percentile rank calculation, divergence detection, historical event logging, dynamic color gradients, enhanced visualization options, optional MVRV-Z comparison, and NEW advanced metrics including Risk Score, MVRV Momentum, Time in Zone tracking, and Price Target calculations.
NEW Features in This Version:
• Risk Score (0-100): Composite indicator based on MVRV level and percentile rank for instant risk assessment
• MVRV Momentum: Rate of change indicator showing trend direction (↑ Increasing, ↓ Decreasing, → Flat)
• Time in Zone: Tracks how long MVRV has been in the current zone (top/bottom/neutral) in bars
• Price Targets: Calculates price levels at key MVRV thresholds (fair value, top, bottom)
• Input Validation: Warns about invalid parameter combinations (e.g., extreme thresholds out of order)
• Multiple Smoothing Options: SMA, EMA, WMA, RMA for noise reduction
• Performance Optimized: Cached request.security() calls, ta.percentrank() for efficiency
• Human-Readable Timestamps: Event log now shows dates (YYYY-MM-DD) instead of bar indices
Core Calculations
MVRV Ratio Calculation:
The script calculates MVRV ratio using the standard formula: MVRV Ratio = Market Cap / Realized Cap. This formula provides a direct ratio without normalization, showing how many times the current market cap exceeds (or falls below) the realized cap.
Market Capitalization (Market Cap): The total market value of all coins in circulation, calculated as current price × circulating supply. This represents the market's current valuation of the asset.
Realized Capitalization (Realized Cap): The sum of the value of each coin when it last moved on-chain, representing the average cost basis of all coins.
Raw Ratio Interpretation:
- Ratio > 3.5: Extreme overvaluation (market cap significantly above realized cap)
- Ratio 2.5-3.5: Moderate overvaluation
- Ratio 1.0-2.5: Fair value to moderate overvaluation
- Ratio 0.8-1.0: Fair value to moderate undervaluation
- Ratio < 0.8: Undervaluation (market cap close to or below realized cap)
Risk Score (NEW):
Composite risk indicator ranging from 0-100:
- 80-100: Very High Risk (extreme overvaluation)
- 60-80: High Risk (overvaluation)
- 40-60: Moderate Risk (fair value range)
- 20-40: Low Risk (undervaluation)
- 0-20: Very Low Risk (extreme undervaluation)
The risk score uses percentile rank when available, or normalizes MVRV ratio to the 0-100 scale based on configured thresholds.
MVRV Momentum (NEW):
Rate of change indicator showing trend direction:
- ↑ Increasing: MVRV ratio rising (momentum > 0.01)
- ↓ Decreasing: MVRV ratio falling (momentum < -0.01)
- → Flat: MVRV ratio stable
- Displays percentage change over configurable period (default: 14 bars)
Time in Zone (NEW):
Tracks duration in current zone:
- Top Zone: Bars spent above top threshold (3.5)
- Bottom Zone: Bars spent below bottom threshold (0.8)
- Neutral Zone: Bars spent between thresholds
- Resets when zone changes
- Helps identify prolonged extreme conditions
Price Targets (NEW):
Calculates price levels at key MVRV thresholds:
- Price @ Fair Value: Price when MVRV = 1.0
- Price @ Top Threshold: Price when MVRV = 3.5
- Price @ Bottom Threshold: Price when MVRV = 0.8
- Based on estimated realized price (current price / MVRV ratio)
Data Source Selection:
The indicator supports multiple data source options for maximum flexibility:
Glassnode (Recommended):
- Uses Glassnode Market Cap data
- Calculates MVRV from Market Cap / Realized Cap
- Symbol format: GLASSNODE:{TOKEN}_MARKETCAP
- Requires Glassnode data subscription
- Also requires CoinMetrics for Realized Cap
- Best for comprehensive analysis with MVRV-Z comparison
IntoTheBlock:
- Direct MVRV ratio data from IntoTheBlock
- Simplest option - no calculations required
- Works for BTC and other supported tokens
- Symbol format: INTOTHEBLOCK:{TOKEN}_MVRV
- Requires IntoTheBlock data subscription on TradingView
Historical Percentile Bands:
The indicator calculates rolling percentile bands over a configurable period (default: 500 bars):
- 5th Percentile: Very low historical values (extreme undervaluation range)
- 25th Percentile: Lower quartile (undervaluation range)
- 50th Percentile: Median (fair value center)
- 75th Percentile: Upper quartile (overvaluation range)
- 95th Percentile: Very high historical values (extreme overvaluation range)
Percentile bands use ta.percentile_nearest_rank() for efficient calculation.
Percentile Rank:
Percentile rank shows where the current MVRV ratio sits in the historical distribution (0-100%):
- 0-25%: Bottom quartile (undervaluation)
- 25-50%: Lower half (moderate undervaluation to fair value)
- 50-75%: Upper half (fair value to moderate overvaluation)
- 75-100%: Top quartile (overvaluation)
Now uses efficient ta.percentrank() instead of array-based calculation.
Input Validation (NEW):
The indicator validates input parameters and displays warnings for:
- Extreme High Threshold should be > Top Threshold
- Extreme Low Threshold should be < Bottom Threshold
- Min Lookback Range must be < Max Lookback Range
- Top Threshold should be > Moderate Overvalued
- Moderate Overvalued should be > Fair Value
- Fair Value should be > Bottom Threshold
- Rapid Increase Threshold should be > 0
- Rapid Decrease Threshold should be < 0
Smoothing Options (Enhanced):
Multiple smoothing types available:
- SMA: Simple Moving Average (equal weight)
- EMA: Exponential Moving Average (more weight to recent)
- WMA: Weighted Moving Average (linear weight)
- RMA: Running Moving Average (Wilder's smoothing)
Reference Levels
Overvalued (Potential Top) - 3.5:
The 3.5 level indicates potentially extreme overvaluation. When MVRV ratio exceeds this threshold:
- Market cap is significantly above realized cap
- Potential selling opportunities for profit-taking
- Risk of market corrections or reversals
- Risk Score typically >80 (Very High Risk)
Moderately Overvalued - 2.5:
The 2.5 level indicates moderate overvaluation:
- Market cap is above realized cap but not extreme
- Caution warranted but not necessarily sell signal
- Risk Score typically 60-80 (High Risk)
Fair Value - 1.0:
The 1.0 level indicates fair valuation:
- Market cap equals realized cap
- Balanced market conditions
- Risk Score typically 40-60 (Moderate Risk)
Undervalued (Potential Bottom) - 0.8:
The 0.8 level indicates potentially undervalued conditions:
- Market cap is close to or below realized cap
- Potential buying opportunities for accumulation
- Risk Score typically <40 (Low Risk)
Visual Features
MVRV Ratio Line:
The main indicator line displays the calculated MVRV ratio with dynamic color gradient:
- Bright Red: Extreme overvaluation (ratio ≥ top threshold + 0.5)
- Orange: High overvaluation (ratio ≥ top threshold)
- Cornflower Blue: Neutral/Fair value (around fair value level)
- Deep Sky Blue: Low/Undervaluation (ratio ≤ bottom threshold)
- Bright Green: Extreme undervaluation (ratio ≤ bottom threshold - 0.1)
Can also be displayed as histogram/bar chart.
Historical Percentile Bands:
Five percentile bands with optional fills:
- 5th Percentile (Blue): Very low historical range
- 25th Percentile (Blue): Lower quartile
- 50th Percentile (Gray): Historical median
- 75th Percentile (Orange): Upper quartile
- 95th Percentile (Red): Very high historical range
Reference Lines:
Horizontal reference lines at key levels (all customizable):
- Top Threshold (default 3.5): Purple/violet
- Moderate Overvalued (default 2.5): Orange
- Fair Value (1.0): Gray
- Bottom Threshold (default 0.8): Blue
Background Highlights:
Optional background color highlights:
- High Zone (Maroon/Red): MVRV ratio ≥ top threshold
- Low Zone (Green): MVRV ratio ≤ bottom threshold
Divergence Detection:
Advanced divergence detection between price and MVRV ratio:
- Regular Bullish Divergence: Price lower low + MVRV higher low
- Regular Bearish Divergence: Price higher high + MVRV lower high
- Hidden Bullish Divergence: Price higher low + MVRV lower low
- Hidden Bearish Divergence: Price lower high + MVRV higher high
- Visual markers with icons (🐂/🐻) and connecting lines
Historical Event Log (Enhanced):
Comprehensive event tracking:
- Tracks zone entries/exits, extreme values, cross events
- Now displays human-readable dates (YYYY-MM-DD) instead of bar indices
- Color-coded events (red for top/high, green for bottom/low)
- Configurable log size (5-50 events)
Information Table (Enhanced):
Comprehensive on-chart table with NEW metrics:
Current Values:
- MVRV Ratio: Current ratio value
- Percentile Rank: Position in historical distribution (0-100%)
- Risk Score (NEW): Composite risk indicator (0-100) with risk level
- Market Status: Current market condition
- Signal: Trading signal (Strong Buy/Buy/Hold/Sell/Strong Sell)
- MVRV Momentum (NEW): Trend direction with percentage change
- Time in Zone (NEW): Current zone and duration in bars
Price Information (Enhanced):
- Current Price: Current market price
- Est. Realized Price: Estimated realized price
- Price @ Fair Value (NEW): Price when MVRV = 1.0
- Price @ Top Threshold (NEW): Price when MVRV = 3.5
- Price @ Bottom Threshold (NEW): Price when MVRV = 0.8
Other Metrics:
- Percentile Bands: Range from 5th to 95th percentile
- MVRV-Z Score: Z-score value (when comparison enabled)
- Change (1D/1W/1M): Ratio change over timeframes
- To Top/Bottom: Percentage distance to key levels
- Historical Range: Percentage below ATH / above ATL
- 30D Volatility: Standard deviation
Historical Event Log:
- Recent events with dates and values
- Color-coded for quick identification
Alert System
Comprehensive alerting capabilities:
Zone Alerts:
- Top Zone Entry/Exit
- Bottom Zone Entry/Exit
Cross Alerts:
- Cross Above/Below Top Threshold
- Cross Above/Below Fair Value (1.0)
Extreme Value Alerts:
- Extreme High (configurable, default: 4.5)
- Extreme Low (configurable, default: 0.7)
Rate of Change Alerts:
- Rapid Increase/Decrease
Divergence Alerts:
- Bullish/Bearish Divergence
- Hidden Bullish/Bearish Divergence
All alerts support cooldown to prevent spam.
Usage Instructions
Getting Started:
1. Select data source (Glassnode recommended)
2. Enable Risk Score for composite risk assessment (0-100)
3. Enable MVRV Momentum to track trend direction
4. Enable Time in Zone to see zone duration
5. Enable Price Targets to see price levels at key thresholds
6. Use weekly timeframe for cleaner signals
Risk-Based Position Sizing:
Use Risk Score to guide position sizing:
- Risk Score >80 (Very High Risk): Reduce/exit positions
- Risk Score 60-80 (High Risk): Smaller positions, caution
- Risk Score 40-60 (Moderate Risk): Normal positions
- Risk Score 20-40 (Low Risk): Larger positions opportunity
- Risk Score <20 (Very Low Risk): Strong accumulation zone
Momentum-Based Analysis:
Use MVRV Momentum for trend confirmation:
- ↑ Increasing + High MVRV: Late bull market, caution
- ↑ Increasing + Low MVRV: Recovery phase, bullish
- ↓ Decreasing + High MVRV: Distribution, potential top
- ↓ Decreasing + Low MVRV: Capitulation, accumulation opportunity
Zone Duration Analysis:
Use Time in Zone for context:
- Extended time in Top Zone: Late cycle, increased reversal risk
- Extended time in Bottom Zone: Accumulation opportunity
- Quick zone transitions: Higher volatility regime
Price Target Usage:
Use Price Targets for planning:
- Price @ Fair Value: Natural equilibrium level
- Price @ Top Threshold: Potential distribution target
- Price @ Bottom Threshold: Potential accumulation target
Technical Specifications
- Pine Script Version: v6
- Indicator Type: Non-overlay (displays in separate panel)
- Repainting Behavior: Minimal - calculations based on confirmed bar data
- Performance: Optimized with cached request.security() calls and ta.percentrank()
- Input Validation: Validates parameter combinations with warnings
- Compatibility: Works on all timeframes (data sources provide daily resolution)
- Edge Case Handling: Zero-division protection, NA value handling, boundary checks
Performance Optimizations:
- Cached request.security() calls for Market Cap, Realized Cap, and IntoTheBlock data
- Efficient ta.percentrank() replaces array-based percentile calculation
- Consolidated duplicate code (color functions, state tracking)
- Single-line ternary expressions for Pine Script compatibility
Constants:
- MAX_HISTORY_BARS = 5000 (TradingView's limit)
- PERCENTILE_EXTREME_HIGH = 90.0
- PERCENTILE_HIGH = 75.0
- PERCENTILE_MID = 50.0
- PERCENTILE_LOW = 25.0
- MIN_PERCENTILE_SAMPLES = 10
- DEFAULT_VOLATILITY_HIGH = 0.1
Known Limitations
- Data availability: Requires valid data subscription (IntoTheBlock, Glassnode, or CoinMetrics)
- Token support: Works with tokens supported by the selected data source
- Historical data: Percentile calculations require sufficient history (200+ bars recommended)
- Timeframe: Always uses daily resolution data from providers; works on all chart timeframes
- History limit: All lookback periods capped at 5000 bars
Changelog
Latest Version:
- Added Risk Score (0-100) composite indicator
- Added MVRV Momentum with trend direction
- Added Time in Zone tracking
- Added Price Target calculations
- Added Input Validation with warnings
- Added multiple smoothing options (SMA, EMA, WMA, RMA)
- Improved performance with cached security calls
- Replaced array-based percentile with ta.percentrank()
- Human-readable timestamps in event log (YYYY-MM-DD)
- Fixed hline() conditional value bug
- Consolidated duplicate code
- Updated indicator name for clarity
For detailed usage instructions, see the script comments.
Scalp Breakout Predictor Pro - by Herman Sangivera (Papua)Scalp Breakout Predictor Pro by Herman Sangivera ( Papuan Trader )
Overview
The Scalp Breakout Predictor Pro is a high-performance technical indicator designed for scalpers and day traders who thrive on market volatility. This tool specializes in identifying "Squeeze" phases—periods where the market is consolidating sideways—and predicts the likely direction of the upcoming breakout using underlying momentum accumulation.
How It Works
The indicator combines three core mathematical concepts to ensure "Safe but Fast" entries:
Squeeze Detection (BB vs. KC): It monitors the relationship between Bollinger Bands and Keltner Channels. When Bollinger Bands contract inside the Keltner Channels, the market is in a "Squeeze" (represented by the gray background). This indicates that energy is being coiled for a massive move.
Momentum Accumulation (Pre-Signal): While the price is still moving sideways, the script analyzes linear regression momentum.
PRE-BULL: Momentum is building upwards despite price being flat.
PRE-BEAR: Momentum is fading downwards despite price being flat.
Breakout Confirmation: An entry signal is only triggered when the Squeeze "fires" (the price breaks out of the bands), ensuring you don't get stuck in a dead market for too long.
Key Features
Real-time Prediction Labels: Get early warnings (PRE-BULL / PRE-BEAR) to prepare for the trade before it happens.
Dynamic TP/SL Lines: Automatically calculates Take Profit and Stop Loss levels based on the Average True Range (ATR), adapting to the current market's "breath."
On-Screen Dashboard: A sleek table in the top-right corner displays the current market phase (Squeeze vs. Volatile), the predicted next move, and the current ATR value.
Pine Script V6 Optimized: Built using the latest version of TradingView’s coding language for maximum speed and compatibility.
Trading Rules
Preparation: When you see a Gray Background, the market is sideways. Watch the Dashboard for the "Potential" direction.
Anticipation: If a PRE-BULL or PRE-BEAR label appears, get ready to enter.
Execution: Enter the trade when the ENTRY BUY (Lime Triangle) or ENTRY SELL (Red Triangle) signal appears.
Exit: Follow the Green Line for Take Profit and the Red Line for Stop Loss.
Technical Settings
HMA Length: Adjusts the sensitivity of the trend filter (Hull Moving Average).
TP/SL Multipliers: Allows you to customize your Risk:Reward ratio based on ATR volatility.
Squeeze Length: Determines the lookback period for consolidation detection.
Disclaimer: Scalping involves high risk. Always test this indicator on a demo account before using it with live capital.
Advanced Scalping Navigator free by S B PrasadAdvanced Scalping Navigator Lite • Features
by S B Prasad
Advanced Scalping Navigator Lite is a powerful multi-factor scalping and intraday indicator designed to generate high-probability BUY and SELL signals using trend, momentum, volatility, and smart-money concepts.
This FREE version retains the complete core signal engine while limiting certain premium visual and channel features.
🚀 Core Features (Included in Lite Version)
✅ High-Accuracy BUY & SELL Signals
Signals are generated only when multiple technical and structural conditions align, including:
ATR-based trend direction & strength
EMA trend bias
MACD momentum
RSI confirmation
VWAP institutional bias
Ribbon & Hull MA filters
Higher-timeframe (HTF) trend confirmation
Smart-money liquidity sweep validation
Supply & demand zone filtering
Session-based trading filter
✅ Smart-Money Liquidity Sweeps
Detects equal highs/lows and stop-hunt behavior to identify institutional accumulation or distribution before issuing signals.
✅ Supply & Demand Zones
Automatically plots demand and supply zones using pivot-based market structure to improve trade location quality.
✅ Higher-Timeframe (HTF) Confirmation
Filters trades in the direction of the dominant higher-timeframe trend for better probability alignment.
✅ Session Filter (Market Timing Control)
Limits signals to selected market sessions:
Indian Market
London Session
New York Session
✅ Multi-Factor Confirmation Engine
Combines EMA, MACD, RSI, VWAP, Ribbon, and HMA into a weighted factor score to avoid low-quality trades.
✅ Real-Time Dashboard Panel
On-chart dashboard displaying:
Trend direction
Trend strength
Factor alignment score
HTF bias
Zone context
Signal state
Session status
🔒 Features Limited or Disabled in Lite Version
The following premium visuals and channels are not available in the FREE version:
❌ ATR trendline (dynamic support / resistance)
❌ ATR trendline strength coloring
❌ Full ATR channel (upper / average / lower)
❌ Channel fills & premium visual layers
❌ Pivot ATR trend channel visuals
❌ Enhanced trend-zone background fills
🎯 Best For
Intraday traders
Scalpers
Index & stock traders
Futures and options traders
Traders who prefer clean charts with powerful signals
📣 Join Our Telegram (Updates & PRO Access)
👉 Telegram: t.me
💬 For updates, support & PRO version access, join our Telegram.
⚠️ Disclaimer
This indicator is for educational and informational purposes only.
It does not constitute financial advice.
Trading involves risk. Always use proper risk management.
Markov 4-Bar with Option suggestion Markov 4 Bar Probability Study — Smarter Pattern Forecasting
The Markov 4 Bar Probability Study gives traders a data driven edge by analyzing the most recent four candles and comparing them to hundreds of historical matches. Instead of guessing what comes next, the study shows how similar patterns behaved in the past—revealing the probability of an up move, down move, average return, and how often the next bar produced a strong push.
A customizable Strong Threshold (%) lets you define what counts as a “strong” move. Lower values capture subtle momentum shifts, while higher values isolate only the most meaningful expansions, and this same strength read is used to suggest a directional options spread (for example, favoring a bullish credit spread when the pattern shows a strong upside edge, or a bearish one when downside odds dominate).
This tool is fast, visual, and built for real time decision making. If you want a clean statistical read on what usually follows your current 4 bar pattern—plus a suggested options spread aligned with that edge—this study delivers it with clarity and precision.
Full Dashboard V20 - Pro PA & Stoch OVB/OVS StatusTable (Multi timefram)
- show Trend
- show rsi
- show Stoch
- show prev candle (default hide)
- show curr candle (default hide)
- shows the time when the candlestick will close.
--can config show/hide all column
Graph
- show rsi 89/21
Signal
- show signal with tp/sl (default hide)
Crypto Prev Day/Week Hi-Lo (UTC)escription
Crypto Prev + This Day/Week Hi-Lo (UTC) plots key high/low levels for crypto markets using a 24-hour session anchored to 00:00 UTC.
This indicator is designed for traders who treat crypto as a true 24/7 market and want consistent, global day/week levels that don’t shift with daylight savings.
What it plots
PDH / PDL = Previous Day High / Previous Day Low
PWH / PWL = Previous Week High / Previous Week Low
TWH / TWL = This Week High / This Week Low
00:00 UTC vertical line = marks the start of a new UTC day
Abbreviations
PDH = Previous Day High
PDL = Previous Day Low
PWH = Previous Week High
PWL = Previous Week Low
TWH = This Week High
TWL = This Week Low
UTC = Coordinated Universal Time (global standard time reference)
Last Candle + Previous Day + Pre-Market- RangeV2 of the Indicator (Test)
Last Candle + Previous Day + Pre-Market Script – Features
Last Candle Levels (Current Timeframe)
Draws horizontal lines at the high and low of the last confirmed candle.
Optional display of the candle range in percentage.
Lines automatically update and move correctly when zooming or changing the timeframe.
Previous Day High / Low
Shows the high and low of the previous trading day as dashed lines.
Lines are automatically updated and extend to the right, following the price scale.
Works on any timeframe chart.
Pre-Market High / Low
Highlights the pre-market session (default 04:00–09:30) with dotted lines.
Only calculated during intraday charts.
Lines behave exactly like the daily range lines: zoomable, shiftable, and extendable.
Optional toggle to enable or disable.
Customization Options
Colors for TF candle, daily range, and pre-market range lines.
Length of line extension to the right can be adjusted.
Toggle which levels to show: current TF, previous day, pre-market.
Stable & Safe in Pine Script v6
No repaint issues.
Works reliably on all intraday and daily charts.
Compatible with zooming and chart shifting.
If you want, I can also create a very short “user guide” with screenshots / labels in the chart, so it’s immediately clear what each toggle and line represents.
Do you want me to do that next?
Piv X ProPiv X Pro - Advanced Pivot Detection with Multi-Timeframe Confluence Analysis
Overview
Piv X Pro identifies pivot highs and lows using a confluence scoring system. It combines pivot detection, volume-weighted analysis, Williams %R divergence, and multi-timeframe confirmation to highlight higher-probability pivot zones.
What Makes This Script Original
This script combines several components into a single workflow:
Dynamic pivot strength calculation based on ATR
Confluence scoring (10+ factors) to rank pivot quality
Multi-timeframe VWAP analysis (bottom/top extremes plus period-based VWAPs)
Williams %R divergence detection with anchored VWAPs
Market structure shift (CHoCH) identification
Real-time and confirmation modes for different trading styles
How It Works
Pivot Detection:
Uses ATR-based dynamic pivot strength (adjusts to volatility)
Filters pivots by significance (distance from recent averages)
Optional volume confirmation
Real-time mode for immediate detection or confirmation mode for verified pivots
Confluence Scoring System:
Each pivot receives a score (0-100+) based on:
Volume spikes (15 points)
Higher timeframe trend alignment (20 points)
RSI oversold/overbought conditions (25 points)
Price exhaustion signals (10 points)
RSI divergence (15 points)
Swing failure patterns (15 points)
Liquidity sweeps (10 points)
Candle reversal confirmation (10 points)
Key level alignment (10 points)
Fair value gap fills (10 points)
Session weighting (10 points)
Multi-timeframe pivot confluence (15 points)
Major Pivot Thresholds:
Real-time mode: 60+ confluence score
Confirmation mode: 80+ confluence score
Golden zones: 90+ score (highlighted differently)
VWAP Analysis:
Bottom/Top VWAPs: Anchored to absolute extremes within a lookback period
Period VWAPs: Weekly, Monthly, Yearly, plus 4D, 9D, 4H, 8H
Previous period VWAPs: Shows last period's VWAP for reference
Williams Divergence VWAPs: Anchored VWAPs triggered by bullish/bearish divergences
Market Structure:
Identifies Market Structure Shifts (CHoCH) when pivot sequences break
Draws structure lines connecting major pivots
Visual zones around major pivot levels
How to Use
Setup:
Apply to any timeframe (optimized for 1min, 5min, 15min, 1H)
Adjust pivot detection sensitivity via "ATR Pivot Strength Multiplier"
Choose Real-Time Mode (immediate) or Confirmation Mode (verified pivots)
Reading the Signals:
Major Pivot Low (PL): Green zones with confluence score
Major Pivot High (PH): Purple zones with confluence score
Golden Zones: Yellow highlights (90+ score)
CHoCH: Blue dashed lines marking structure breaks
Williams Divergence: Triangles + anchored VWAP lines
Trading Applications:
Support/Resistance: Use major pivot zones as key levels
Entry Timing: Combine confluence scores with price action
Trend Following: Use CHoCH signals for trend changes
Divergence Trading: Williams %R divergences with anchored VWAPs
Multi-Timeframe: Use HTF trend filter and VWAPs for context
Important Notes:
This is a technical analysis tool, not a trading system
Confluence scores indicate probability, not guarantees
Past performance does not predict future results
Always use proper risk management
Combine with your own analysis and strategy
Key Features
Pivot Quality Filters:
ATR-based significance filtering
Volume confirmation (optional)
Multi-timeframe confluence
Session-based weighting (optional)
Visual Elements:
Pivot zones (extendable boxes)
Structure lines (connecting major pivots)
CHoCH markers (market structure shifts)
Multiple VWAP overlays
Williams divergence markers
Customization:
Adjustable pivot strength multiplier
Enable/disable individual confluence factors
Customizable colors and visual styles
Alert system for major pivots and structure shifts
Technical Details
Open Source:
This script is open source. The code is available for review and modification. Users can see exactly how calculations are performed.
Calculations:
Pivot detection uses ta.pivothigh() and ta.pivotlow() with dynamic strength
VWAP calculations use cumulative price×volume / cumulative volume
Confluence scoring is additive based on multiple technical factors
Williams %R divergence uses pivot comparison logic
Limitations:
Historical data access limits apply (Pine Script constraints)
Structure lines limited to 500 bars for performance
Real-time mode may show pivots that later invalidate
Confirmation mode adds lag but increases reliability
Disclaimer
This script is for educational and informational purposes. It does not provide financial advice. Trading involves risk. Always do your own research and use proper risk management. Past performance does not guarantee future results.
Smart Take ProfitThis script for EURUSD on the M3 timeframe detects Take Profit zones close to a reversal, automatically displays TP1, TP2, and Stop Loss, and follows the RSI + Bollinger Band + ATR logic.
It triggers an exit signal when the price touches a Bollinger Band, when the RSI is in an extreme zone, or when there is a rejection candle.
It automatically calculates the TP at 0.8 ATR, TP2 at 1.0 ATR, and the Stop Loss at 0.6 ATR.
It operates on the EURUSD M3 timeframe. You decide the entry point. This indicator is not a trading strategy.
Volume Conviction Index v1.0Volume Conviction Index V1 (VCI V1)
A robust, outlier-resistant volume oscillator designed to reveal real market participation and conviction behind price moves.
- Brief explainer -
v1.0 : Added a median line to show the movement and ultimate conviction of current price waves irrespective of current conviction. conviction can be extremely low (below zero line), yet price can be pumping, which shows the end of the current trend may be exhausting. divergence happens with this indicator is VERY FAST when tuned into it.
Core features:
• Median + MAD-based Z-score on volume (ignores extreme spikes/noise)
• Weighted blend: 60% robust deviation + 40% directional conviction (recent change % + relative volume %)
• Aggressive low-TF filter: optional rolling median line around zero to slice through 1min/3min chop
• Positive bars (teal) = unusual upward participation / conviction
• Negative bars (orange) = unusual weakness or drying volume
Use cases:
• Confirm breakouts, reversals, or exhaustion (e.g., spike on neckline breach)
• Filter false moves in low-liquidity or noisy periods
• Pair with Median Anchor Oscillator (MAO), Real Deviation Strength (RDS), and Anchor Pulse Wave (APW) for full conviction suite
V1 is raw and minimal — no signals, labels, or alerts yet. Feedback welcome for V2!
Companion suite:
• Median Anchor Oscillator
• Real Deviation Strength (RDS)
• Anchor Pulse Wave
© RU55IANROUL3TT3
Short Option Intrinsic + Option Price + Time ValueThis code print out and plot the intrinsic values, time values and the option price on the screen. This tells your how likely a short option will be exercised. User needs to select the option type (call, or put). Then input strike price and the current option price.
Gold Intelligence - Final Sniper v12 by Herman Sangivera(Papua)🚀 Gold Intelligence - Final Sniper v12 by Herman Sangivera ( Papua )
Overview
Gold Intelligence - Final Sniper v12 is a cutting-edge technical indicator specifically engineered for high-volatility instruments like XAU/USD (Gold). This indicator merges advanced Price Action candlestick recognition algorithms with institutional volume analysis and real-time market sentiment to deliver precision entry signals.
The primary goal of this tool is to filter out market "noise" and highlight only High Probability Setups that meet strict technical criteria.
🛡️ Key Features
Smart Pattern Recognition: Automatically identifies high-impact patterns: Pin Bars (psychological rejection) and Engulfing Candles (institutional dominance).
Probability Scoring: Every signal is assigned a percentage (%) score based on volume confirmation and price intensity. Signals only trigger when they exceed the minimum threshold (default 75%).
Real-Time Sentiment Dashboard: An exclusive on-chart panel that monitors the balance of Buy/Sell pressure instantly.
Dynamic Risk Management: Automatically projects Take Profit (TP) and Stop Loss (SL) boxes using Average True Range (ATR) calculations, ensuring your targets stay adaptive to current market volatility.
Institutional Volume Check: Validates entries by cross-referencing significant volume spikes (Smart Money footprints) to help you avoid market traps and fakeouts.
📖 How to Use (Trading Guide)
Identify the Signal: Wait for the "SNAPSHOT GOLD" label to appear on the chart.
🟢 Green Label: Buy Signal (Bullish).
🔴 Red Label: Sell Signal (Bearish).
Check Probability Score: It is highly recommended to only take signals with a score of >75%. A higher score indicates stronger technical confluence.
Execution & Targets:
Enter the trade at the close of the signal candle.
Target the Green transparent box for profit and use the Red box for risk management.
Dashboard Confirmation: Ensure the Sentiment percentage aligns with your trade direction (e.g., Sentiment > 60% Buy for Long positions).
⚙️ Input Parameters
Min Probability: The minimum accuracy threshold for a signal to be displayed.
TP & SL Multiplier: Customize your reward-to-risk ratio based on ATR multiples.
Alerts: Fully compatible with real-time notifications for Mobile, Email, or Webhooks.
⚠️ Disclaimer
This indicator is an analytical tool and does not guarantee profits. Gold trading involves significant risk. Always use proper money management and backtest on a demo account before trading live funds.
Full Dashboard V21 - Time Left Color LogicTable (Multi timefram)
- show Trend
- show rsi
- show Stoch
- show prev candle (default hide)
- show curr candle (default hide)
- shows the time when the candlestick will close.
--can config show/hide all column
Graph
- show rsi 89/21
Signal
- show signal with tp/sl (default hide)
Volume Divergence Detector - COT EnhancedVolume Divergence Detector – COT Enhanced
This advanced indicator analyzes institutional vs retail money flow to uncover hidden market intent, focusing on Gold and Gold Futures.
Instead of relying on simple volume spikes, the script separates smart money (institutions, commercial hedgers, large speculators) from retail traders using a blend of:
Volume-based accumulation/distribution
Price momentum
RSI behavior
MACD divergence
Institutional-sized volume detection
Optional real CFTC Commitment of Traders (COT) data
The result is a dynamic money-flow model designed to expose who is truly controlling the market.
🔹 Institutional Flow Engine
Large-volume activity is tracked and converted into a smoothed institutional money line. Heavy volume is weighted more aggressively to highlight professional accumulation and distribution. When volume fades, flow naturally decays to avoid stale signals.
If enabled, weekly CFTC COT data is blended into the calculation (70% internal model, 30% real positioning), providing genuine futures-market confirmation for Gold.
Positive values indicate institutional buying.
Negative values indicate institutional selling.
🔹 Retail Flow Engine
Retail behavior is modeled using:
RSI momentum (retail follows trends)
MACD breakout behavior
Smaller volume spikes
Retail flow reacts faster and decays quicker, reflecting emotional trading and late entries. Extreme retail positioning often signals potential reversals.
🔹 Core Signals
The indicator automatically detects:
Institutional Takeover
When institutional flow crosses above retail.
Retail Takeover
When retail flow crosses above institutions (often a warning sign).
Bullish Setup
Institutions buying + retail selling.
Bearish Setup
Institutions selling + retail buying.
Extreme Divergence
Institutional and retail flows at opposite extremes. These zones often precede major reversals or powerful trend continuations.
Clear BUY / SELL labels appear directly on the chart, positioned dynamically using ATR to avoid candle overlap.
🔹 Visual Feedback
Background shading shows which side currently dominates
Extreme divergence adds special highlighting
Real-time labels display institutional and retail values
A built-in information table summarizes:
Institutional flow
Retail flow
Dominant side
Flow spread
Current signal
COT status
Everything updates live on the last bar.
🔹 Alerts Included
Custom alerts are provided for:
Institutional control
Retail control
Bullish setups
Bearish setups
Extreme divergence
Perfect for automation or hands-off monitoring.
⚠️ Important Notes
COT data works only on Gold Futures symbols.
Spot Gold uses volume-based estimation only.
Designed for directional bias and timing, not blind entries. Always confirm with structure and price action.
Created by xqweasdzxcv
A professional-grade money flow system built to follow smart capital instead of emotional traders.
Table - Trend Multi TF + RSI + Stoch ByBankTHTable (Multi timefram)
- show Trend
- show rsi
- show Stoch
- show prev candle (default hide)
- show curr candle (default hide)
- shows the time when the candlestick will close.
---- can config show/hide all column
Graph
- show rsi 89/21
Signal
- show signal with tp/sl (default hide)
Risk & Lot Calculator PanelFXMANS Risk & Lot Panel
Smart Risk Management Tool for TradingView
- Overview
FXMANS Risk & Lot Panel is a lightweight and professional risk management tool designed to help traders calculate position size (lot) and take-profit levels directly on the chart, without cluttering the screen.
The panel is displayed as a minimal table in the top-right corner of the chart and automatically adapts to the currently opened symbol.
This tool focuses on clarity, precision, and usability, making it suitable for scalpers, day traders, and swing traders.
- Key Features
Automatic Direction Detection
The script can automatically determine BUY or SELL direction based on:
Entry Price
Stop Loss Price
Logic:
Stop Loss below Entry → BUY
Stop Loss above Entry → SELL
Manual override is available if auto direction is disabled.
Risk-Based Lot Size Calculation
Calculates position size based on:
User-defined risk amount in USD
Distance between Entry and Stop Loss
Symbol-specific tick size and point value
Ensures consistent risk management across all markets.
Automatic Take Profit (RR Based)
Take Profit is calculated automatically using a predefined Risk / Reward (RR) ratio.
Supports both BUY and SELL scenarios.
- Symbol-Aware Calculation
Uses TradingView’s built-in symbol properties:
syminfo.mintick
syminfo.pointvalue
Works correctly on:
Forex
Indices
Metals
Crypto
- Minimal & Non-Intrusive UI
Small, fixed panel located at the top-right corner
Designed to avoid covering price action
Clean FXMANS-style color palette
- Safe Panel Size Control
Panel size can be adjusted from settings:
Small
Medium
Large
Size changes are handled without modifying layout geometry, preventing UI bugs.
- How It Works
Enter your Entry Price and Stop Loss Price
Define your Risk Amount ($)
Set your desired Risk / Reward ratio
The script automatically calculates:
Trade Direction (BUY / SELL)
Lot Size
Take Profit Level
All results are displayed instantly in the panel
- Example Use Case
Risk: $100
Entry: 1.0850
Stop Loss: 1.0800
RR: 2.0
- The panel will automatically display:
Direction: BUY
Lot Size adjusted to risk exactly $100
Take Profit at 2R
- Important Notes
Entry and Stop Loss prices must be valid (greater than zero).
The tool does not place trades automatically.
Calculations are for position sizing only and may vary slightly depending on broker specifications.
- Disclaimer
This script is intended for educational and analytical purposes only.
Trading involves risk, and users are responsible for their own trading decisions.
- Ideal For
Traders who follow strict risk management rules
Forex, crypto, and index traders
Scalpers and intraday traders
Anyone who wants clean and fast position sizing on TradingView
Multi-Asset Position Planner v6Overview
A professional, fully interactive Long-Position planner built on Pine Script® v6. This tool allows traders to manage complex trade setups with four Take-Profit levels, automated Risk-Reward (RRR) calculation, and a live Liquidation Price visualizer .
Key Features
Visual Risk Management: An orange dashed line displays your liquidation price based on your chosen leverage, protecting your "Survival DNA".
Interactive Drag & Drop: Easily adjust all price levels and the time anchor directly on the chart.
Independent Asset Storage: Uses confirm=true to ensure that your BTC setup stays on BTC and your ETH setup stays on ETH, even in multi-chart layouts.
Automated Position Sizing: Input your account size (e.g., $100) and risk percentage to get the exact unit amount for your trade.
Optimized for v6: Prevents the common "500-bar future limit" crash by using time-based coordinates.
How to use
Simply click on the chart to set your anchor points. Adjust your Leverage and Account Balance in the settings menu to see your live position size in the top-right info box.
Adaptive AI SuperTrend [AlgoPoint]🚀 Adaptive AI SuperTrend
Adaptive AI SuperTrend is a high-performance trading terminal that redefines trend-following by integrating Machine Learning (ML) principles with advanced market regime detection. Unlike static indicators, this system dynamically recalibrates its internal parameters to match the ever-changing volatility of the financial markets.
Equipped with a custom "Wizard Engine," it filters out market noise during consolidation and identifies high-probability trend continuation points, making it an essential tool for scalpers, day traders, and swing traders alike.
🧠 What Makes it "AI"?
While traditional indicators use fixed rules, Adaptive AI SuperTrend utilizes Algorithmic Intelligence to make real-time decisions:
KNN-Inspired Adaptation: The engine analyzes the last 150 bars of volatility and trend strength to automatically adjust its sensitivity.
Market Regime Intelligence: It distinguishes between "Trending" and "Ranging" states using a sophisticated Squeeze Momentum module, preventing "whipsaws" during low-volume periods.
Self-Backtesting Logic: The indicator continuously calculates its own historical Win-Rate. If the probability of success falls below a certain threshold, it suppresses lower-quality signals.
🛠 Key Features
Dynamic Consolidation Boxes: Automatically identifies and wraps "choppy" price action in professional gray boxes. It waits for 3+ bars of consolidation before marking the zone, helping you spot breakout opportunities early.
Multi-Strategy Aggression:
- Conservative: Filtered signals for long-term trend following.
- Balanced: Optimized for daily volatility.
- Aggressive: High-frequency signals for capturing micro-trends.
Dual-Exit Risk Management:
- ATR TP-SL Mode: Sets mathematical targets based on market volatility with persistent on-screen lines.
- Smart Trailing Mode: Rides the trend to its exhaustion point. Includes intelligent labeling (🎯 TP or 🛑 SL) based on the trade's net profitability.
- RSI Pullback Confirmation: Beyond simple trend flips, it detects "buy the dip" or "sell the rip" opportunities within an existing trend using RSI 50-level crossovers.
📊 Real-Time Analytics Dashboard
The integrated AlgoPoint Dashboard provides a surgical view of the market:
- Market State: Instant "Trending" vs. "Ranging" (Consolidation) detection.
- Trend Strength: ADX-based momentum tracking.
- Strategy Status: Real-time feedback on your active aggression and exit modes.
🎨 Clean Charting & Customization
Built for professional clarity, you have total control over the UI:
Toggle Consolidation Boxes on/off.
Toggle ATR Target Lines and Exit Labels.
Customize background filters and dashboard visibility.
Iceberg strategy 2.0🇬🇧 Iceberg Strategy — Description (EN)
Iceberg Strategy is a multi-timeframe trend-following and liquidity-based trading indicator designed for crypto markets.
It combines H4 trend structure, MACD momentum, volume analysis, correlation filtering, and retest logic to identify high-probability entries aligned with institutional activity.
The indicator focuses on filtering out low-quality signals by using 24H USD volume, BTC correlation, and buyer/seller dominance (Volume Fight), while providing clear risk management visualization with automatic Stop Loss and Take Profit levels.
🔍 Core Logic
H4 MACD Trend Detection
Identifies bullish and bearish market regimes
Uses both standard and fast MACD to detect trend continuation and gray (transition) zones
Gray Zone Trend Re-entry
Detects pullbacks inside an active trend
Generates continuation entries when momentum resumes
Volume Fight (Liquidity Analysis)
Compares bullish vs bearish volume using VWMA
Detects accumulation and distribution zones
Optional background highlighting
24H USD Volume Filter
Ensures trading only high-liquidity assets
Filters out low-volume and manipulated markets
Correlation Filter
Filters signals when correlation with BTC (or selected symbol) is too high
Allows excluding specific symbols from correlation checks
H1 Retest Entries
Detects retests of key price levels after breakout
Confirms entries only after successful retest
📈 Signals & Visuals
BUY / SELL labels for main trend entries
Triangle signals for retest entries
Colored H4 candles
Green — bullish trend
Red — bearish trend
Gray — transition / pullback zone
Volume Fight background zones (optional)
Information table with:
H4 Trend direction
Fast MACD value
Correlation value
24H USD volume
🛡 Risk Management
Automatic Stop Loss
Based on ATR with configurable multiplier
Multiple Take Profit levels
RR-based targets (TP1–TP5)
SL and TP lines can be enabled or disabled from settings
⚙️ Fully Configurable
Enable / disable:
Correlation filter
Volume filter
Volume Fight background
Stop Loss / Take Profit lines
Adjustable parameters for:
ATR
Correlation
Volume thresholds
Retest logic
⚠️ This indicator does not repaint signals and is intended for educational and analytical purposes only. Always use proper risk management.
Iceberg strategy 2.0🇬🇧 Iceberg Strategy — Description (EN)
Iceberg Strategy is a multi-timeframe trend-following and liquidity-based trading indicator designed for crypto markets.
It combines H4 trend structure, MACD momentum, volume analysis, correlation filtering, and retest logic to identify high-probability entries aligned with institutional activity.
The indicator focuses on filtering out low-quality signals by using 24H USD volume, BTC correlation, and buyer/seller dominance (Volume Fight), while providing clear risk management visualization with automatic Stop Loss and Take Profit levels.
🔍 Core Logic
H4 MACD Trend Detection
Identifies bullish and bearish market regimes
Uses both standard and fast MACD to detect trend continuation and gray (transition) zones
Gray Zone Trend Re-entry
Detects pullbacks inside an active trend
Generates continuation entries when momentum resumes
Volume Fight (Liquidity Analysis)
Compares bullish vs bearish volume using VWMA
Detects accumulation and distribution zones
Optional background highlighting
24H USD Volume Filter
Ensures trading only high-liquidity assets
Filters out low-volume and manipulated markets
Correlation Filter
Filters signals when correlation with BTC (or selected symbol) is too high
Allows excluding specific symbols from correlation checks
H1 Retest Entries
Detects retests of key price levels after breakout
Confirms entries only after successful retest
📈 Signals & Visuals
BUY / SELL labels for main trend entries
Triangle signals for retest entries
Colored H4 candles
Green — bullish trend
Red — bearish trend
Gray — transition / pullback zone
Volume Fight background zones (optional)
Information table with:
H4 Trend direction
Fast MACD value
Correlation value
24H USD volume
🛡 Risk Management
Automatic Stop Loss
Based on ATR with configurable multiplier
Multiple Take Profit levels
RR-based targets (TP1–TP5)
SL and TP lines can be enabled or disabled from settings
⚙️ Fully Configurable
Enable / disable:
Correlation filter
Volume filter
Volume Fight background
Stop Loss / Take Profit lines
Adjustable parameters for:
ATR
Correlation
Volume thresholds
Retest logic
⚠️ This indicator does not repaint signals and is intended for educational and analytical purposes only. Always use proper risk management.






















