OPEN-SOURCE SCRIPT
تم تحديثه

Wickless Candles

497
Wickless Candles – Multi-Timeframe Levels

Marks wickless candles (Marubozu-style candles with no wick on one or both sides) as horizontal levels across multiple timeframes. These candles form when price closes in one direction without testing the opposite side even once during the bar – a sign of clean, one-sided order flow. The high/low levels of such candles often act as future support or resistance zones.
What it does

The indicator scans multiple timeframes in parallel (1H, 4H, 1D, 1W by default, plus 15m and current chart optional) and draws a horizontal line from the candle body the moment a wickless candle closes:

Top (red): line at the high level when the candle has no upper wick.
Bottom (green): line at the low level when the candle has no lower wick.
A fully wickless candle (true Marubozu) produces both lines.

Lines extend bar by bar until price reaches the level again. By default, the line is removed on first touch (setting „Hide broken lines") – so only untested levels stay on the chart and the view remains clean.

Detection logic:
A candle qualifies as wickless on a given side when:

No upper wick: high == max(open, close)
No lower wick: low == min(open, close)

Detection runs strictly on candle close (non-repainting). Higher timeframes are read via request.security with lookahead_on and [1] indexing on the last closed HTF candle – levels are only drawn after the HTF candle has fully closed, and never change afterwards.


Settings

Timeframes:
Individually toggleable: Current chart, 15m, 1H, 4H, 1D, 1W
Timeframe label at the line end (e.g. „1D", „4H") – follows the right edge of the line, so it's always clear which TF the level came from

Display:
Line width (1–4)
Line style: solid, dashed, dotted
Hide broken lines (on: line disappears on touch / off: line stops at touch and stays visible)

Colors:
Freely customizable for upper and lower markings (default: subtle red/green with transparency)


How to use

Typical setup: a lower-timeframe chart (e.g. 15m or 1H) with higher TFs enabled (4H, 1D, 1W). At a glance you see which 1D or 1W levels price last closed against one-sidedly, and which of those levels haven't been retested yet – often high-quality reaction zones for pullbacks or breakouts.

Note:
Timeframes lower than the chart TF (e.g. 15m on a 4H chart) are only sampled coarsely by Pine Script – not every 15m wickless candle will be captured in that case. For full coverage, select TF >= chart TF.

Alert:
Built-in alert „Wickless candle (Chart)" fires when a wickless candle closes on the current chart timeframe.
ملاحظات الأخبار
The following core functions have been updated to ensure that the indicator correctly detects and displays wickless candles:

HTF detection logic (): detectHTF Data retrievals have been adjusted to capture the high, low, open, and close prices at the exact moment a candle closes. This prevents the “one-candle delay,” where signals would previously appear too late.

Initial touch prevention: A new check () has been added. Previously, the script deleted a line the very moment it was created because the current price naturally touched the high or low of the candle. Detection of the “broken line” only begins after the candle has closed.bar_index > startBar

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.