OPEN-SOURCE SCRIPT
Price Action & Volume Coherence Analyzer

**Price Action & Volume Coherence Analyzer - Advanced Market Analysis Tool**
This indicator analyzes the relationship between price action and volume, identifying when market movements are efficient or conflicting, helping traders understand the quality of price moves.
**What This Script Does:**
This indicator combines price action analysis with volume coherence detection through a proprietary correlation algorithm:
**1. Price Action Classification System:**
- Analyzes candle body strength (% of range occupied by body)
- Evaluates close position (upper, middle, or lower third of candle)
- Classifies each candle into 4 categories:
- Strong Bullish (large body + close near top + high volume)
- Weak Bullish (small body or close not at top)
- Strong Bearish (large body + close near bottom + high volume)
- Weak Bearish (small body or close not at bottom)
- Optional volume confirmation for enhanced accuracy
**2. Volume-Price Coherence Detection:**
- Compares current volume to historical average
- Compares price range to historical range average
- Calculates coherence ratio: Normalized Range / Normalized Volume
- Identifies market efficiency:
- High coherence (>1.5): Good price movement relative to volume
- Normal coherence (~1.0): Balanced volume-price relationship
- Low coherence (<0.7): Congestion or high volume with little price movement
**3. Visual System:**
- Color-coded candles for instant pattern recognition
- Background highlighting for extreme coherence conditions
- Status bar displaying numerical coherence value
- Alert system for abnormal conditions
**How It Works:**
1. **Candle Analysis**: Evaluates body strength and close position
2. **Volume Analysis**: Normalizes volume against 20-period average
3. **Range Analysis**: Normalizes price range against 20-period average
4. **Coherence Calculation**: Creates ratio revealing volume-price efficiency
5. **Visualization**: Colors candles and background based on conditions
6. **Alerts**: Notifies when coherence becomes extreme
**Key Calculations:**
- Body Ratio = (Candle Body / Candle Range) × 100
- Close Position = (Close - Low) / (High - Low)
- Volume Normalized = Current Volume / Volume Average
- Range Normalized = Current Range / Range Average
- Coherence = Range Normalized / Volume Normalized
**Parameters:**
- **Strong Body Threshold (%)**: Minimum body % to classify candle as strong (default: 60%)
- **Use Volume in Colors**: Enable volume confirmation for classification (default: ON)
- **Average Period**: Lookback period for calculating averages (default: 20)
- **Show Background Alerts**: Highlight extreme coherence on chart (default: ON)
- **Base Equilibrium Value**: Reference point for coherence (default: 1.0)
**Use Cases:**
1. **Traders**: Identify high-quality price moves with adequate volume support
2. **Swing Traders**: Detect reversals when coherence diverges from volume
3. **Scalpers**: Find efficient entry points with strong volume confirmation
4. **Analysts**: Understand market efficiency and trader intent
5. **Risk Managers**: Spot potential manipulation or institutional activity
**Color Coding:**
- **Green Candles**: Strong bullish (large body, close at top)
- **Light Green**: Weak bullish (small body or close not at top)
- **Red Candles**: Strong bearish (large body, close at bottom)
- **Light Red**: Weak bearish (small body or close not at bottom)
- **Gray**: Doji patterns (open = close)
- **Green Background**: Efficient movement (high coherence >1.5)
- **Red Background**: Congestion (low coherence <0.7)
**Originality Statement:**
This script's core algorithm—the volume-price coherence correlation system—is original work. While price action and volume analysis concepts are well-known, this specific implementation that simultaneously evaluates body strength, close position, volume normalization, and range normalization to produce a coherence ratio represents a unique analytical approach not available in standard indicators.
---
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。