NinjaScript > Language Reference > Indicator Methods >

Chaikin Volatility

Print this Topic Previous pageReturn to chapter overviewNext page

Description

The Chaikin Volatility Indicator is the difference between two moving averages of a volume weighted accumulation-distribution line. By comparing the spread between a security's high and low prices, it quantifies volatility as a widening of the range between the high and the low price.

 

 

Syntax

ChaikinVolatility(int period)
ChaikinVolatility(IDataSeries input, int period)

 

Returns default value
ChaikinVolatility(int period)[int barsAgo]
ChaikinVolatility(IDataSeries input, int period)[int barsAgo]

 

 

Return Value

double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.

 

 

Parameters

input

Indicator source data (?)

period

Number of bars used in the calculation

 

 

Examples

// Prints the current value of the 20 period Chaikin Volatility
double value = ChaikinVolatility(20)[0];
Print("The current Chaikin Volatility value is " + value.ToString());

 

 

Source Code

You can view this indicator method source code by selecting the menu Tools > Edit NinjaScript > Indicator within the NinjaTrader Control Center window.