OPEN-SOURCE SCRIPT
ICT HTF Volume Candles (Based on HTF Candles by Fadi)

# ICT HTF Volume Candles - Multi-Timeframe Volume Analysis
## Overview
This indicator provides multi-timeframe volume visualization designed to complement price action analysis. It displays volume data from up to 6 higher timeframes simultaneously in a separate panel, allowing traders to identify volume spikes, divergences, and institutional activity without switching between timeframes.
**Original Concept Credits:** This indicator builds upon the HTF Candles framework by Fadi, adapting it specifically for volume analysis with enhanced features including gap-filling for extended hours, multiple scaling methods, and advanced synchronization.
## What Makes This Script Original
### Key Innovations:
1. **Three Volume Scaling Methods:**
- **Per-HTF Auto Scale:** Each timeframe scales independently for detailed comparison
- **Global Auto Scale:** All timeframes use unified scale for relative volume comparison
- **Manual Scale:** User-defined maximum for consistent analysis across sessions
2. **Bullish/Bearish Volume Differentiation:**
- Volume bars colored based on price movement (close vs open)
- Separate styling for bullish (green) and bearish (red) volume periods
- Helps identify whether volume supports price direction
3. **Advanced Time Synchronization:**
- Custom daily candle open times (Midnight, 8:30 AM, 9:30 AM ET)
- Timezone-aware calculations for New York trading hours
- Real-time countdown timers for each timeframe
- **Gap-filling technology** for continuous display during extended hours and weekends
4. **Flexible Display Options:**
- Configurable spacing and positioning
- Label placement (top, bottom, or both)
- Day-of-week or time interval labels on candles
- Works reliably in backtesting and live trading
## How It Works
### Volume Calculation
The indicator uses `request.security()` with optimized parameters to fetch volume data from higher timeframes:
- **Volume Open/High/Low/Close (OHLC):** Tracks volume changes within each HTF candle
- **Color Logic:** Compares HTF close vs open prices to determine bullish/bearish classification
- **Alignment:** All volume bars share a common baseline for easy visual comparison
- **Gap Handling:** Uses `gaps=barmerge.gaps_off` to maintain continuity during non-trading hours
### Technical Implementation
```
1. Monitors HTF timeframe changes using request.security() with lookahead
2. Creates new VolumeCandle object when HTF bar opens
3. Updates current candle's volume H/L/C on each chart bar
4. Applies selected scaling method to normalize display height
5. Repositions all candles and labels on each bar update
6. Fills gaps automatically during extended hours for consistent display
```
### Scaling Methods Explained
**Method 1 - Auto Scale per HTF:**
Each timeframe displays volume relative to its own maximum. Best for identifying patterns within each individual timeframe.
**Method 2 - Global Auto Scale:**
All timeframes share the same scale based on the highest volume across all HTFs. Best for comparing relative volume strength between timeframes.
**Method 3 - Manual Scale:**
User sets maximum volume value. Best for maintaining consistent scale across different trading sessions or instruments.
## How to Use This Indicator
### Setup
1. Add indicator to your chart (it appears in a separate panel below price)
2. Configure up to 6 higher timeframes (default: 5m, 15m, 1H, 4H, 1D, 1W)
3. Set number of candles to display for each timeframe
4. Choose volume scaling method based on your analysis needs
5. Enable "Fix gaps in non-trading hours" for extended hours trading (enabled by default)
### Interpretation
**Volume Spikes:**
- Sudden increase in volume height indicates institutional activity or strong conviction
- Compare volume between timeframes to identify where the real money is moving
- Look for volume spikes that appear across multiple timeframes simultaneously
**Bullish vs Bearish Volume:**
- **Green volume bars:** Price closed higher (buying pressure)
- **Red volume bars:** Price closed lower (selling pressure)
- High green volume during uptrend = confirmation of strength
- High red volume during downtrend = confirmation of weakness
- High volume opposite to trend = potential reversal warning
**Multi-Timeframe Context:**
- **5m/15m:** Scalping and day trading activity
- **1H/4H:** Swing trading and intraday institutional flows
- **Daily/Weekly:** Major position building and long-term trends
**Divergences:**
- Price making new highs but volume declining = weakening trend
- Volume increasing while price consolidates = potential breakout brewing
- Price breaks level but volume doesn't confirm = likely false breakout
### Practical Examples
**Example 1 - Institutional Confirmation:**
Price breaks above resistance. Check volume across timeframes:
- 5m shows spike = retail interest
- 15m + 1H + 4H all show spikes = institutional confirmation
- **Trade confidence: HIGH**
**Example 2 - False Breakout Detection:**
Price breaks resistance with:
- High volume on 5m only
- Normal/low volume on 1H and 4H
- **Interpretation:** Likely retail trap, institutions not participating
- **Action:** Wait for pullback or avoid
**Example 3 - Accumulation Phase:**
Price ranges sideways but:
- Daily volume gradually increasing
- Weekly volume above average
- **Interpretation:** Smart money accumulating
- **Action:** Prepare for breakout in direction of volume
**Example 4 - Volume Divergence:**
Price makes new high:
- Current high has lower volume than previous high across all timeframes
- **Interpretation:** Weakening momentum
- **Action:** Consider profit-taking or reversal trade
## Configuration Parameters
### Timeframe Settings
- **HTF 1-6:** Select timeframes (must be higher than chart timeframe)
- **Max Display:** Number of candles to show per timeframe (1-50)
- **Limit to Next HTFs:** Display only first N enabled timeframes (1-6)
### Styling
- **Bull/Bear Colors:** Separate colors for body, border, and wick
- **Padding from current candles:** Distance offset from live price action
- **Space between candles:** Gap between individual volume bars
- **Space between Higher Timeframes:** Gap between different timeframe groups
- **Candle Width:** Thickness of volume bars (1-4, multiplied by 2)
### Volume Settings
- **Volume Scale Method:** Choose 1, 2, or 3
- 1 = Auto Scale per HTF (each TF independent)
- 2 = Global Auto Scale (all TF unified)
- 3 = Manual Scale (user-defined max)
- **Auto Scale Volume:** Enable/disable automatic scaling
- **Manual Scale Max Volume:** Set maximum when using Method 3
### Label Settings
- **HTF Label:** Show/hide timeframe names with color and size options
- **Label Positions:** Display at Top, Bottom, or Both
- **Label Alignment:** Align centered or Follow Candles
- **Remaining Time:** Show countdown timer until next HTF candle
- **Interval Value:** Display day-of-week or time on each candle
### Custom Daily Candle
- **Enable Custom Daily:** Override default daily candle timing
- **Open Time Options:**
- **Midnight:** Standard 00:00 ET daily open
- **8:30 AM:** Align with economic data releases
- **9:30 AM:** Align with NYSE market open
- Useful for specific trading strategies or market alignment
### Advanced Settings
- **Fix gaps in non-trading hours:** Maintains alignment during extended hours and weekends (recommended: ON)
- Prevents visual gaps during forex weekend closures
- Ensures consistent display during crypto 24/7 trading
- Improves backtesting reliability
## Best Practices
1. **Pair with Price Action:** Use alongside HTF price candles indicator for complete picture
2. **Start Simple:** Enable 2-3 timeframes initially (e.g., 15m, 1H, 4H), add more as needed
3. **Match Settings:** Use same candle width/spacing as companion price indicator for visual alignment
4. **Scale Appropriately:**
- Use **Global scale** (Method 2) when comparing timeframes
- Use **Per-HTF scale** (Method 1) for pattern analysis within each timeframe
- Use **Manual scale** (Method 3) for consistent day-to-day comparison
5. **Watch for Volume Clusters:** High volume appearing simultaneously across multiple HTFs signals significant market events
6. **Confirm Breakouts:** Always check if volume supports the price movement across higher timeframes
7. **Extended Hours:** Keep "Fix gaps" enabled for 24/7 markets (Forex, Crypto) and weekend analysis
## Technical Notes
- **Timezone:** All calculations use America/New_York timezone for consistency
- **Real-time Updates:** Volume and timers update on each tick during market hours
- **Performance:** Optimized with max_bars_back=5000 for extensive historical analysis
- **Compatibility:** Works on all instruments with volume data (Stocks, Forex, Crypto, Futures)
- **Gap Handling:** Uses `barmerge.gaps_off` to fill data gaps during non-trading periods
- **Backtesting:** Uses `lookahead=barmerge.lookahead_on` for stable historical data without repainting
- **Data Continuity:** Automatically handles market closures, weekends, and extended hours
## Updates & Improvements
**Version 2.0 (Current):**
- ✅ Fixed alignment issues during extended hours and weekends
- ✅ Eliminated repainting in backtesting
- ✅ Added gap-filling technology for continuous display
- ✅ Improved data synchronization across all timeframes
- ✅ Enhanced NA value handling for data integrity
- ✅ Added advanced settings group for user control
## Support
For questions, suggestions, or feedback, please comment on the publication or message the author.
---
**Disclaimer:** This indicator is for educational and informational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always perform your own analysis and implement proper risk management before making trading decisions.
https://www.tradingview.com/x/rHiRdWGP/


## Overview
This indicator provides multi-timeframe volume visualization designed to complement price action analysis. It displays volume data from up to 6 higher timeframes simultaneously in a separate panel, allowing traders to identify volume spikes, divergences, and institutional activity without switching between timeframes.
**Original Concept Credits:** This indicator builds upon the HTF Candles framework by Fadi, adapting it specifically for volume analysis with enhanced features including gap-filling for extended hours, multiple scaling methods, and advanced synchronization.
## What Makes This Script Original
### Key Innovations:
1. **Three Volume Scaling Methods:**
- **Per-HTF Auto Scale:** Each timeframe scales independently for detailed comparison
- **Global Auto Scale:** All timeframes use unified scale for relative volume comparison
- **Manual Scale:** User-defined maximum for consistent analysis across sessions
2. **Bullish/Bearish Volume Differentiation:**
- Volume bars colored based on price movement (close vs open)
- Separate styling for bullish (green) and bearish (red) volume periods
- Helps identify whether volume supports price direction
3. **Advanced Time Synchronization:**
- Custom daily candle open times (Midnight, 8:30 AM, 9:30 AM ET)
- Timezone-aware calculations for New York trading hours
- Real-time countdown timers for each timeframe
- **Gap-filling technology** for continuous display during extended hours and weekends
4. **Flexible Display Options:**
- Configurable spacing and positioning
- Label placement (top, bottom, or both)
- Day-of-week or time interval labels on candles
- Works reliably in backtesting and live trading
## How It Works
### Volume Calculation
The indicator uses `request.security()` with optimized parameters to fetch volume data from higher timeframes:
- **Volume Open/High/Low/Close (OHLC):** Tracks volume changes within each HTF candle
- **Color Logic:** Compares HTF close vs open prices to determine bullish/bearish classification
- **Alignment:** All volume bars share a common baseline for easy visual comparison
- **Gap Handling:** Uses `gaps=barmerge.gaps_off` to maintain continuity during non-trading hours
### Technical Implementation
```
1. Monitors HTF timeframe changes using request.security() with lookahead
2. Creates new VolumeCandle object when HTF bar opens
3. Updates current candle's volume H/L/C on each chart bar
4. Applies selected scaling method to normalize display height
5. Repositions all candles and labels on each bar update
6. Fills gaps automatically during extended hours for consistent display
```
### Scaling Methods Explained
**Method 1 - Auto Scale per HTF:**
Each timeframe displays volume relative to its own maximum. Best for identifying patterns within each individual timeframe.
**Method 2 - Global Auto Scale:**
All timeframes share the same scale based on the highest volume across all HTFs. Best for comparing relative volume strength between timeframes.
**Method 3 - Manual Scale:**
User sets maximum volume value. Best for maintaining consistent scale across different trading sessions or instruments.
## How to Use This Indicator
### Setup
1. Add indicator to your chart (it appears in a separate panel below price)
2. Configure up to 6 higher timeframes (default: 5m, 15m, 1H, 4H, 1D, 1W)
3. Set number of candles to display for each timeframe
4. Choose volume scaling method based on your analysis needs
5. Enable "Fix gaps in non-trading hours" for extended hours trading (enabled by default)
### Interpretation
**Volume Spikes:**
- Sudden increase in volume height indicates institutional activity or strong conviction
- Compare volume between timeframes to identify where the real money is moving
- Look for volume spikes that appear across multiple timeframes simultaneously
**Bullish vs Bearish Volume:**
- **Green volume bars:** Price closed higher (buying pressure)
- **Red volume bars:** Price closed lower (selling pressure)
- High green volume during uptrend = confirmation of strength
- High red volume during downtrend = confirmation of weakness
- High volume opposite to trend = potential reversal warning
**Multi-Timeframe Context:**
- **5m/15m:** Scalping and day trading activity
- **1H/4H:** Swing trading and intraday institutional flows
- **Daily/Weekly:** Major position building and long-term trends
**Divergences:**
- Price making new highs but volume declining = weakening trend
- Volume increasing while price consolidates = potential breakout brewing
- Price breaks level but volume doesn't confirm = likely false breakout
### Practical Examples
**Example 1 - Institutional Confirmation:**
Price breaks above resistance. Check volume across timeframes:
- 5m shows spike = retail interest
- 15m + 1H + 4H all show spikes = institutional confirmation
- **Trade confidence: HIGH**
**Example 2 - False Breakout Detection:**
Price breaks resistance with:
- High volume on 5m only
- Normal/low volume on 1H and 4H
- **Interpretation:** Likely retail trap, institutions not participating
- **Action:** Wait for pullback or avoid
**Example 3 - Accumulation Phase:**
Price ranges sideways but:
- Daily volume gradually increasing
- Weekly volume above average
- **Interpretation:** Smart money accumulating
- **Action:** Prepare for breakout in direction of volume
**Example 4 - Volume Divergence:**
Price makes new high:
- Current high has lower volume than previous high across all timeframes
- **Interpretation:** Weakening momentum
- **Action:** Consider profit-taking or reversal trade
## Configuration Parameters
### Timeframe Settings
- **HTF 1-6:** Select timeframes (must be higher than chart timeframe)
- **Max Display:** Number of candles to show per timeframe (1-50)
- **Limit to Next HTFs:** Display only first N enabled timeframes (1-6)
### Styling
- **Bull/Bear Colors:** Separate colors for body, border, and wick
- **Padding from current candles:** Distance offset from live price action
- **Space between candles:** Gap between individual volume bars
- **Space between Higher Timeframes:** Gap between different timeframe groups
- **Candle Width:** Thickness of volume bars (1-4, multiplied by 2)
### Volume Settings
- **Volume Scale Method:** Choose 1, 2, or 3
- 1 = Auto Scale per HTF (each TF independent)
- 2 = Global Auto Scale (all TF unified)
- 3 = Manual Scale (user-defined max)
- **Auto Scale Volume:** Enable/disable automatic scaling
- **Manual Scale Max Volume:** Set maximum when using Method 3
### Label Settings
- **HTF Label:** Show/hide timeframe names with color and size options
- **Label Positions:** Display at Top, Bottom, or Both
- **Label Alignment:** Align centered or Follow Candles
- **Remaining Time:** Show countdown timer until next HTF candle
- **Interval Value:** Display day-of-week or time on each candle
### Custom Daily Candle
- **Enable Custom Daily:** Override default daily candle timing
- **Open Time Options:**
- **Midnight:** Standard 00:00 ET daily open
- **8:30 AM:** Align with economic data releases
- **9:30 AM:** Align with NYSE market open
- Useful for specific trading strategies or market alignment
### Advanced Settings
- **Fix gaps in non-trading hours:** Maintains alignment during extended hours and weekends (recommended: ON)
- Prevents visual gaps during forex weekend closures
- Ensures consistent display during crypto 24/7 trading
- Improves backtesting reliability
## Best Practices
1. **Pair with Price Action:** Use alongside HTF price candles indicator for complete picture
2. **Start Simple:** Enable 2-3 timeframes initially (e.g., 15m, 1H, 4H), add more as needed
3. **Match Settings:** Use same candle width/spacing as companion price indicator for visual alignment
4. **Scale Appropriately:**
- Use **Global scale** (Method 2) when comparing timeframes
- Use **Per-HTF scale** (Method 1) for pattern analysis within each timeframe
- Use **Manual scale** (Method 3) for consistent day-to-day comparison
5. **Watch for Volume Clusters:** High volume appearing simultaneously across multiple HTFs signals significant market events
6. **Confirm Breakouts:** Always check if volume supports the price movement across higher timeframes
7. **Extended Hours:** Keep "Fix gaps" enabled for 24/7 markets (Forex, Crypto) and weekend analysis
## Technical Notes
- **Timezone:** All calculations use America/New_York timezone for consistency
- **Real-time Updates:** Volume and timers update on each tick during market hours
- **Performance:** Optimized with max_bars_back=5000 for extensive historical analysis
- **Compatibility:** Works on all instruments with volume data (Stocks, Forex, Crypto, Futures)
- **Gap Handling:** Uses `barmerge.gaps_off` to fill data gaps during non-trading periods
- **Backtesting:** Uses `lookahead=barmerge.lookahead_on` for stable historical data without repainting
- **Data Continuity:** Automatically handles market closures, weekends, and extended hours
## Updates & Improvements
**Version 2.0 (Current):**
- ✅ Fixed alignment issues during extended hours and weekends
- ✅ Eliminated repainting in backtesting
- ✅ Added gap-filling technology for continuous display
- ✅ Improved data synchronization across all timeframes
- ✅ Enhanced NA value handling for data integrity
- ✅ Added advanced settings group for user control
## Support
For questions, suggestions, or feedback, please comment on the publication or message the author.
---
**Disclaimer:** This indicator is for educational and informational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always perform your own analysis and implement proper risk management before making trading decisions.
https://www.tradingview.com/x/rHiRdWGP/
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.