OPEN-SOURCE SCRIPT
Mis à jour HTF Candles & Mini Charts by DGT

HTF Candles & Mini Charts is a multi-timeframe visualization tool designed to help traders monitor higher-timeframe market structure without leaving their current chart.
The indicator overlays higher-timeframe candles directly onto the active chart while also introducing compact mini HTF charts that display compressed higher-timeframe price action. This allows traders to observe broader market context while executing trades on lower timeframes.
By combining higher-timeframe overlays, mini charts, technical indicators, volume-weighted coloring, reference levels, oscillators, and statistical panels, the script provides a powerful environment for analyzing price structure across multiple timeframes simultaneously.
KEY FEATURES
⯌ HTF Chart Overlay (Main Price Chart)
⯌ Mini HTF Charts
⯌ Technical Indicators & Oscillators
⯌ Range Reference Levels
⯌ Volume-Weighted Candle Coloring
⯌ Statistics Panel
WHY USE HTF ANALYSIS
DISCLAIMER
The indicator overlays higher-timeframe candles directly onto the active chart while also introducing compact mini HTF charts that display compressed higher-timeframe price action. This allows traders to observe broader market context while executing trades on lower timeframes.
By combining higher-timeframe overlays, mini charts, technical indicators, volume-weighted coloring, reference levels, oscillators, and statistical panels, the script provides a powerful environment for analyzing price structure across multiple timeframes simultaneously.
KEY FEATURES
⯌ HTF Chart Overlay (Main Price Chart)
Displays higher-timeframe candles directly on the chart, allowing traders to see how lower-timeframe price action evolves within a higher-timeframe structure.
Features:
- Multiple chart styles: Candles, High–Low, Heikin Ashi
- Support for two independent HTF overlays
- Optional volume-weighted candle coloring based on relative trading activity
This allows traders to visualize higher-timeframe price development without switching charts.
⯌ Mini HTF Charts
Compact higher-timeframe charts displayed beside the main chart provide a quick snapshot of broader market structure and price development. Mini charts allow traders to quickly monitor trend direction and higher-timeframe context while focusing on lower-timeframe execution.
Features:
- Multiple chart styles: Candles, High–Low, Heikin Ashi
- Integrated technical indicators and oscillators
- Reference range levels
- Volume-weighted candle coloring
⯌ Technical Indicators & Oscillators
A selection of commonly used indicators can be displayed on the main chart and mini charts to help evaluate trend strength, volatility, and momentum.
Trend / Volatility indicators:Momentum oscillators:
- Moving Average
- Bollinger Bands
- Supertrend
- RSI
- Stochastic
These indicators help traders quickly evaluate trend conditions and momentum across timeframes.
⯌ Range Reference Levels
Statistical reference levels derived from the higher-timeframe range help traders quickly assess where price sits within the broader range structure.
Available levels:
- Range High / Low
- Range Quartiles (25%, 50%, 75%)
These levels provide a clear representation of range distribution.
⯌ Volume-Weighted Candle Coloring
Candles can optionally be colored based on relative volume participation, highlighting periods of strong or weak trading activity. This visual cue helps identify moments when market participation significantly increases or decreases.
⯌ Statistics Panel
An optional statistics panel provides quick insights into price performance across multiple time horizons
Included metrics:
- Performance Metrics
- Distance to Key Moving Averages
- Volume Participation
WHY USE HTF ANALYSIS
Markets move in fractal structures where lower-timeframe price action constantly reacts to higher-timeframe levels and trends.
Using higher-timeframe overlays helps traders:
- Understand broader trend direction
- Identify key range boundaries
- Avoid trading directly into higher-timeframe resistance or support
- Align lower-timeframe entries with higher-timeframe structure
DISCLAIMER
This script is intended for informational and educational purposes only. It does not constitute financial, investment, or trading advice. All trading decisions made based on its output are solely the responsibility of the user.
Notes de version
Inspired by TradingView's Watermark publication, added my logo :)Notes de version
a tweak Notes de version
added some performance statistics please note, values presented reflects the value from the beginning of the month, week, year etc, not for a month, a week etc long duration
Notes de version
updatemade htf candle color and transparency adjustable, thanks to new pine update
added optional fixed moving average display for both current time frame and selected higher time frame
Notes de version
typo correctionNotes de version
update * enchanced statistical panel with multi time frame price distance to its MA (convergance/divergence) statistical info
* new color function made style coloring disappeared, so added them into the script options
* time frame selection for htf candle and ma's are now separated
Notes de version
Added ability to display Heikin-Ashi CandlesThe Heikin-Ashi technique averages price data to construct the chart where the formula for calculating each bar is different than standard candlestick charts. Heikin-Ashi chart is smoother (market noise filtered out) and easier to spot trends and reversals
Basics of how to interpret Heikin-Ashi candles
• Green candles signify an uptrend and if no lower "shadows" then a strong uptrend
• Candles with a small body surrounded by upper and lower shadows indicate a trend change
• Red candles indicate a downtrend and if no higher shadows then a strong downtrend
Day traders who need to exploit quick price moves may find Heikin-Ashi charts are not responsive enough to be useful
Notes de version
quick update - added 15 Min TimeFrame option both for HTF Candle and Moving AverageNotes de version
typo fixNotes de version
update* added ability to plot second higher timeframe candle
* added ability to set alerts whenever new high/low detected on higher timeframe (both 1st and 2nd htf candle)
* added volume and volume average stats to info panel
Notes de version
updateadded higher time frame mini charts
special thnaks to berkusacoin
Notes de version
option added to enable/disable of current and higher time frame moving averages independentlyNotes de version
UpdateMini Charts
- are now available for all markets (due to Pine limitations it used to be only properly applicable on 7/24 open markets, thanks to Pine Team for the recent update that allow us to apply the concept on all markets)
- ability to specify number of bars (min 1, max 9)
- each bar includes OHLC info, Range and ATR Value (just hover over the each bar’s top). Additionally when high volatility is detected “⚡” sing will appear on top of the bar.
- Ability to display assistant lines either displaying the Range or including the range as Fibonacci levels
special thanks to berkusacoin for his valuable suggestion
Alerts
- Extended to include Moving Average crosses (Previously only HTF HIGH and LOW detection was available)
Notes de version
a quick update, thnaks to Arun_K_BhaskarNotes de version
updateadded 5-period simple moving average for mini charts, Prakarti31 thanks alot for the suggestion
added ability to change test size of labels of assistant lines
htf selection extended, now 3m, 5m and 10m are availabe
Notes de version
New indicator aditions - Volume Weighted Colored Bars
- Mini Overlay RSI Indicator, including higher timeframe mini charts. Thnaks to Prakarti31 valuable suggestion
- Forex Market Sessions
Notes de version
bug correction thanks to Prakarti31 valuable analysis - mini overlay RSI indicator display, updates correctly in real-time for htf candles as wellNotes de version
feature update - hard coded sma(close, 5) for htf mini charts replaced with fully customizable version. users may specify type of the moving average ("SMA", "EMA", "RMA", "WMA", "VWMA"), source and length according to their needs
assitance lines - reverse fib levels are added as another option
Notes de version
update* refactored mini charts code, enhanced and extended htf mini charts
* new : candlestick pattern detection, please check here for chart version with trend options
* improved statistical panel
* extended alerts
* removed Forex Market Sessions display
Notes de version
MAJOR UPDATE — FULL ENGINE RE-ARCHITECTUREThis release introduces a complete internal redesign of the HTF Candles & Mini Charts engine, rebuilt using Pine Script® v6 architecture and modern object-based rendering.
The update focuses on improving performance, flexibility, and visual consistency while preserving the original concept of multi-timeframe visualization directly on the chart.
Key Improvements
- Fully re-engineered HTF data collection and processing pipeline
- Redesigned Mini HTF Chart engine with improved rendering performance
- Dynamic timeframe resolution handling for consistent multi-timeframe behavior
- Expanded technical overlay framework (Supertrend, Bollinger Bands, Moving Averages)
- Integrated oscillator modules (RSI and Stochastic) for both mini charts and the main chart
- Enhanced volume-weighted candle logic for improved activity detection
- Improved statistical performance panel with refined layout and calculations
- More efficient lookback management and object lifecycle handling
Community Thanks
Special thanks to the community members who provided constructive feedback over time. Several refinements and structural improvements in this evolution were inspired directly by thoughtful user input.
Your engagement helped shape this upgrade.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
SoleMare Analytics | MarketMastery™ Tools | Exclusively on TradingView
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
SoleMare Analytics | MarketMastery™ Tools | Exclusively on TradingView
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.