OPEN-SOURCE SCRIPT
Candle 2 Closure

📌 Indicator Presentation – Candle 2 Closure
"Candle 2 Closure"s is an indicator designed to identify three types of price–action-based signals in real time: Long, Short, and Generic.
The goal is to visually highlight moments when the market breaks a key level of the previous candle but rejects that break, closing on the opposite side.
The idea was inspired by the study of pure price action and specifically by the following video:
👉 youtube.com/watch?v=tyoxl1l-6iI&t=346s
🎯 How the Indicator Works
The indicator generates signals on bar close (barstate.isconfirmed), making them reliable and free from repainting.
🔵 LONG Signal
A long signal is triggered when:
The current candle breaks the low of the previous candle
But then closes back above that low
→ This is often a sign of a bear trap or a liquidity rejection to the downside.
🔴 SHORT Signal
A short signal is triggered when:
The current candle breaks the high of the previous candle
But then closes back below that high
→ This may indicate a bull trap or a liquidity rejection to the upside.
⚪ GENERIC Signal
A generic signal is triggered when:
A high or low is broken,
But neither the long nor short conditions are met,
Resulting in a simple unconfirmed break.
📍 Operational Advantages
Highlights liquidity absorption zones
Works on all timeframes (1m → 1D)
Useful for scalping, intraday, or swing trading
Clear and immediate visual signals on the chart
Zero repainting
✨ Visual Style
LONG displayed below the candle, white color
SHORT displayed above the candle, white color
Generic signal shown with a neutral label
"Candle 2 Closure"s is an indicator designed to identify three types of price–action-based signals in real time: Long, Short, and Generic.
The goal is to visually highlight moments when the market breaks a key level of the previous candle but rejects that break, closing on the opposite side.
The idea was inspired by the study of pure price action and specifically by the following video:
👉 youtube.com/watch?v=tyoxl1l-6iI&t=346s
🎯 How the Indicator Works
The indicator generates signals on bar close (barstate.isconfirmed), making them reliable and free from repainting.
🔵 LONG Signal
A long signal is triggered when:
The current candle breaks the low of the previous candle
But then closes back above that low
→ This is often a sign of a bear trap or a liquidity rejection to the downside.
🔴 SHORT Signal
A short signal is triggered when:
The current candle breaks the high of the previous candle
But then closes back below that high
→ This may indicate a bull trap or a liquidity rejection to the upside.
⚪ GENERIC Signal
A generic signal is triggered when:
A high or low is broken,
But neither the long nor short conditions are met,
Resulting in a simple unconfirmed break.
📍 Operational Advantages
Highlights liquidity absorption zones
Works on all timeframes (1m → 1D)
Useful for scalping, intraday, or swing trading
Clear and immediate visual signals on the chart
Zero repainting
✨ Visual Style
LONG displayed below the candle, white color
SHORT displayed above the candle, white color
Generic signal shown with a neutral label
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.