TradingView
capissimo
27 יולי 2019 14:44

Hull Trend with Kahlman 

Bitcoin / United States DollarCoinbase

תיאור

This is an update to the idea of tradingview.com/script/9FDL1I9W-Hull-Trend/.
The Kahlman smoother makes the signal more precise (by one candle).
תגובות
CryptoLoverGER
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?
capissimo
@cihanoezkaya, 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.

alertcondition(crossup, title='Buy', message='go long')
alertcondition(crossdn, title='Sell', message='go short')
Eff_Hash
@capissimo, Yes, it repaint... Repainting mean change plot history after the candle close. "security" can also not repaint but can cause repaint depending how it is used. Your script repaint each signal because you setup an offset on the buy/sell plots. Each signal are triggered one candle later in the reality.
Hunter-Gatherer
Capissimo, what settings are you supposed to use with the "Gain" function?
capissimo
@Hunter-Gatherer, here's an update. Removed factor 1000.
gain = input(.5, "Gain", step=.01)
kahlman(x, g) =>
kf = 0.0
dk = x - nz(kf[1], x)
smooth = nz(kf[1],x)+dk*sqrt(g*2)
velo = 0.0
velo := nz(velo[1],0) + (g*dk)
kf := smooth+velo
dannithetrader
@capissimo, the kahlman doesnt work with this
Trading402
Great Job Capissimo, Is there any chance you could explain the code from line 10 to 29. Just trying to understand the strategy behind it.
youssefijburg
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.
capissimo
@youssefijburg, welcome to the trial-and-error methodology)
For starters you can try these:
tradingview.com/script/YKl5HwS0-forecasting-least-squares-regression/
tradingview.com/script/eVzMWyqP-candlestick-patterns-strategy-revisited/
tradingview.com/script/tVtxISLu-combo-williams-vix-fix-twin-version/
tradingview.com/script/LDk7bX6z-scaled-normalized-vector-strategy-ver-4-1/ - this one should be adjusted to avoid repainting: change current hlc3 value to the previous hlc3 value in security func.
youssefijburg
@capissimo, Awesome, I will try them, thank you
עוד