OPEN-SOURCE SCRIPT

Fast Scalping Volume Confirmation (v2)

141
//version=5
indicator("Fast Scalping Volume Confirmation (v2)", overlay=true)

// ---------- INPUTS ----------
maLength = input.int(5, "Volume MA Length", minval=1)
multiplier = input.float(1.5, "Volume Multiplier (Trigger Above MA)", minval=0.1, step=0.1)
usePriceFilter = input.bool(true, "Enable Entry Price Range Filter")
priceMin = input.float(184.5, "Price Min (if filter on)")
priceMax = input.float(185.2, "Price Max (if filter on)")

// ---------- CALCS ----------
volMA = ta.sma(volume, maLength)
highVolume = volume > volMA * multiplier

// Simple reversal detection (non-exhaustive)
bullishEngulfing = (close > open[1]) and (open < close[1]) and (close > open)
hammer = (close > open) and ((high - low) > 3 * math.abs(open - close)) and ((close - low) / (high - low) > 0.6)

// ensure candle is closed to avoid repainting
confirmedBar = barstate.isconfirmed

// price filter
inPriceRange = not usePriceFilter or (close >= priceMin and close <= priceMax)

// final entry condition (only on closed bar)
entrySignal = confirmedBar and inPriceRange and highVolume and (bullishEngulfing or hammer)

// ---------- PLOTTING ----------
plotshape(entrySignal, title="Entry Confirmation", location=location.belowbar,
color=color.new(color.green, 0), style=shape.triangleup, size=size.small, text="ENTRY")

// show volume MA in the volume pane for reference (optional visual)
// We draw a small label on chart with current volume vs MA
var label volLab = na
if barstate.islast
label.delete(volLab)
volText = "Vol: " + str.tostring(volume) + " MA(" + str.tostring(maLength) + "): " + str.tostring(math.round(volMA))
volLab := label.new(x=bar_index, y=low, text=volText, yloc=yloc.belowbar, style=label.style_label_left, color=color.new(color.gray,85), textcolor=color.white)

// ---------- ALERT ----------
alertcondition(entrySignal, title="Entry Confirmed", message="✅ Entry confirmed: High Volume + Reversal Candle")

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.