OPEN-SOURCE SCRIPT
The Distilled HTF PO3

The higher-timeframe candle you're trading inside, drawn on the chart you're trading on. Its manipulation leg, the level it swept, the candle that swept it, and whether the move behind that sweep has since been undone.
Governing candles are aggregated from your own chart's bars — no request.security, so nothing repaints off higher-timeframe lookahead and the panel can never disagree with what the engine scored.
On the chart
The manipulation zone of every completed HTF candle — open to the adverse wick, across its own span. Where the candle went to get its liquidity before it did what it did.
The sweep, marked at the level that was taken — not at the wick that took it. A HTF candle that takes the previous candle's extreme and closes back inside it.
The confirmation line, dashed while it waits and solid with a tick the moment price closes back through it. It sits at the open of the run that delivered the sweep — where that delivery began, and so where it gets undone.
The gap that run left, drawn as a zone, and optionally required to invert as well before anything is called confirmed.
The chart candle that actually printed the HTF high or low, coloured in, with its own small sweep line and a c2 tag. The C2 inside the C2 — the fractal read the model rests on, with an optional filter so it only names genuine pivots rather than any candle mid-move.
HTF gaps on price — blue while unfilled, purple once price closes through the edge they fail on.
A divider at every HTF candle open, time-stamped, so the chart reads as the candles it really is rather than a stream of bars.
A panel of HTF candles beside price, C1 and C2 labelled, carrying their own gap boxes and sweep lines. The newest slot is the candle still forming and updates tick by tick.
Live — a forming HTF candle that currently qualifies is drawn dashed and tells you "CISD hit · on this close" before the close happens.
How each one resolves
Pending — the sweep is marked, the confirmation hasn't landed
Confirmed — it landed inside the C2 or C3 candle
Failed — the sweep extreme was taken back; the level was not given back after all
Unconfirmed — the extreme held, but nothing confirmed in time
Failed and unconfirmed are hidden by default and can be kept if you want to see everything the engine considered.
Dashboard
Detected, confirmed, failed, unconfirmed, and how many confirmations were corroborated by the gap as well as the line — split today against the whole chart, so a quiet session is obvious rather than looking like a broken indicator.
Pairing
Auto pairs the chart to the frame that ranges it: 1m→15m, 3m→30m, 5m→1h, 15m→4h, 1h→7h, 4h→D, D→W, W→3M. The hour pairs to 7H rather than stepping over it to Daily. Manual override available.
Every colour, width, style, size, offset and placement is exposed.
One honest note
The manipulation zone is drawn because it's useful to see, not because it predicts. Read as a signal, open-to-adverse-wick is close to a tautology — it fires on roughly 98% of candles, and the live reclaim of it tested anti-predictive in our own work. It shows you where the manipulation was. It does not claim that's tradeable.
Governing candles are aggregated from your own chart's bars — no request.security, so nothing repaints off higher-timeframe lookahead and the panel can never disagree with what the engine scored.
On the chart
The manipulation zone of every completed HTF candle — open to the adverse wick, across its own span. Where the candle went to get its liquidity before it did what it did.
The sweep, marked at the level that was taken — not at the wick that took it. A HTF candle that takes the previous candle's extreme and closes back inside it.
The confirmation line, dashed while it waits and solid with a tick the moment price closes back through it. It sits at the open of the run that delivered the sweep — where that delivery began, and so where it gets undone.
The gap that run left, drawn as a zone, and optionally required to invert as well before anything is called confirmed.
The chart candle that actually printed the HTF high or low, coloured in, with its own small sweep line and a c2 tag. The C2 inside the C2 — the fractal read the model rests on, with an optional filter so it only names genuine pivots rather than any candle mid-move.
HTF gaps on price — blue while unfilled, purple once price closes through the edge they fail on.
A divider at every HTF candle open, time-stamped, so the chart reads as the candles it really is rather than a stream of bars.
A panel of HTF candles beside price, C1 and C2 labelled, carrying their own gap boxes and sweep lines. The newest slot is the candle still forming and updates tick by tick.
Live — a forming HTF candle that currently qualifies is drawn dashed and tells you "CISD hit · on this close" before the close happens.
How each one resolves
Pending — the sweep is marked, the confirmation hasn't landed
Confirmed — it landed inside the C2 or C3 candle
Failed — the sweep extreme was taken back; the level was not given back after all
Unconfirmed — the extreme held, but nothing confirmed in time
Failed and unconfirmed are hidden by default and can be kept if you want to see everything the engine considered.
Dashboard
Detected, confirmed, failed, unconfirmed, and how many confirmations were corroborated by the gap as well as the line — split today against the whole chart, so a quiet session is obvious rather than looking like a broken indicator.
Pairing
Auto pairs the chart to the frame that ranges it: 1m→15m, 3m→30m, 5m→1h, 15m→4h, 1h→7h, 4h→D, D→W, W→3M. The hour pairs to 7H rather than stepping over it to Daily. Manual override available.
Every colour, width, style, size, offset and placement is exposed.
One honest note
The manipulation zone is drawn because it's useful to see, not because it predicts. Read as a signal, open-to-adverse-wick is close to a tautology — it fires on roughly 98% of candles, and the live reclaim of it tested anti-predictive in our own work. It shows you where the manipulation was. It does not claim that's tradeable.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
I build indicators for you.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
I build indicators for you.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.