# CJ HistoricalVolatility Percent indicator # (c) 2009 Carl Jorgensen # # ThinkScript code for Historical Volatility of Price, # based upon ATR # # I usually Hide the fastHV, and only Show then smoothed # 'slowHV' FastHV is each day's price volatility # # declare lower; input price = close; input fastlength = 1; input slowlength = 14; input ATRLength = 14; plot fastHV = 100*((TrueRange(high, close, low))/ (Average(price, fastlength))) ; plot slowHV = 100*((WildersAverage(TrueRange(high, close, low), ATRLength))/ (Average(price, slowlength))) ; fastHV.SetDefaultColor(GetColor(0)); slowHV.SetDefaultColor(GetColor(3));