Share via


On Balance Volume Formula (Chart Controls)

The on balance volume formula measures positive and negative volume flows.

Sample plot of the on balance volume indicator

Formula Details

Syntax

Chart.DataManipulator.FinancialFormula(
    FinancialFormula.OnBalanceVolume,
    "Close,Volume",
    "OBV")

Input Values

This formula takes two input Y values.

  • Close
    Daily close price.
  • Volume
    Daily volume.

Output Value

This formula outputs one Y value.

  • OBV
    On balance volume 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 daily close prices (Series1:Y4) and Series2's Y value for daily volume, and then outputs the on balance volume indicator on Series3 (Series3:Y).

Chart1.DataManipulator.FinancialFormula (FinancialFormula.OnBalanceVolume, "Series1:Y4,Series2:Y", "Series3:Y")
Chart1.DataManipulator.FinancialFormula (FinancialFormula.OnBalanceVolume, "Series1:Y4,Series2:Y", "Series3:Y");

See Also

Reference

System.Windows.Forms.DataVisualization.Charting
System.Web.UI.DataVisualization.Charting

Concepts

Financial Formulas
Applying Formulas