There is a lot of indicators similar to this one, however i think this one don’t share the same calculation method and this is why i share it. This indicator aim to forecast price direction using an exponential filter architecture using highest and lowest information for the estimation of a smoothing variable. This filter is similar to the average Max-Min filter.
In the code a is equal to 1 when the price is greater or lower than any past price over length period, else a is equal to 0. The center parameter control the filtering degree of the output, when center is equal to 1 and a = 1 the indicator return the highest or lowest depending on market current trend, when center is superior to 1 the output will be smoother, however the reactivity of the indicator will still depend on the length parameter.
A color option show you the trend of the market, however the generated signals are the same that can be generated from a Donchian channel.
When highest is greater than previous highest the indicator direction will move upward, else if lowest is lower than previous lowest the indicator direction will move downward. Therefore the indicator can give information on the Donchian channels direction and provide a nice filter.
(description above is from the original author alexgrover, all credits go to him).
//PRC_Trend Impulse Filter | indicator
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted from Pinescript code (author:alexgrover)
// --- settings
length = 100
center = 1
arrows = 1 // Plot Arrows 0=false ; 1=true
// --- end of settings
once b = src
if barindex>length then
src = (highest[length](high)+lowest[length](low))/2
rising = src-src[length]>0
falling = src-src[length]<0
a = rising or falling
b = exponentialaverage[center](a*src+(1-a)*b)
if b>b then
elsif b<b then
if os <> os and arrows then
if os>0 then
return b coloured(cr,cg,cb) style(line,3) as "Trend Impulse Filter"
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.ProRealTime ITF files and other attachments :