TheLark

TheLark: Laguerre PPO

A while ago I posted a more flexible MACD, known as PPO (See that post for details).
Yesterday I had a request by @ChartArt for a Laguerre MACD. Since I favor PPO to MACD, here it is!

Completely untested, and not at all price fit. Play with the numbers and leave a comment if you come up with an interesting combination or idea ;)
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?
study(title = "TheLark Laguerre PPO", overlay=false)

//•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•//   
//                                             //
//           LAGUERRE PPO BY THELARK           //
//                 ~ 7-8-14 ~                 //
//                                             //
//                     •/•                     //
//                                             //
//    https://www.tradingview.com/u/TheLark    //
//                                             //
//•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•//

Short = input(0.4)
Long = input(0.8)
emalen = input(20,title="Length of EMA Smoothing line")
doppo=input(true,title="Show PPO?")
dosig=input(true,title="Show Signal")
dohist=input(true,title="Show Histogram?")

lag(g, p) =>
    L0 = (1 - g)*p+g*nz(L0[1])
    L1 = -g*L0+nz(L0[1])+g*nz(L1[1])
    L2 = -g*L1+nz(L1[1])+g*nz(L2[1])
    L3 = -g*L2+nz(L2[1])+g*nz(L3[1])
    f = (L0 + 2*L1 + 2*L2 + L3)/6
    f
//plots

lmas = lag(Short, hl2)
lmal = lag(Long, hl2)
ppo = ((lmas - lmal)/lmal)*100
emasig = ema(ppo,emalen)

plot(doppo ? ppo : na, color=#0094FF)
plot(dosig ? emasig : na, color=#D26110)
plot(dohist? ppo - emasig :na,color=#FF006E,style=histogram,linewidth=2)