Visual Basic (Declaration) | |
---|---|
Public Overloads Shared Function OnBalanceVolume( _ ByVal sc As SeriesCollection _ ) As SeriesCollection |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public static SeriesCollection OnBalanceVolume( SeriesCollection sc ) |
Parameters
- sc
- A collection of series objects. For example, to evaluate this indicator for two series you will need to pass a series collection containing this two series.
Indicator Formula
The formula for this indicator is:
If today's close is greater than yesterday's close then:
OBV = Yesterday's OBV + Today's Volume
If today's close is less than yesterday's close then:
OBV = Yesterday's OBV - Today's Volume
If today's close is equal to yesterday's close then:
OBV = Yesterday's OBV