# Kama VS HeikinAshi Strategy synapticex

4819 görüntülenme
Simple strategy. It is a combination of Kama , HeikinAshi and ROC .

http://synapticex.com
```//@version=2
//synapticex.com
kamaPeriod = input(8, minval=1)
ROCLength=input(4, minval=1)

kama(length)=>
volatility = sum(abs(close-close[1]), 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[1])+(sc*(hl2-nz(k[1])))

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[0]>kamaEntry[1] and roc[1]<0 and roc >0
sellEntry = kamaEntry[0]<kamaEntry[1] and roc[1]<0 and roc <0

buyExit = kamaEntry<kamaEntry[1] or (roc[1]>0 and roc<0)
sellExit =  kamaEntry>kamaEntry[1] or (roc[1]<0 and roc>0)

strategy.entry("KAMAL", strategy.long, comment="KAMAL")
else

if (sellEntry)
strategy.entry("KAMAS", strategy.short, comment="KAMAS")
else
strategy.close("KAMAS", when=sellExit)
```

## Yorumlar

Hi SynapticEx !

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.

http://mirandole.top/files/images/capture-TV-kama-for-synapticex.png

Best regards,
Mirandole
Cevap Gönder
just fyi, and not a criticism of your work, but any strategy that uses HA isn't tradable because it uses future data. The results of this test speak to this. There are no strategies I've ever seen with an 18x pf. Whenever you get extremely high PF in a backtest, its almost a certainty that the reason is due to using future data that couldn't have been known at the time the supposed signal was hypothetically taken. The way HA bars calculate OHLC requires data that is from the future.