Volume Indicator — Strategy by hard6out

By version

Performance Metrics

Description

//version=6indicator("CPE Volume Daily Signals", overlay=true)secret = input.string("", "Webhook Secret")buyMaLen = input.int(20, "Buy Volume MA")buyLookback = input.int(20, "Buy Lookback")buyMovePct = input.float(0.5, "Buy Move %")buyMult = input.float(1.2, "Buy Volume Mult")buyEdge = input.int(3, "Buy Edge Count")sellMaLen = input.int(50, "Sell Volume MA")sellLookback = input.int(60, "Sell Lookback")sellMovePct = input.float(0.5, "Sell Move %")sellMult = input.float(1.2, "Sell Volume Mult")sellEdge = input.int(2, "Sell Edge Count")bodyPct = ((close - open) / open) * 100buyAvgVol = ta.sma(volume, buyMaLen)[1]sellAvgVol = ta.sma(volume, sellMaLen)[1]accumulation = volume >= buyAvgVol * buyMult and bodyPct >= buyMovePctdistribution = volume >= sellAvgVol * sellMult and bodyPct = buyEdgesellSignal = barstate.isconfirmed and sellBias <= -sellEdgeif buySignal alert('{"strategy":"VOLUME_DAILY","instrument":"EUR_USD","side":"buy","timeframe":"D","secret":"' + secret + '"}', alert.freq_once_per_bar_close)if sellSignal alert('{"strategy":"VOLUME_DAILY","instrument":"EUR_USD","side":"sell","timeframe":"D","secret":"' + secret + '"}', alert.freq_once_per_bar_close)plotshape(buySignal, title="Accumulation Buy", style=shape.triangleup, color=color.green, location=location.belowbar, size=size.small)plotshape(sellSignal, title="Distribution Sell", style=shape.triangledown, color=color.red, location=location.abovebar, size=size.small)

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView