This HangSeng automatic trading strategy on the 1-hour timeframe, uses basic overbought and oversold RSI areas to open new orders and filtered with an average true range volatility filter.
Results attached are from walk forward analysis with 1 OOS period proving robustness of the optimized variables. Variables to be optimized are also described in one of the attached picture.
Discussions about the strategy are running here: Hang seng trend following strategy with volatility filter H1 Time zone : UK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
defparam cumulateorders = false periodrsi = 8 periodatr = 16 a = 30 b = 0.15 timeok = time>20000 and time<120000 oscillator = rsi[periodrsi](close) volindic = (averagetruerange[periodatr](close)/close)*100 oversold = oscillator<a and volindic>b and timeok overbought =oscillator>100-a and volindic>b and timeok if oversold then sellshort 1 contract at market endif if overbought then buy 1 contract at market endif set target pprofit 200 set stop ploss 150 |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hi Francisco,
I love the Hangseng for is Volatility and you right to filtering with ATR.
But in volindic you write (close)/close) It will always be =1 . mistake ? Missing [1] or something else ?
Hi, no. it means theat it calculates the average true range on the close and then divide by the close. So it is never 1.
I graphed volindic with: (averagetruerange[periodatr](close)/close)*100 and ((averagetruerange[periodatr](close))/close)*100 . Addind parenthesis doesn’t change anything, Proorder propaly read the code. In a second time, I checked you code on the Dow and it’s almost good, just have to addap the range of the WF to find the good optimisation. So, It’s a simple code but efficient, nice job and thanks for sharing
Hi Francesco,
Seems to work better with tighter stop loss and a trailing stop.
Will run this in demo. Thanks for sharing!
Hi Francesco,
Thanks for your sharing. I am not so familiar with programming, however, I tried to paste the code in Multicharts and error message popped up.
—— Compiled with error(s): ——
syntax error, unexpected ‘identificator’
line 1, column 9
Possible that I can test this code in Multicharts?
Thanks for your time. 🙂
Multicharts? why? Our website is dedicated to programming for ProRealTime: https://www.prorealtime.com
Hi Nicolas, great and thanks for letting me know. 🙂
Thanks for the strategy.
I have tried your strategy on the DAX for a time frame of 10 minutes, 150.000 bars, give a few trades, too few to say if the profits are robust over time.
I will vary and simulate the RSI- and ATR-periods for long and short trades separately. Also I will vary with the trading time, standard it is 24 hrs, maybe it fits better with trading time between 7:00 till 22:00.
Thanks again for the strategy. KR JvdW
Ciao Francesco, il Ts HANG SENG è stato settato con il metodo WalK Forward ? Ancorato o non ancorato ?
Grazie
@nicola onestamente non ricordo se lo avessi scelto anchored or ananchored.
Is this strategy standing for DAX please?
Title says that it is for Hang Seng