Code Library / Volume Analysis

Pine Script Volume Momentum

Volume-weighted momentum oscillator.

Language: Pine Script · Category: Volume Analysis · Tags: volume weighted, momentum, Pine Script, oscillator, filter

Source code

//@version=5
indicator("Vol Momentum",overlay=false)
pc=close-close[14]; vr=volume/ta.sma(volume,14)
vm=pc*vr
plot(vm,"VM",vm>=0?color.green:color.red,2,plot.style_histogram)
plot(ta.sma(vm,9),"Sig",color.orange); hline(0)

How to use this snippet

This is a building block, not a finished trading system. Paste it into your own Pine Script project, compile it, and test it on a demo account with your broker's real spreads before relying on it. You can convert it to MQL4 or MQL5 with the Pine Script converter.

Related snippets