Disparity Index

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Common > System Indicator Methods >

Disparity Index

Previous page Return to chapter overview Next page

Description

The Disparity Index that measures the difference between the price and an exponential moving average. A value greater could suggest bullish momentum, while a value less than zero could suggest bearish momentum.

 

Syntax

DisparityIndex(int period)

DisparityIndex(ISeries<double> input, int period)

 

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

ns


// Prints the current value of a 15 period Disparity Index
double value = DisparityIndex(15)[0];
Print("The current Disparity Index value is " + value.ToString());