Code of the indicator can be found here: http://www.prorealcode.com/prorealtime-indicators/super-bandpass-filter-john-ehlers/
(it’s passband…not bandpass!)
Indicator
// parameters
flen = 40 //fast length
slen = 60 //slow length
if barindex>slen then
a1= 5/flen
a2= 5/slen
PB = (a1 - a2) * close + (a2*(1 - a1) - a1 * (1 - a2))* close[1] + ((1 - a1) + (1 - a2))*(PB[1])- (1 - a1)* (1 - a2)*(PB[2])
RMSa = summation[50](PB*PB)
RMSplus = sqrt(RMSa/50)
RMSminus = -RMSplus
endif
RETURN PB as "Pass band filter", RMSplus as "RMS+", RMSminus as "RMS-"
Trading system
// TASC, Stocks& Commodities, July 2016
//p1 = period 1, default p = 40
DEFPARAM CUMULATEORDERS = false
// p2 = period 2, default p = 60
// parameters
flen = p1 //fast length
slen = p2 //slow length
if barindex>slen then
a1= 5/flen
a2= 5/slen
PB = (a1 - a2) * close + (a2*(1 - a1) - a1 * (1 - a2))* close[1] + ((1 - a1) + (1 - a2))*(PB[1])- (1 - a1)* (1 - a2)*(PB[2])
p3 = (p1+p2)/2
RMSa = summation[p3](PB*PB)
RMSplus = sqrt(RMSa/p3)
RMSminus = -RMSplus
endif
// Enry conditions
c1= (pb crosses over rmsminus)
c2= (pb crosses under rmsplus)
//multiplo, per sensibilità indicatori
// n : da 1 a 6 passo 1
m = n * p2/p1
pbx = pb/pb[5]-1
//pbx è la variazione percentuale del pb, che per la chiusura non dev'essere avversa oltre ad una certa soglia
c3 = (pbx < m )
c4 = (pbx > m)
if not longonmarket and c1 then
buy 20000 cash at highest[2](high) limit
elsif not shortonmarket and c2 then
sellshort 20000 cash at lowest[2](low) limit
endif
//condizioni di chiusura
if longonmarket and c3 then
sell at market
elsif shortonmarket and c4 then
exitshort at market
endif
// money management
pr = 1.5*n*lo
set stop %loss lo
set target %profit pr
GOOD RESULTS ON DAILY BASIS
few but good operations
LYXOR FTSEMIB LEVERAGE 2
However, nothing that a normal gestion of up and downs cannot beat (buy low and the sell high..
just see the indexes' level)