Another new channel indicator made of price differences (high or low) from a moving average (40 periods EMA) and ponderate by the recent average true range (14 periods).
The result of this calculation is then smoothed by another Exponential Moving Average of 3 periods. This is the “center” of the band. The upper and lower bands are calculated with the standard deviation 200 periods from this center value (smoothed with another 40 EMA beforehand).
The indicator act as an oscillator with dynamic overbought and oversold areas, that could be used as potential reversal zones or breakout ones to trade in the same direction.
This code come from a Kirk Northington’s book.
Coded by a request on the Italian forum, translated from a Metastock formula.
//PRC_TTI ATR Extreme | indicator
//19.04.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
atr=(averagetruerange[14]/Close)
if close<exponentialaverage[40] then
x = (((Low - average[40,1](low))/Close)*100)*(ATR*100)
else
x = (((High - average[40,1](high))/Close)*100)*(ATR*100)
endif
avg = average[40,1](x)
dev = std[200](x)
upperband = avg+dev
center = average[3](x)
lowerband = avg-dev
return upperband coloured(0,139,69) style(dottedline,1) as "upper band", center style(line,2) as "center line", lowerband coloured(220,20,60) style(dottedline,1) as "lower band"
Dear Nicolas,
Great work, thank you very much!
I would love to use the indicator in ProScreener. However, regardless of the stock list I choose, PRT does not come up with any values (even though the condition should be met).
This is the code of the ProScreener (created by using the ProScreener assistant) - really simple in order to exclude any other potential sources of error:
ignored, indicator1, ignored = CALL "PRC_TTI ATR Extreme"(close)
c1 = (indicator1 > indicator1[1])
SCREENER[c1]
Do you (or anyone else) have any idea why ProScreener does not seem to filter out any stock?
Thank you very much in advance!!