OPEN-SOURCE SCRIPT
Telah dikemas kini Breakout Pullback Continuation

//version=5
indicator("Breakout Pullback Continuation", overlay=true)
// === Parameters ===
lookback = 20 // Look for breakouts above this many bars
volumeFactor = 1.3 // How much volume needs to exceed average
pullbackDepth = 3 // Max bars to wait for pullback + green
// === Track State ===
var float breakoutLevel = na
var int breakoutBar = na
volumeSMA = ta.sma(volume, 20)
// === Detect Breakout ===
recentHigh = ta.highest(high, lookback)
breakout = close > recentHigh[1]
if breakout
breakoutLevel := close
breakoutBar := bar_index
// === Check for Pullback After Breakout
pullbackOccurred = na(breakoutLevel) ? false : close < breakoutLevel and bar_index > breakoutBar
// === Check for Confirmation Candle
greenCandle = close > open
decentRange = (high - low) > (close * 0.003)
volumeSpike = volume > volumeSMA * volumeFactor
confirmation = pullbackOccurred and greenCandle and decentRange and volumeSpike and (bar_index - breakoutBar <= pullbackDepth)
// === Signal Plot ===
plotshape(confirmation, title="Pullback Continuation", location=location.belowbar, color=color.lime, style=shape.triangleup)
alertcondition(confirmation, title="Breakout Pullback Alert", message="🚀 {{ticker}} breakout-pullback-confirmation at {{close}}")
indicator("Breakout Pullback Continuation", overlay=true)
// === Parameters ===
lookback = 20 // Look for breakouts above this many bars
volumeFactor = 1.3 // How much volume needs to exceed average
pullbackDepth = 3 // Max bars to wait for pullback + green
// === Track State ===
var float breakoutLevel = na
var int breakoutBar = na
volumeSMA = ta.sma(volume, 20)
// === Detect Breakout ===
recentHigh = ta.highest(high, lookback)
breakout = close > recentHigh[1]
if breakout
breakoutLevel := close
breakoutBar := bar_index
// === Check for Pullback After Breakout
pullbackOccurred = na(breakoutLevel) ? false : close < breakoutLevel and bar_index > breakoutBar
// === Check for Confirmation Candle
greenCandle = close > open
decentRange = (high - low) > (close * 0.003)
volumeSpike = volume > volumeSMA * volumeFactor
confirmation = pullbackOccurred and greenCandle and decentRange and volumeSpike and (bar_index - breakoutBar <= pullbackDepth)
// === Signal Plot ===
plotshape(confirmation, title="Pullback Continuation", location=location.belowbar, color=color.lime, style=shape.triangleup)
alertcondition(confirmation, title="Breakout Pullback Alert", message="🚀 {{ticker}} breakout-pullback-confirmation at {{close}}")
Nota Keluaran
//version=5indicator("Breakout Pullback Continuation (Simple)", overlay=true)
// === SETTINGS ===
lookback = 20 // How far back to define a breakout
pullbackBars = 5 // How many bars we allow a pullback before confirmation
// === TRACK BREAKOUT LEVEL ===
recentHigh = ta.highest(high, lookback)
breakout = close > recentHigh[1]
// === Store breakout info (price + bar index)
var float breakoutLevel = na
var int breakoutBar = na
if breakout
breakoutLevel := close
breakoutBar := bar_index
// === Define Pullback + Confirmation ===
// Pullback = close drops below breakout level AFTER breakout
pullback = na(breakoutLevel) ? false : close < breakoutLevel and bar_index > breakoutBar
// Confirm bar = green candle after pullback, within N bars from breakout
greenConfirm = close > open and bar_index - breakoutBar <= pullbackBars and pullback
// === Plot confirmation marker ===
plotshape(greenConfirm, title="Pullback Continuation", location=location.belowbar, color=color.lime, style=shape.triangleup, size=size.small)
alertcondition(greenConfirm, title="Pullback Continuation Alert", message="🚀 {{ticker}} breakout pullback confirmed at {{close}}")
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.