Heikin Ashi Strategy V2

This is my second Version of Heikin Ashi Strategy.

-Different Time Frame for Fast EMA and Slow EMA
-MACD Filter with own Time Frame

You can tweak around with settings , but defaults gives good results in Forex,Stocks and Index.

I also made an Alert Script
Keluarkan daripada Skrip Pilihan Tambah kepada Skrip Pilihan
//Heikin Ashi Strategy  V2 by breizh29

strategy("Heikin Ashi Strategy  V2",shorttitle="HAS V2",overlay=true,default_qty_value=1000,initial_capital=100000,currency=currency.EUR)
res = input(title="Heikin Ashi Candle Time Frame", type=resolution, defval="60")
hshift = input(1,title="Heikin Ashi Candle Time Frame Shift")
res1 = input(title="Heikin Ashi EMA Time Frame", type=resolution, defval="180")
mhshift = input(0,title="Heikin Ashi EMA Time Frame Shift")
fama = input(1,"Heikin Ashi EMA Period")
test = input(1,"Heikin Ashi EMA Shift")
sloma = input(30,"Slow EMA Period")
slomas = input(1,"Slow EMA Shift")
macdf = input(false,title="With MACD filter")
res2 = input(title="MACD Time Frame", type=resolution, defval="15")
macds = input(1,title="MACD Shift")

//Heikin Ashi Open/Close Price
ha_t = heikinashi(tickerid)
ha_open = security(ha_t, res, open[hshift])
ha_close = security(ha_t, res, close[hshift])
mha_close = security(ha_t, res1, close[mhshift])

[macdLine, signalLine, histLine] = macd(close, 12, 26, 9)
macdl = security(ha_t,res2,macdLine[macds])
macdsl= security(ha_t,res2,signalLine[macds])

//Moving Average
fma = ema(mha_close[test],fama)
sma = ema(ha_close[slomas],sloma)

golong =  crossover(fma,sma) and (macdl > macdsl or macdf == false )
goshort =   crossunder(fma,sma) and (macdl < macdsl or macdf == false )

strategy.entry("Buy",strategy.long,when = golong)
strategy.entry("Sell",strategy.short,when = goshort)

Repaints. Totally worthless.
man your script is magnificent could not be rewritten for version 4, very grateful
Repaints. Totally worthless.
+8 Balas
may you please precise how the "ongoing" fma is calculated?
Let's assume the n-1 period of 180 minutes is ended. We are entering in the new period of 180, which consists of 12 periods of 15 minutes. Plotting the fma on 15 minutes timeframe, I do see it is calculated "ongoing", but I do not understand what "close" and "previus EMA" values it is considering (EMA formula = * (2 / n+1) + previous EMA.)
Hello. Please tell me what settings need to be changed so that the strategy does not repaint the signals?
+8 Balas
Your script shows buy and sell signals at different places, depending upon whether you use Heinkin Ashi or Candles. Should it not give signals at the same place ??
+8 Balas
Your script shows buy and sell signals at different places, depending upon whether you use Heinkin Ashi or Candles. Should it not give signals at the same place ??
There is a bug in this strategy. This strategy is trading by looking at the future closing price.
Example : 24 Mar 16' 22:15, fma is 1.1169. But, fma has a higher value when calculated from open, high, low, close in the past 3 hours.
(this calculation of this strategy includes 25 Mar 16' 00:45)

But you can still get profits.
+6 Balas
Any way we can create a robot in MT4 for this strategy and settings? Would love to run this on multiple currency pairs to see how it pans out even if it re-paints the losses are frequent but they are small but the gains are pretty big.
+8 Balas
It repaints it's useless like the blue sky strategy useless
+11 Balas
Laman Utama Penyaring Saham Penyaring Forex Penyaring Kripto Kalendar Ekonomi Rancangan Bagaimana ia berfungsi Ciri-ciri Carta Harga Peraturan Dalaman Pine Wizards Moderator Laman web dan Penyelesaian Broker Widget Penyelesaian Pencartaan Perpustakaan Pencartaan yang Ringan Pusat Bantuan Rujuk rakan Permintaan Ciri Blog & Berita Twitter
Profil Tetapan Profil Akaun dan Pengebilan Rujuk rakan Tiket Sokongan Saya Pusat Bantuan Idea yang diterbitkan Pengikut Mengikut Mesej Peribadi Sembang Daftar Keluar