OPEN-SOURCE SCRIPT

Zero Clutter Scalper (ZCS) 🔒

51
//version=5
indicator("Zero Clutter Scalper (ZCS) 🔒", overlay=true)

// ==== SETTINGS ====
length = input.int(14, title="Momentum Length")
threshold = input.float(5, title="Momentum Threshold")
showSignals = input.bool(true, title="Show Buy/Sell Signals")
enableAlerts = input.bool(true, title="Enable Alerts")

// ==== MOMENTUM CALC ====
mom = close - close[length]
mom_smooth = ta.ema(mom, 5)

// ==== PRICE ACTION CONFIRMATION ====
bullCandle = close > open and close > high[1]
bearCandle = close < open and close < low[1]

// ==== CONDITIONS ====
buyCond = mom_smooth > threshold and bullCandle
sellCond = mom_smooth < -threshold and bearCandle

// ==== PLOTTING ====
plotshape(showSignals and buyCond ? low : na, title="Buy Signal", location=location.belowbar, color=color.lime, style=shape.labelup, text="BUY")
plotshape(showSignals and sellCond ? high : na, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")

// ==== ALERTS ====
alertcondition(buyCond and enableAlerts, title="ZCS Buy Alert", message="ZCS Buy Signal on {{ticker}} ({{interval}})")
alertcondition(sellCond and enableAlerts, title="ZCS Sell Alert", message="ZCS Sell Signal on {{ticker}} ({{interval}})")

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。