RicardoSantos

[STRATEGY][RS]HA Swing V0

EXPERIMENTAL:
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
//@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)
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?
Reply
it tests well, but let it run over time and the numbers go down rapidly...
Reply
cristian.d John_Winkelman
it repaints though... ahh
Reply
So you confirm my point.
Reply
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!
Reply
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
日本
한국
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