OPEN-SOURCE SCRIPT
업데이트됨

Breakout Pullback Continuation

44
//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}}")
릴리즈 노트
//version=5
indicator("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}}")

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.