Dislikedthere you go:
That's all there is to it. This snippet is from Ehler's "Cybernetic Analysis for Stocks and Futures".Inserted Codeinputs: gamma(0.5) ; Vars: L0(0) , L1(0) , L2(0) , L3(0) , CU(0) , CD(0) , LaguerreRSI(0) ; L0 = (1 - gamma) * close + gamma * LO[1] ; L1 = - gamma * L0 + L0[1] + gamma * L1[1] ; L2 = - gamma * L1 + L1[1] + gamma * L2[1] ; L3 = - gamma * L2 + L2[1] + gamma * L3[1] ; CU = 0 ; Cd = 0 ; if L0 >= L1 then CU = L0 - L1 Else CD = L1 - L0 ; if L1 >= L2 then CU = CU + L1 - L2 Else CD = CD + L2 - L1 ; if L2 >= L3 then CU = CU + L2 - L3 Else CD = CD + L3 - L2 ; if CU + CD <> 0 then LaguerreRSI = CU / (CU + CD) ; Plot1(RSI, "LaguerreRSI" ; Plot2(.85) ; Plot3(.15) ;
I've changed the indicator name to "LaguerreRSI" and adapted the last two plotting statements to the values that Imran is suggesting.
Please note that you have to adapt "gamma" yourself, see first line of code.
Enjoy
OhkaIgnored
Thanks for the code, but ts said " study not verified"
Do you have any idea what I did wrong?
thanks,