CandleSignal_En

📊 Script Description
5_CandleSignal is an advanced TradingView indicator based on a 3-candle pattern (C1-C2-C3) combined with institutional Order Block (OB) detection, a moving average trend filter, and automatic Stop Loss / Take Profit level management.
The script identifies high-probability entry points by leveraging:
Liquidity sweeps (break of a high/low followed by a reclaim)
Order Blocks as institutional confluence zones
Displacement (impulsive move with ATR-based volatility)
Trend filter on a customizable timeframe
It is designed for intraday traders on the M5 timeframe, providing clear signals (★ BUY / ★ SELL) and warning alerts (⚠OB) when a signal is near an opposite Order Block.
🧠 How the C1-C2-C3 Pattern Works
Phase 1 — C1 (Reference Candle)
The script stores the high and low of the first valid candle. Two gray lines are drawn on the chart (C1 High / C1 Low).
Phase 2 — C2 (Setup)
It waits for a candle that:
Breaks C1's low (sweep down) but not the high, then closes back inside C1's range → BUY setup
Breaks C1's high (sweep up) but not the low, then closes back inside C1's range → SELL setup
When the setup is valid, the C1 lines turn fuchsia and the script enters breakout-waiting mode.
Phase 3 — C3 (Confirmation / Trigger)
The signal triggers when:
BUY: price breaks C1's high upward (+ ATR buffer)
SELL: price breaks C1's low downward (− ATR buffer)
Confirmation must also respect the MA filter (price above/below the moving average), unless C1 or C2 touched a matching Order Block (MA bypass).
🎯 How to Use the Signals — Entry
✅ BUY Signal (★ yellow below the candle)
Entry: at the close of candle C3 that breaks C1 High
Ideal confirmations:
Price above the MA (trend filter active)
"OB" label below the signal → confluence with a bullish Order Block (stronger signal)
No ⚠OB (warning) above the signal
❌ SELL Signal (★ red above the candle)
Entry: at the close of candle C3 that breaks C1 Low
Ideal confirmations:
Price below the MA
"OB" label above the signal → confluence with a bearish Order Block
No ⚠OB below the signal
⚠️ OB Warning (★ + colored X)
When the X appears above/below the star, it means the signal is near an opposite Order Block → possible reversal.
With "Ignore signal" mode: the signal is skipped
With "Mark with X" mode: the signal is shown but flagged → use caution or skip
🚪 How to Use the Signals — Exit
The script automatically draws a green box (TP) and a red box (SL) on the confirmed signal:
Stop Loss (SL)
BUY: below C1's low − minAtrStopMult × ATR (default 0.5 ATR)
SELL: above C1's high + minAtrStopMult × ATR
Take Profit (TP)
Calculated with a configurable R:R
Recommended exits
TP exit: when price reaches the green box
SL exit: when price reaches the red box
Early exit: if an opposite signal (opposite ★) appears before TP
Manual trailing: after 1R of profit, move SL to break-even
⚙️ Recommended Settings
🕐 Timeframe
M5 (5 minutes) — ideal for:
C1-C2-C3 patterns with well-defined liquidity sweeps
Meaningful Order Blocks
Realistic R:R ratios during the trading day
📈 Recommended R:R: 1:1.7
In Settings → Trade Levels (SL/TP) → Take Profit ratio (R:R) = 1.7
⚠️ An R:R of 1.7 with a win rate ≥ 45% is already profitable. With OB + MA filters active, the win rate typically rises.
🎛️ Recommended filters (enabled by default)
Parameter Recommended Value
Moving Average Filter ✅ ON
MA timeframe 5
SMA period 20
Source close
Order Block detection ✅ ON
Require displacement ✅ ON
ATR multiplier (displacement) 1.2
Bypass MA if OB touch ✅ ON
OB proximity margin 0.5 ATR
Warning OB behavior "Mark with X"
Min SL distance beyond C1 0.5 ATR
R:R 1.7
Box extension 30 bars
🔔 Recommended alerts
Enable these alerts in TradingView:
✅ Buy Confirmed / Sell Confirmed
✅ Buy + Order Block / Sell + Order Block (strongest signals)
✅ Buy - Opposite OB Warning / Sell - Opposite OB Warning (to avoid false signals)
📋 Operational Checklist (M5 — R:R 1.7)
Before entering:
✅ The ★ signal is confirmed on a closed candle
✅ Price is on the correct side of the MA (or OB bypass applies)
✅ The "OB" confluence label is present (optional but preferable)
✅ There is NO opposite ⚠OB (otherwise skip or reduce size)
✅ The TP is far from obvious resistance/support levels
Management:
🎯 Entry at C3 close
🛑 Automatic SL (red box) — do not move it
🏁 Automatic TP (green box) at R:R 1.7
🔄 At +1R move SL to break-even
❌ If an opposite signal appears before TP → consider a manual exit
⚠️ Disclaimer
This script is not an automated trading system — it is a decision-support tool
The obRealtimeDraw parameter draws OBs even on the forming candle (repainting): disable it if you want only confirmed signals
Always test on demo and over a significant number of trades before trading with real capital
Size your position according to risk: never risk more than 1-2% of capital per trade
🎁 Quick Summary
Element Value
Pattern C1-C2-C3 (sweep + reclaim + breakout)
Timeframe M5
R:R 1:1.7
Filters MA (SMA 20) + Order Block + Displacement
BUY Signal ★ below + (OB or above MA)
SELL Signal ★ above + (OB or below MA)
Avoid Opposite ⚠OB
SL Beyond C1 ± 0.5 ATR
TP Entry ± (SL distance × 1.7)
Happy trading! 📈
5_CandleSignal is an advanced TradingView indicator based on a 3-candle pattern (C1-C2-C3) combined with institutional Order Block (OB) detection, a moving average trend filter, and automatic Stop Loss / Take Profit level management.
The script identifies high-probability entry points by leveraging:
Liquidity sweeps (break of a high/low followed by a reclaim)
Order Blocks as institutional confluence zones
Displacement (impulsive move with ATR-based volatility)
Trend filter on a customizable timeframe
It is designed for intraday traders on the M5 timeframe, providing clear signals (★ BUY / ★ SELL) and warning alerts (⚠OB) when a signal is near an opposite Order Block.
🧠 How the C1-C2-C3 Pattern Works
Phase 1 — C1 (Reference Candle)
The script stores the high and low of the first valid candle. Two gray lines are drawn on the chart (C1 High / C1 Low).
Phase 2 — C2 (Setup)
It waits for a candle that:
Breaks C1's low (sweep down) but not the high, then closes back inside C1's range → BUY setup
Breaks C1's high (sweep up) but not the low, then closes back inside C1's range → SELL setup
When the setup is valid, the C1 lines turn fuchsia and the script enters breakout-waiting mode.
Phase 3 — C3 (Confirmation / Trigger)
The signal triggers when:
BUY: price breaks C1's high upward (+ ATR buffer)
SELL: price breaks C1's low downward (− ATR buffer)
Confirmation must also respect the MA filter (price above/below the moving average), unless C1 or C2 touched a matching Order Block (MA bypass).
🎯 How to Use the Signals — Entry
✅ BUY Signal (★ yellow below the candle)
Entry: at the close of candle C3 that breaks C1 High
Ideal confirmations:
Price above the MA (trend filter active)
"OB" label below the signal → confluence with a bullish Order Block (stronger signal)
No ⚠OB (warning) above the signal
❌ SELL Signal (★ red above the candle)
Entry: at the close of candle C3 that breaks C1 Low
Ideal confirmations:
Price below the MA
"OB" label above the signal → confluence with a bearish Order Block
No ⚠OB below the signal
⚠️ OB Warning (★ + colored X)
When the X appears above/below the star, it means the signal is near an opposite Order Block → possible reversal.
With "Ignore signal" mode: the signal is skipped
With "Mark with X" mode: the signal is shown but flagged → use caution or skip
🚪 How to Use the Signals — Exit
The script automatically draws a green box (TP) and a red box (SL) on the confirmed signal:
Stop Loss (SL)
BUY: below C1's low − minAtrStopMult × ATR (default 0.5 ATR)
SELL: above C1's high + minAtrStopMult × ATR
Take Profit (TP)
Calculated with a configurable R:R
Recommended exits
TP exit: when price reaches the green box
SL exit: when price reaches the red box
Early exit: if an opposite signal (opposite ★) appears before TP
Manual trailing: after 1R of profit, move SL to break-even
⚙️ Recommended Settings
🕐 Timeframe
M5 (5 minutes) — ideal for:
C1-C2-C3 patterns with well-defined liquidity sweeps
Meaningful Order Blocks
Realistic R:R ratios during the trading day
📈 Recommended R:R: 1:1.7
In Settings → Trade Levels (SL/TP) → Take Profit ratio (R:R) = 1.7
⚠️ An R:R of 1.7 with a win rate ≥ 45% is already profitable. With OB + MA filters active, the win rate typically rises.
🎛️ Recommended filters (enabled by default)
Parameter Recommended Value
Moving Average Filter ✅ ON
MA timeframe 5
SMA period 20
Source close
Order Block detection ✅ ON
Require displacement ✅ ON
ATR multiplier (displacement) 1.2
Bypass MA if OB touch ✅ ON
OB proximity margin 0.5 ATR
Warning OB behavior "Mark with X"
Min SL distance beyond C1 0.5 ATR
R:R 1.7
Box extension 30 bars
🔔 Recommended alerts
Enable these alerts in TradingView:
✅ Buy Confirmed / Sell Confirmed
✅ Buy + Order Block / Sell + Order Block (strongest signals)
✅ Buy - Opposite OB Warning / Sell - Opposite OB Warning (to avoid false signals)
📋 Operational Checklist (M5 — R:R 1.7)
Before entering:
✅ The ★ signal is confirmed on a closed candle
✅ Price is on the correct side of the MA (or OB bypass applies)
✅ The "OB" confluence label is present (optional but preferable)
✅ There is NO opposite ⚠OB (otherwise skip or reduce size)
✅ The TP is far from obvious resistance/support levels
Management:
🎯 Entry at C3 close
🛑 Automatic SL (red box) — do not move it
🏁 Automatic TP (green box) at R:R 1.7
🔄 At +1R move SL to break-even
❌ If an opposite signal appears before TP → consider a manual exit
⚠️ Disclaimer
This script is not an automated trading system — it is a decision-support tool
The obRealtimeDraw parameter draws OBs even on the forming candle (repainting): disable it if you want only confirmed signals
Always test on demo and over a significant number of trades before trading with real capital
Size your position according to risk: never risk more than 1-2% of capital per trade
🎁 Quick Summary
Element Value
Pattern C1-C2-C3 (sweep + reclaim + breakout)
Timeframe M5
R:R 1:1.7
Filters MA (SMA 20) + Order Block + Displacement
BUY Signal ★ below + (OB or above MA)
SELL Signal ★ above + (OB or below MA)
Avoid Opposite ⚠OB
SL Beyond C1 ± 0.5 ATR
TP Entry ± (SL distance × 1.7)
Happy trading! 📈
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.