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