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)
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。