indicator · own pane · open source
Price Volume Confirmation
Running…
Loading chart…
About
Price Volume Confirmation — a 3-state composite: +1 when both trend and volume agree, -1 when both disagree, 0 when only one is bullish. Stack green bars for high-conviction longs; stack red for shorts.
- Trend = close > 20-Wilder-MA; volume = current > 20-SMA.
Source code
//@version=5
indicator("Price Volume Confirmation", overlay=false)
trendUp = close > ta.rma(close, 20)
volUp = volume > ta.sma(volume, 20)
conf = trendUp and volUp ? 1 : trendUp or volUp ? 0 : -1
hline(1, "Confirmed", color=color.gray)
hline(-1, "Divergence", color=color.gray)
p_Confirm = plot(conf, "Confirm", color=color.blue, style=plot.style_columns, linewidth=2)
alertcondition(conf == 1 and conf[1] != 1, "Confirmed long", "Price and volume confirmed bullish")
alertcondition(conf == -1 and conf[1] != -1, "Confirmed short", "Price and volume confirmed bearish")
No comments yet.
Sign in to comment.