IIndicatorsAccessor.NegativeVolumeIndex
method · IIndicatorsAccessor · cAlgo.API.Internals
DesktopCLICloud
The Negative Volume Index is a calculation of the percentage change in price on days when trading volume declines.
Definition
NegativeVolumeIndex NegativeVolumeIndex(DataSeries source)
api.Indicators.NegativeVolumeIndex(source: DataSeries) -> NegativeVolumeIndex
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
source | DataSeries | DataSeries | The price source data used for the calculation. |
Returns NegativeVolumeIndex — Negative Volume Index indicator instance
Examples
var negativeVolumeIndex = Indicators.NegativeVolumeIndex(Bars.ClosePrices);
Print("Negative Volume Index: {0}", negativeVolumeIndex.Result.LastValue);
negativeVolumeIndex = api.Indicators.NegativeVolumeIndex(api.Bars.ClosePrices)
api.Print(f"Negative Volume Index: {negativeVolumeIndex.Result.LastValue}")