INVITE-ONLY SCRIPT

HTF Candles [TakingProphets]

32
HTF Candles — higher-timeframe structure, SMT divergence, and live OHLC projections

Purpose
Informational overlay to keep higher-timeframe (HTF) context visible on a lower-timeframe chart. It does not generate buy/sell signals and is not financial advice. Use it to structure analysis and alerts, not to automate trading.

What it does

HTF candle visualization (up to 10 candles, optional right-side offset) with bodies, wicks, and time labels.

SMT divergence checks on the chosen HTF—both historical (last two completed HTF bars) and real-time (last closed vs. current forming bar) vs. a user-selected correlated symbol (default can be an index future).

Live HTF OHLC projections: forward-extending Open / High / Low / Close from the current HTF bar with optional price labels and styling.

HTF close timer (optional) to show when the active HTF candle ends.

Why these modules belong together (more than a mashup)

This overlay uses one HTF time base to align three lenses of the same context:

Candle projection provides the structural frame (ranges and bodies of true HTF bars).

SMT divergence provides intermarket confirmation/invalidations on that same HTF, so the divergence you see is directly comparable to the projected candles.

Live OHLC projections turn the current HTF bar’s evolving state into concrete reference levels for intraday decisions.
Because all three share the same HTF clock and data source, alerts and drawings change together when the HTF state actually changes. The intent is a coherent workflow tool where each module gates the others (structure → confirmation → actionable references), rather than separate indicators merely co-plotted.

How it works (high-level)
Timeframe mapping & data

You choose an HTF (1m–1M). The script retrieves HTF OHLC/time without look-ahead. Objects update intrabar until the HTF bar closes.

Candle rendering

Up to 10 recent HTF candles are drawn as body boxes with wicks.

A horizontal offset/spacing option places the stack right of the current price for clarity.

Visuals (colors, transparency, borders, wick width, label size/format 12h/24h) are configurable.

SMT divergence (historical & real-time)

Compares HTF highs/lows of your chart vs. a correlated symbol using the same HTF.

Bearish SMT (high-side): one makes a higher high while the other does not.

Bullish SMT (low-side): one makes a lower low while the other does not.

Historical mode compares HTF[2] → HTF[1]; real-time mode compares HTF[1] → HTF[0] as the current HTF bar forms.

Optional lines/labels mark where the divergence is detected.

Live OHLC projections

Extends the current HTF Open / High / Low / Close forward as horizontal lines.

Anchors: Open = first bar of the HTF period; High/Low = first occurrence of each extreme inside the period; Close = current bar.

Each level has independent toggles for price labels, style, and width.

Alerts (workflow prompts)

Bullish SMT, Bearish SMT, Bullish Real-time SMT, Bearish Real-time SMT.

Fire on the bar where the condition first becomes true.

Inputs & customization

Timeframe: select HTF (1m–1M).

Display: number of candles (1–10), right-offset, candle width, transparency, time labels on/off (12h/24h), label size, HTF close timer on/off.

Visuals: bullish/bearish body colors, border color, wick color.

SMT: enable/disable, correlated symbol, line style/width, labels on/off, alerts on/off.

Projections: enable/disable, per-level toggles (Open/High/Low/Close), color/style/width, optional price labels.

Notes & limitations

HTF values are provisional until the HTF bar closes; lines/labels can update during formation.

SMT usefulness depends on the correlated symbol you select; relationships vary by market/regime.

Session gaps/low liquidity can affect extremes and time labels.

Educational tool only. No performance claims and no trade signals.

Originality & scope (for protected/invite-only publications)

A single HTF-synchronized engine: candle projection, dual-mode SMT, and live OHLC projections all computed from the same HTF series to ensure consistent timing and interpretation.

Real-time SMT explicitly ties the developing HTF bar to the prior closed bar, reducing ambiguity vs. generic divergence checks.

Projection anchoring (first-occurrence rules for H/L, period start for Open, current bar for Close) provides deterministic, reproducible reference levels.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน