In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
//@version=2 //synapticex.com kamaPeriod = input(8, minval=1) ROCLength=input(4, minval=1) kama(length)=> volatility = sum(abs(close-close), length) change = abs(close-close[length-1]) er = iff(volatility != 0, change/volatility, 0) sc = pow((er*(0.666666-0.064516))+0.064516, 2) k = nz(k)+(sc*(hl2-nz(k))) kamaEntry = security(tickerid,period,kama(kamaPeriod)) plot(kamaEntry, color=gray, title="Kama",transp=0, trackprice=false, style=line) roc = roc(close, ROCLength) strategy("Kama VS HeikinAshi", overlay=true, pyramiding=0, calc_on_every_tick=true, calc_on_order_fills=true) buyEntry = kamaEntry>kamaEntry and roc<0 and roc >0 sellEntry = kamaEntry<kamaEntry and roc<0 and roc <0 buyExit = kamaEntry<kamaEntry or (roc>0 and roc<0) sellExit = kamaEntry>kamaEntry or (roc<0 and roc>0) if (buyEntry) strategy.entry("KAMAL", strategy.long, comment="KAMAL") else strategy.close("KAMAL", when=buyExit) if (sellEntry) strategy.entry("KAMAS", strategy.short, comment="KAMAS") else strategy.close("KAMAS", when=sellExit)
Thank you very much again for your script. It looks very profitable. But I'd like to know how to manage fake signals. I mean, on the image below, you'll see, on 1W chart that I have an exit signal that closed my trade but the week hasn't ended yet. So it could change until the end of the week.
reference - http://ninjatrader.com/support/forum/showthread.php?t=21977
You can try to do a forward test on live data using 1h/15m/5m charts. The entry doesn't have to be on the close of the current bar, even if I did use the "close" source I was thinking about the actual price.
I think it is better than the moving average cross or just than playing hashi by itself. Trading it manually could be the right compromise, so you can choose the signals based on your sentiment but always following the current momentum and direction.