OPEN-SOURCE SCRIPT
[AlscapeLabs] HTF Candle Stack (Multi-Timeframe)

Overview
The HTF Candle Stack (Multi-TF) indicator is a powerful visualization tool designed to overlay high-timeframe (HTF) price action directly onto your current chart, independent of the chart's price scale. This gives traders a clear, aligned, and non-overlapping view of simultaneous price movements across customizable timeframes.
By stacking the candles horizontally next to the chart's price action, the indicator allows for quick identification of multi-timeframe correlation, trend confluence, and key levels without switching chart timeframes.
Key Features
- 6 Independent Stacks: Configure up to 6 separate timeframes (e.g., 5m, 15m, 1H, 4H, Daily, Weekly) to view the complete market fractals from micro to macro.
- Price-Aligned Visualization: All HTF candle stacks are perfectly aligned with the main chart's vertical price axis
- Replay Mode Safe: Includes dedicated logic to prevent "duplicate candles" during Bar Replay, ensuring accurate backtesting and historical analysis.
- Toggleable Stacks: Each stack can be individually enabled or disabled via input settings
- Dynamic Spacing: The distance between active stacks is automatically calculated and adjusted based on the visibility of the preceding stack.
Settings Guide
Stack Configuration (1 - 6)
Each of the six stacks has identical controls:
- Show/Hide: Enable or disable this specific stack.
- Timeframe: The specific HTF to display (e.g., "60" for 1 Hour, "D" for Daily).
[*}Count: How many candles to show in this stack (Current Active Candle + Past Closed Candles). Tip: Use higher counts (10-12) for lower TFs (Stack 1-2) and lower counts (2-4) for higher TFs (Stack 5-6)
Candle Color
Controls global coloring
- Bullish / Bearish: Customize the body colors.
- Wick: Separate control for wick color and transparency
Layout
- Distance from Chart: How far (in bars) to the right the first stack begins
- Space between Stacks: The gap (in bars) between each active stack.
- Candle Width: The thickness of the HTF candles.
Labels
Displays a time-frame next to the active (live) candle in each stack
- Show TF Labels: Enable or disable labels through all stacks
- Text Color: Label text color
- Background: Label background color
- Style: Label position (Left, Down)
- Size: Label text size (Tiny, Small, Normal, Large, Huge)
Developed by AlscapeLabs
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。