VolumeOscillator

Calculates the VolumeOscillator indicator.

Accepts the following parameters:

Parameter NameTypeDefault ValueNotes
fastPeriodNumber9-
slowPeriodNumber21-

Returns: Series<Number>

VolumeOscillator is a built-in function - you can use it directly. Below is an example implementation:

12
function VolumeOscillator(fastPeriod = 9, slowPeriod = 21):
100 * (SMA(volume, fastPeriod) - SMA(volume, slowPeriod)) / SMA(volume, slowPeriod)