indicator · own pane · open source
Volume Oscillator
Running…
Loading chart…
About
Volume Oscillator expresses the difference between short and long volume MAs as a percentage of the long MA — a clean volume momentum gauge.
- Positive = short-term volume running hotter than the long-term baseline.
- Negative = short-term volume cooling; watch for a return to zero or a crossover as the trigger.
Source code
//@version=5
indicator("Volume Oscillator", overlay=false)
shortLen = input.int(5, "Short length", minval=1, maxval=100)
longLen = input.int(10, "Long length", minval=2, maxval=200)
vo = 100 * (ta.sma(volume, shortLen) - ta.sma(volume, longLen)) / ta.sma(volume, longLen)
hline(0, "Zero", color=color.gray)
p_VO__ = plot(vo, "VO %", color=color.blue, style=plot.style_histogram, linewidth=2)
alertcondition(ta.crossover(vo, 0), "Volume heating", "Volume Oscillator crossed above zero")
alertcondition(ta.crossunder(vo, 0), "Volume cooling", "Volume Oscillator crossed below zero")
No comments yet.
Sign in to comment.