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
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
You must be logged in to post a comment.
@nicola onestamente non ricordo se lo avessi scelto anchored or ananchored.
Ciao Francesco, il Ts HANG SENG è stato settato con il metodo WalK Forward ? Ancorato o non ancorato ? Grazie
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
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. :)
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, no. it means theat it calculates the average true range on the close and then divide by the close. So it is never 1.
Is this strategy standing for DAX please?