Price Spike
study(title='GR_AugenStandardDevPlot') //GR_AugenStandardDevPlot// //Tom Utley 3-17-2009 //Thanks to Jeff Augen //Price Spikes in Standard Deviations length = 20 closeLog = log (close[1] / close[2]) SDev = stdev(closeLog,length) * sqrt(length / (length-1)) m = SDev * close[1] spike = (close[0]-close[1]) / m plot (spike, style = linebr, color = close > close[1] ? green : red)