OPEN-SOURCE SCRIPT

Altcoin Breakout Detector

139
//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)

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.