Here is my strategy based on Heikin-Ashi Open/Close price.
Feedbacks are welcome.
Let me know if it repaints, im not sure of this.
//@version=2 strategy("Heikin-Ashi Strategy V1 by breizh29",shorttitle="HAS V1",overlay=true,default_qty_value=1000,initial_capital=100000,currency=currency.EUR) res = input(title="Resolution", type=resolution, defval="180") hshift = input(0,title="Heikin Ashi Shift") fama = input(2,"Heikin Ashi Close Period") sloma = input(30,"EMA Period") slomas = input(1,"EMA Shift") //Heikin Ashi Open/Close Price ha_t = heikinashi(tickerid) ha_open = security(ha_t, res, open) ha_close = security(ha_t, res, close[hshift]) //Moving Average fma = sma(ha_close,fama) sma = ema(close[slomas],sloma) plot(fma,title="MA",color=lime,linewidth=2,style=line) plot(sma,title="SMA",color=red,linewidth=2,style=line) //Strategy golong = crossover(ha_close,ha_open) and crossover(fma,sma) goshort = crossunder(ha_close,ha_open) and crossunder(fma,sma) strategy.entry("Buy",strategy.long,when = golong) strategy.entry("Sell",strategy.short,when = goshort)
It repaints. Anytime you use a higher resolution timeframe, you don't actually know the outcome until the close of that higher timeframe. Maybe it looks one way when you are watching it live but after all is said and done, it could completely change and the strategy tester is only looking back in time after the closes which you cannot know in real time.