OPEN-SOURCE SCRIPT

SYXX - HTF Candle Overlay

108
Snapshot

This script, titled "HTF Candle Overlay by SYXX," is designed to visualize the full range and structure of a higher-timeframe (HTF) candle directly onto a lower-timeframe chart. It helps traders maintain context by showing where the current price action sits relative to a much larger candle's boundaries. Combined with LuxAlgo Volume Node Profile.

1. 🔍 Primary Feature: Higher Timeframe Candle Projection
Configurable Timeframe: The user sets the desired HTF using the Interval input, which defaults to 'D' (Daily). The indicator then tracks the High, Low, Open, and Close of that HTF bar.

Live and Historical Drawing: The script uses box.new to draw boxes representing the candle's full range (High to Low).

Historical Boxes (if changeHTF): When a new HTF candle closes, the completed box for the previous period is drawn.

Live Box (if barstate.islast): The indicator draws a live, dynamic box for the current, incomplete HTF candle, which expands with every new High or Low on the lower chart.

2. 🎨 Visualization & Customization
Color-Coded Bias: The boxes are colored based on the HTF candle's direction:

Bullish/Long (BgLong): Green color is used if the HTF candle closed higher than it opened (close > htfOpen).

Bearish/Short (BgShort): Red color is used if the HTF candle closed lower than it opened.

Box Styling: Users can customize the box's appearance, including border color and style, border thickness, and background opacity (BoxOpacity).

Midline: An optional MidLine is calculated as the average of the HTF High and Low, acting as a potential support/resistance reference point.

Range Display: The indicator can display the range of the box in pips (BoxRangePips) or the percentage of movement relative to the full range (BoxRangePercentage).

Time Labels: It plots time labels that show the start and end time of the completed HTF period (e.g., "07:00 - 11:00").

3. 🚨 Alert System (Placeholders)
The script includes placeholder inputs for standard trading alerts, though the internal logic for checking these conditions is currently commented out or set to false:

Alert: Break Above/Below Box: To signal a breakout of the HTF High or Low.

Alert: Price Re-Enters Box: To signal a pullback back into the range.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.