OPEN-SOURCE SCRIPT
업데이트됨 Apex Edge – HTF Overlay Candles

“Trade your 5m chart with the eyes of the 1H — Apex Edge brings higher-timeframe structure and liquidity sweeps directly onto your execution chart.”
Apex Edge – HTF Overlay Candles
The Apex Edge – HTF Overlay Candles indicator overlays higher-timeframe (HTF) candles directly onto your lower-timeframe chart. Instead of flipping between timeframes, you see HTF structure “breathe” live on your execution chart.
What It Does
• HTF Body Boxes → open/close zones drawn as semi-transparent rectangles.
• HTF Wick Boxes → high/low extremes projected as envelopes around each body.
• Midpoint Line → a dynamic equilibrium line that flips bias as price trades above or below.
• Sweep Arrows → one-time markers showing the first liquidity raid at HTF highs or lows.
Under the Hood
This isn’t just a visual overlay — it’s engineered for accuracy and performance in PineScript.
1. HTF Data Retrieval
• Uses request.security() to import open, high, low, close, time from any selected HTF.
• lookahead=barmerge.lookahead_off ensures OHLC values update bar by bar as the HTF
candle builds.
• When the HTF bar closes, boxes and midpoint lock to historical values — matching the
native HTF chart exactly.
2. Box Construction
• Body box: built from HTF open → close.
• Wick box: built from HTF high → low.
• Boxes extend dynamically across each HTF period, updating in real time, then freeze at
close.
3. Midpoint Logic
• (htfOpen + htfClose) / 2 calculates intrabar midpoint.
• Line drawn edge-to-edge across the active HTF body.
• Style, width, color, and opacity are user-controlled.
4. Sweep Detection
• Flags (sweepedHigh / sweepedLow) prevent clutter: only the first tap per side per HTF
candle is marked.
• Lower-timeframe price breaking the HTF high/low triggers the sweep arrow.
• Arrows are offset above/below wick envelopes for clean visuals.
5. Customisation
• Every layer (body, wick, midpoint, arrows) has independent color + opacity settings.
• Arrow size, arrow color, and transparency are adjustable.
• Default HTF = 1H (perfect for 5m/15m traders) but can be switched to 30m, 4H, Daily,
etc.
Why It’s Useful
• HTF intent + LTF execution without chart hopping.
• Liquidity mapping: see where liquidity is swept in real time.
• Bias clarity: midpoint line defines HTF equilibrium.
• Clean signals: only the first sweep prints — no spam.
What Makes It Different
Most MTF overlays just plot candles or single lines. This tool:
• Splits body vs wick zones for institutional precision.
• Updates live intrabar (no repainting).
• Highlights liquidity sweeps clearly.
• Built for readability and professional use — not another retail signal toy.
Cheat-Sheet Playbook
1️⃣ Structure Bias
• Above midpoint line = bullish intent.
• Below midpoint line = bearish intent.
• Chop around midpoint = no clear direction.
2️⃣ Liquidity Sweeps
• ▲ Green up arrow below wick box = sell-side liquidity taken → watch for longs.
• ▼ Red down arrow above wick box = buy-side liquidity taken → watch for shorts.
• First sweep is the cleanest.
3️⃣ Trade Logic
• Body box = where institutions transact.
• Wick box = liquidity traps.
• Midpoint = bias filter.
• Best setups occur when sweep + midpoint flip align.
4️⃣ Example (5m + 1H Overlay)
1. ▲ Green up arrow prints below HTF wick.
2. Price reclaims the body box.
3. Midpoint flips to support.
4. Enter long → stop below sweep → targets = midpoint first, opposite wick second.
In short:
• Boxes = structure
• Wicks = liquidity pools
• Midpoint = bias line
• Arrows = liquidity sweeps
This is your SMC edge on one chart — HTF structure and liquidity fused directly into your execution timeframe.
Apex Edge – HTF Overlay Candles
The Apex Edge – HTF Overlay Candles indicator overlays higher-timeframe (HTF) candles directly onto your lower-timeframe chart. Instead of flipping between timeframes, you see HTF structure “breathe” live on your execution chart.
What It Does
• HTF Body Boxes → open/close zones drawn as semi-transparent rectangles.
• HTF Wick Boxes → high/low extremes projected as envelopes around each body.
• Midpoint Line → a dynamic equilibrium line that flips bias as price trades above or below.
• Sweep Arrows → one-time markers showing the first liquidity raid at HTF highs or lows.
Under the Hood
This isn’t just a visual overlay — it’s engineered for accuracy and performance in PineScript.
1. HTF Data Retrieval
• Uses request.security() to import open, high, low, close, time from any selected HTF.
• lookahead=barmerge.lookahead_off ensures OHLC values update bar by bar as the HTF
candle builds.
• When the HTF bar closes, boxes and midpoint lock to historical values — matching the
native HTF chart exactly.
2. Box Construction
• Body box: built from HTF open → close.
• Wick box: built from HTF high → low.
• Boxes extend dynamically across each HTF period, updating in real time, then freeze at
close.
3. Midpoint Logic
• (htfOpen + htfClose) / 2 calculates intrabar midpoint.
• Line drawn edge-to-edge across the active HTF body.
• Style, width, color, and opacity are user-controlled.
4. Sweep Detection
• Flags (sweepedHigh / sweepedLow) prevent clutter: only the first tap per side per HTF
candle is marked.
• Lower-timeframe price breaking the HTF high/low triggers the sweep arrow.
• Arrows are offset above/below wick envelopes for clean visuals.
5. Customisation
• Every layer (body, wick, midpoint, arrows) has independent color + opacity settings.
• Arrow size, arrow color, and transparency are adjustable.
• Default HTF = 1H (perfect for 5m/15m traders) but can be switched to 30m, 4H, Daily,
etc.
Why It’s Useful
• HTF intent + LTF execution without chart hopping.
• Liquidity mapping: see where liquidity is swept in real time.
• Bias clarity: midpoint line defines HTF equilibrium.
• Clean signals: only the first sweep prints — no spam.
What Makes It Different
Most MTF overlays just plot candles or single lines. This tool:
• Splits body vs wick zones for institutional precision.
• Updates live intrabar (no repainting).
• Highlights liquidity sweeps clearly.
• Built for readability and professional use — not another retail signal toy.
Cheat-Sheet Playbook
1️⃣ Structure Bias
• Above midpoint line = bullish intent.
• Below midpoint line = bearish intent.
• Chop around midpoint = no clear direction.
2️⃣ Liquidity Sweeps
• ▲ Green up arrow below wick box = sell-side liquidity taken → watch for longs.
• ▼ Red down arrow above wick box = buy-side liquidity taken → watch for shorts.
• First sweep is the cleanest.
3️⃣ Trade Logic
• Body box = where institutions transact.
• Wick box = liquidity traps.
• Midpoint = bias filter.
• Best setups occur when sweep + midpoint flip align.
4️⃣ Example (5m + 1H Overlay)
1. ▲ Green up arrow prints below HTF wick.
2. Price reclaims the body box.
3. Midpoint flips to support.
4. Enter long → stop below sweep → targets = midpoint first, opposite wick second.
In short:
• Boxes = structure
• Wicks = liquidity pools
• Midpoint = bias line
• Arrows = liquidity sweeps
This is your SMC edge on one chart — HTF structure and liquidity fused directly into your execution timeframe.
릴리즈 노트
MAJOR FIXES:• Fixed HTF overlay timing alignment - boxes now perfectly match LTF price action
• Corrected sweep detection synchronization with new HTF timing
• Eliminated 1-period right offset that caused misalignment
NEW FEATURES:
• Added comprehensive alert system for HTF liquidity sweeps
• Three alert types: High sweep, Low sweep, and General sweep alerts
• Real-time notifications when HTF levels are breached
IMPROVEMENTS:
• HTF boxes now span exact time periods using boundary tracking
• Sweep arrows appear on first LTF candle that breaches HTF levels
• Enhanced accuracy for multi-timeframe analysis
• Optimized performance with proper variable management
TECHNICAL CHANGES:
• Implemented HTF period boundary tracking system
• Replaced offset calculations with actual time boundary detection
• Added proper sweep flag management per HTF period
• Integrated alertcondition() functions for notifications
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.