Standard Deviation

Standard Deviation

The standard deviation is a measure of dispersion of a data set around its mean. This indicator calculates the same standard deviation as the indicator that comes with the default installation of NinjaTrader. However, it uses a recursive algorithm which performs considerably better on large data sets.

Indicator Description

The standard deviation is calculated from price data over the selected lookback period.

  1. We start with the calculation of the arithmetic mean of the input data.
  2. Then we find out how much the data points deviate from the arithmetic mean and calculate the squared differences.
  3. Next we calculate the variance, which is the arithmetic mean of the squared differences.
  4. Finally the standard deviation is obtained as the square root of the variance.

The indicator calculates the uncorrected sample standard deviation, which is the standard deviation most widely used in trading applications.

The indicator is available for NinjaTrader 8.