How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Feature Request FAQ Help & Wiki Twitter

# super bandpass filter by John Ehlers

1136 1
```//@version=2
//plot by marco
//The Super Passband Filter by John Ehlers
//Buy on the filter crossing above its -RMS line
//Short on the filter crossing below its RMS line
//Exit long when the filter either crosses below its RMS or crosses below -RMS (which signifies a false entry signal)
//Cover short when the filter either crosses above its -RMS or crosses above RMS (which signifies a false entry signal)

study("super bandpass filter",overlay=false)
src=input(close,title="source")
bbs=input(true,"show background colors ?" )
flen=input(40)
slen=input(60)
a1= 5/flen
a2= 5/slen
PB = (a1 - a2) * close + (a2*(1 - a1) - a1 * (1 - a2))* close[1] + ((1 - a1) + (1 - a2))*nz(PB[1])- (1 - a1)* (1 - a2)*nz(PB[2])
RMSa= sum( PB*PB, 50)
RMS= sqrt(RMSa/50)
rms=-RMS
con=crossover(PB,rms) and bbs ?lime: crossunder(PB,RMS) and bbs?red:na
bgcolor(con,transp=80)
plot(PB,title="Pass Band",color=red,linewidth=2)
m=plot(RMS,title="RMS+",color=blue,linewidth=1)
s=plot(rms,title="RMS-",color=lime,linewidth=1)
fill(m,s,color=silver,transp=90)
//sbfa=nz(sbfa[1])*pow((slen-flen)+flen,2)
//sbfma=nz(sbfma[1])+sbfa*(src-nz(sbfma[1]))
//plot(sbfma,color=red,linewidth=2,title=" super bandpass filter MA")```
Thanks for sharing!!!!!!!!!!! It is Great!!!!!!!!!!!
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia

한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter