Volume Oscillator Formula (Chart Controls)
The volume oscillator formula measures the difference between a short period moving average of volume and a long period moving average of volume. A positive value indicates a strong trend, and a negative value indicates a weak trend.
Formula Details
Syntax
Chart.DataManipulator.FinancialFormula(
FinancialFormula.VolumeOscillator,
"PeriodShort,PeriodLong,UsePercentage",
"Volume",
"VO")
Parameters
This formula takes three optional parameters.
- PeriodShort
Period for calculating the short period moving average. The default value is 5.
- PeriodLong
Period for calculating the long period moving average. The default value is 10.
- UsePercentage
Whether to output the difference in percentage. When set to false, the formula outputs the difference as a point. The default value is true.
Input Values
This formula takes one input Y value.
- Volume
Volume for which the volume oscillator indicator is calculated.
Output Value
This formula outputs one Y value.
- VO
Volume oscillator indicator.
Remarks
The Line chart type is a convenient chart type to display the formula output.
Example
The following example takes input from Series1's Y value for volume (Series1:Y) and outputs the volume oscillator indicator on Series2 (Series2:Y). It uses a short period of 10 days and a long period of 30 days.
Chart1.DataManipulator.FinancialFormula (FinancialFormula.VolumeOscillator, "10,30,true", "Series1:Y", "Series3:Y")
Chart1.DataManipulator.FinancialFormula (FinancialFormula.VolumeOscillator, "10,30,true", "Series1:Y", "Series3:Y");
See Also
Reference
System.Windows.Forms.DataVisualization.Charting
System.Web.UI.DataVisualization.Charting