Heiken Ashi swing strategy.
Comment: Note: results are curve fitted, the higher timeframe heikken ashi obfuscates the losses.
Remove from Favorite Scripts Add to Favorite Scripts
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)
it tests well, but let it run over time and the numbers go down rapidly...
cristian.d John_Winkelman
it repaints though... ahh
So you confirm my point.
RicardoSantos PRO John_Winkelman
this strategy is meant as a visual guide the reason it fails is due to the uncertainty when shifting direction were the HA(heiken ashi) candle of the higher time frame is not closed and it generates multiple buy/sell signal with the oscilation, altho there is no way around it as entering after close most of the time will be too late and also generate losses, the srategy is meant as a case study and visual helper.
+1 Reply
cristian.d RicardoSantos
Thanks for explanation and for all your work!
A profit factor of above 2 is great, this beyond exceptional. Even the stocks have a PF of 3-5 with this one on 5 minute chart. What would you use as exit position?
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out