OPEN-SOURCE SCRIPT
Altcoin Breakout Detector

//version=5
indicator("Altcoin Breakout Detector", overlay=true)
resistanceLevel = input.float(50.0, "Resistance Level", minval=0.0, maxval=100.0)
breakoutZoneTop = input.float(25.0, "Breakout Zone Top", minval=0.0, maxval=100.0)
shortMA = ta.sma(close, 5) // 5-period moving average for trend confirmation
// Define buy signal conditions
lastPrice = close
secondLastPrice = close[1]
lastVolume = volume
avgVolume = ta.sma(volume, 20) // 20-period simple moving average of volume
buySignal = lastPrice > resistanceLevel and secondLastPrice <= resistanceLevel and lastVolume > avgVolume * 1.5 and lastPrice > shortMA
// Plot buy signal
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
// Highlight breakout zone
hline(breakoutZoneTop, "Breakout Zone", color=color.orange, linestyle=hline.style_dashed)
bgcolor(color.new(color.orange, 90)) // Constant shading for the breakout zone (0 to 25.00)
indicator("Altcoin Breakout Detector", overlay=true)
resistanceLevel = input.float(50.0, "Resistance Level", minval=0.0, maxval=100.0)
breakoutZoneTop = input.float(25.0, "Breakout Zone Top", minval=0.0, maxval=100.0)
shortMA = ta.sma(close, 5) // 5-period moving average for trend confirmation
// Define buy signal conditions
lastPrice = close
secondLastPrice = close[1]
lastVolume = volume
avgVolume = ta.sma(volume, 20) // 20-period simple moving average of volume
buySignal = lastPrice > resistanceLevel and secondLastPrice <= resistanceLevel and lastVolume > avgVolume * 1.5 and lastPrice > shortMA
// Plot buy signal
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
// Highlight breakout zone
hline(breakoutZoneTop, "Breakout Zone", color=color.orange, linestyle=hline.style_dashed)
bgcolor(color.new(color.orange, 90)) // Constant shading for the breakout zone (0 to 25.00)
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.