{ Indicator: _StdDevMean Description: Test _StdDevMean function to calculate standard deviation and mean. Author: MarkSanDiego Updated: 9/13/09 } inputs: Price(close), Length(20), { length used to measure average and standard deviation } DataType(1); { = 1 for Variance and standard deviation of entire population; } { = 2 for Variance and standard deviation of sample of population } vars: oMean(0), { average price; oAvg = Average(Price, Length) } oStdDev(0); { standard deviation of price; oSD = StandardDev(Price, Length) } arrays: PriceArray[1000](0); value1 = _StdDevMean(Price, Length, DataType, oMean, oStdDev); plot1(oStdDev, "StdDev"); plot2(oMean, "Mean");