EXPERIMENTAL:
Heiken Ashi swing strategy.
Heiken Ashi swing strategy.
تعليق:
Note: results are curve fitted, the higher timeframe heikken ashi obfuscates the losses.
//@version=2 strategy(title='[STRATEGY][RS]HA Swing V0', shorttitle='RS', overlay=true, pyramiding=0, initial_capital=100000, currency=currency.USD) tf = input('15') trade_size = input(10000) r = heikenashi(tickerid) ro = security(r, tf, open) rc = security(r, tf, close) plot(ro, color=gray) plot(rc, color=black) sel_entry = rc < ro //sel_close = high > ro buy_entry = rc > ro //buy_close = low < ro strategy.entry('sell', long=strategy.short, qty=trade_size, comment='sell', when=sel_entry) //strategy.close('sell', when=sel_close) strategy.entry('buy', long=strategy.long, qty=trade_size, comment='buy', when=buy_entry) //strategy.close('buy', when=buy_close)