OPEN-SOURCE SCRIPT

Momentum Breakout Signal

14
//version=5
indicator("Momentum Breakout Signal", overlay=true)

// === Breakout Logic ===
length = 20 // Lookback for recent high
recentHigh = ta.highest(high, length)

// === Breakout Condition: Close > prior high
priceBreakout = close > recentHigh[1]

// === Volume Spike Confirmation ===
volumeSMA = ta.sma(volume, 20)
volumeSpike = volume > volumeSMA * 1.3 // Customize sensitivity

// === Optional: Filter for strong candles only
isGreen = close > open
decentRange = (high - low) > (close * 0.003)

// === Final Signal Logic ===
signal = priceBreakout and volumeSpike and isGreen and decentRange

plotshape(signal, title="Breakout Signal", location=location.abovebar, color=color.orange, style=shape.triangleup, size=size.small)
alertcondition(signal, title="Momentum Breakout Alert", message="🚀 {{ticker}} breakout confirmed at {{close}}")

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.