PROTECTED SOURCE SCRIPT
Atualizado HTF Big Candle Projections

What it does
This indicator overlays higher-timeframe (HTF) “big candles” at the right edge of any chart and keeps them perfectly parallel with price while you zoom or pan. In End-of-Chart (EOC) mode, all objects are anchored by bar index (not time) and clamped to TradingView’s ≤500 bars into the future rule, so they move 1:1 with the chart—no drift, no lag. A fallback mode preserves time-anchored labels if you prefer them.
Why it’s different / useful
Most MTF overlays drift when you scale or pan because they anchor by time or mix coordinate systems. This script anchors every end-of-chart object (bodies, wicks, OHLC guide lines, labels, range readout) in bar-index space, so the overlay scales identically to real bars. It also includes a safe-clamp to the 500-bar forward limit, automatic TF mapping for D/W/M charts, and optional projections from the previous HTF candle.
How it works (technical overview)
HTF data: The indicator fetches HTF OHLC using request.security() (no lookahead) and updates the current HTF candle live on each chart bar.
EOC placement (ON): Big candles are rendered with index-anchored boxes + wicks (box.new + line.new). X-positions are computed from bar_index + offset, then clamped to stay within the forward limit.
Fallback placement (OFF): Label coordinates switch to time-anchored for familiarity; candle bodies remain parallel via index logic.
OHLC helpers: Optional high/low/close guide lines extend right from the active HTF candle; OHLC labels and a range label can be placed to the side; a remaining-time widget shows how long until the HTF bar closes.
No lookahead / repaint caveat: The current HTF candle naturally evolves until it closes; that’s expected behavior for real-time HTF overlays.
Inputs & features
Place at end of chart (EOC mode toggle): index-anchored layout with ≤500-bar clamp.
Right Candle Timeframe: auto-map for D/W/M (D→W, W→M, M→3M) or set manually.
Offsets & width: right-edge offset (bars), left-candle offset, body width (bars), minimum gap between candles.
Wicks: show/hide (fallback mode draws wicks; index mode draws them via lines).
OHLC guide lines: toggle H/L/C, choose style/width/color, with right-side projection distance.
OHLC labels: side selection, text size, background/text colors, side offset.
Range label: toggle, side offset, size; option to show pip units (1/mintick).
Prev candle projections: optional HTF high/low lines from the left candle.
Remaining-time panel: live countdown to the HTF bar close.
Colors: bullish/bearish bodies and wicks.
How to use
Add to any chart (works best on intraday charts when viewing D/W/M candles).
Keep “Place at end of chart” ON for perfect parallel tracking while zooming/panning.
Choose Right Candle Timeframe (or use auto for D/W/M).
Adjust Body Width and Label/Line Offsets to taste. If you push offsets too far, the script auto-clamps objects to respect the 500-bar forward limit.
Optionally enable Prev Candle HL projections, OHLC labels, and the Range readout.
Publish with a clean chart so the overlay is easy to understand at a glance.
Notes & limitations
Forward plotting limit: TradingView only allows drawing ≤500 bars into the future. The script clamps all end-of-chart objects automatically; if you request more, it will shorten projections to remain compliant.
Sessions & symbols: Exotic sessions or illiquid symbols may produce uneven HTF boundaries. If needed, set the Right Candle Timeframe manually.
No signals, no promises: This is a visualization tool—it does not generate trade signals or promise performance. Use it alongside your own analysis and risk management.
Settings quick reference
EOC mode: ON (index-anchored) / OFF (time-anchored labels).
Right Candle TF: Auto D→W→M→3M or manual TF.
Offsets: Right edge, left candle, label/range/line projections.
Body Width: Candle thickness in bars.
Lines/Labels: OHLC guides, OHLC labels, Range label.
Prev HL: Previous HTF high/low projections.
Timer: Remaining time in the current HTF bar.
Colors: Bull/Bear bodies, wicks.
Disclaimer
For educational purposes only. Not financial advice. Past performance does not guarantee future results. Always test on your own and trade responsibly.
Author’s note on originality
This script focuses on bar-index anchored EOC rendering with comprehensive forward-clamping and dual label modes, aiming to solve the common drift/desync issues seen in MTF overlays during chart scaling.
This indicator overlays higher-timeframe (HTF) “big candles” at the right edge of any chart and keeps them perfectly parallel with price while you zoom or pan. In End-of-Chart (EOC) mode, all objects are anchored by bar index (not time) and clamped to TradingView’s ≤500 bars into the future rule, so they move 1:1 with the chart—no drift, no lag. A fallback mode preserves time-anchored labels if you prefer them.
Why it’s different / useful
Most MTF overlays drift when you scale or pan because they anchor by time or mix coordinate systems. This script anchors every end-of-chart object (bodies, wicks, OHLC guide lines, labels, range readout) in bar-index space, so the overlay scales identically to real bars. It also includes a safe-clamp to the 500-bar forward limit, automatic TF mapping for D/W/M charts, and optional projections from the previous HTF candle.
How it works (technical overview)
HTF data: The indicator fetches HTF OHLC using request.security() (no lookahead) and updates the current HTF candle live on each chart bar.
EOC placement (ON): Big candles are rendered with index-anchored boxes + wicks (box.new + line.new). X-positions are computed from bar_index + offset, then clamped to stay within the forward limit.
Fallback placement (OFF): Label coordinates switch to time-anchored for familiarity; candle bodies remain parallel via index logic.
OHLC helpers: Optional high/low/close guide lines extend right from the active HTF candle; OHLC labels and a range label can be placed to the side; a remaining-time widget shows how long until the HTF bar closes.
No lookahead / repaint caveat: The current HTF candle naturally evolves until it closes; that’s expected behavior for real-time HTF overlays.
Inputs & features
Place at end of chart (EOC mode toggle): index-anchored layout with ≤500-bar clamp.
Right Candle Timeframe: auto-map for D/W/M (D→W, W→M, M→3M) or set manually.
Offsets & width: right-edge offset (bars), left-candle offset, body width (bars), minimum gap between candles.
Wicks: show/hide (fallback mode draws wicks; index mode draws them via lines).
OHLC guide lines: toggle H/L/C, choose style/width/color, with right-side projection distance.
OHLC labels: side selection, text size, background/text colors, side offset.
Range label: toggle, side offset, size; option to show pip units (1/mintick).
Prev candle projections: optional HTF high/low lines from the left candle.
Remaining-time panel: live countdown to the HTF bar close.
Colors: bullish/bearish bodies and wicks.
How to use
Add to any chart (works best on intraday charts when viewing D/W/M candles).
Keep “Place at end of chart” ON for perfect parallel tracking while zooming/panning.
Choose Right Candle Timeframe (or use auto for D/W/M).
Adjust Body Width and Label/Line Offsets to taste. If you push offsets too far, the script auto-clamps objects to respect the 500-bar forward limit.
Optionally enable Prev Candle HL projections, OHLC labels, and the Range readout.
Publish with a clean chart so the overlay is easy to understand at a glance.
Notes & limitations
Forward plotting limit: TradingView only allows drawing ≤500 bars into the future. The script clamps all end-of-chart objects automatically; if you request more, it will shorten projections to remain compliant.
Sessions & symbols: Exotic sessions or illiquid symbols may produce uneven HTF boundaries. If needed, set the Right Candle Timeframe manually.
No signals, no promises: This is a visualization tool—it does not generate trade signals or promise performance. Use it alongside your own analysis and risk management.
Settings quick reference
EOC mode: ON (index-anchored) / OFF (time-anchored labels).
Right Candle TF: Auto D→W→M→3M or manual TF.
Offsets: Right edge, left candle, label/range/line projections.
Body Width: Candle thickness in bars.
Lines/Labels: OHLC guides, OHLC labels, Range label.
Prev HL: Previous HTF high/low projections.
Timer: Remaining time in the current HTF bar.
Colors: Bull/Bear bodies, wicks.
Disclaimer
For educational purposes only. Not financial advice. Past performance does not guarantee future results. Always test on your own and trade responsibly.
Author’s note on originality
This script focuses on bar-index anchored EOC rendering with comprehensive forward-clamping and dual label modes, aiming to solve the common drift/desync issues seen in MTF overlays during chart scaling.
Notas de Lançamento
What changed (to kill repaint on the first candle)The LEFT candle now pulls confirmed HTF values using request.security(..., open[leftOffset]/high[leftOffset]/low[leftOffset]/close[leftOffset]). Those are final and won’t change intrabar.
The RIGHT candle still uses the current HTF bar (open/high/low/close without indexing), so it keeps moving with price.
Script protegido
Esse script é publicada como código fechado. No entanto, você pode usar ele livremente e sem nenhuma limitação – saiba mais aqui.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script protegido
Esse script é publicada como código fechado. No entanto, você pode usar ele livremente e sem nenhuma limitação – saiba mais aqui.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.