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
Remove from Favorite Scripts Add to Favorite Scripts
//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)

can you suggest us settings for daily trading ?
breizh29 vaicru
I 'm actually testing this settings : 1h , 1 , 3h , 0 , 1 , 1 , 60 , MACD Filter off , 15 , 1 on a 15mn Chart
You must use it on a low spread Symbole for better profit. i'm testing it on EURUSD with 2 pips spread.
Works fine so far but a lot of false signals. For less false signals you can turn MACD Filter on , the profit factor will go down but is still nice (between 4 and 8) and you will also catch the big moves later.
Your strategy is good. Does this strategy repaint signals? I tried some strategies in Public library but they are all repainting signals. After sometimes the signal disappears. Kindly let me know.
breizh29 CPTRADER
Yes, it repaints
CPTRADER breizh29
How to trade if it repaints?
+1 Reply
zelibobla CPTRADER
Noway to do this. Just a toy for those who don't trade.
It repaints....the big issue with Trading view strategies
+2 Reply
Hi, very good trading system. Have you this trading system to MT5? Thank's.
Ideas Scripts Chart
United States
United Kingdom
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out