Thank you so much for this valuable script. Question: Is the result without repainting? Thanks in advance for the answer. Maybe also an Idea for an Alertcondition statement?
@CryptoLoverGER, according to a recent article on repainting, since the script does not contain a security statement a-la security(..., price, ...), where price is close, hl2, or any other CURRENT value, it does not repaint.
Thank you so much what a wonderfull script. Do you have any idea what indicator combination I can use it with to further improve the signals?
I tried it with oscillators but they give horrible results.
alertcondition(crossup, title='Buy', message='go long')
alertcondition(crossdn, title='Sell', message='go short')
I tried it with oscillators but they give horrible results.
For starters you can try these:
gain = input(.5, "Gain", step=.01)
kahlman(x, g) =>
kf = 0.0
dk = x - nz(kf, x)
smooth = nz(kf,x)+dk*sqrt(g*2)
velo = 0.0
velo := nz(velo,0) + (g*dk)
kf := smooth+velo