Hi everyone!
I’m quite new to this, but have been lurking here for a while.
This is a mean reversion trading system made for EUR/USD on the hourly chart that goes both long and short.
If the high touches the upper bollinger band and the stochastic crosses under a fixed value, the system goes short (vice versa for the long side).
Exits are made when stochastics crosser over a fixed value.
I used an ATR for filtering out bad trades.
I found it more efficient to use a trendfilter for the long positions (high > close[300]). For the shorts, no trendfilter is used (this concerns me).
The system seems to perfom good on 100k units – but since I am a rookie I can’t imagine that this will get any good results on a 200k backtest.
Would anyone mind testing it on 200k and post results?
I’m all ears if you have any suggestions for improvement.
// DEFINITION OF CODE PARAMETERS
DEFPARAM CumulateOrders = True
DEFPARAM PRELOADBARS = 500
// CONDITIONS TO ENTER SHORT
indicator1 = Stochastic[14,3](close)
c1 = (indicator1 CROSSES UNDER 85)
indicator2 = BollingerUp[50](high)
c2 = (high >= indicator2)
indicator3 = AverageTrueRange[14](close)
c3 = indicator3 >= (0.00125)
IF c1 AND c2 AND c3 AND NOT SHORTONMARKET THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// CONDITIONS TO EXIT SHORT
indicator4 = Stochastic[14,3](close)
c4 = (indicator4 CROSSES OVER 10)
IF c4 THEN
EXITSHORT AT MARKET
ENDIF
// CONDITIONS TO ENTER LONG
PosTrend = high > close[300]
indicator5 = Stochastic[14,3](close)
c5 = (indicator5 CROSSES OVER 10)
indicator6 = BollingerDown[50](close)
c6 = (low <= indicator6)
indicator7 = AverageTrueRange[14](close)
c7 = indicator7 >= (0.00125)
IF PosTrend AND c5 AND c6 AND c7 AND NOT LONGONMARKET THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// CONDITIONS TO EXIT LONG
indicator8 = Stochastic[14,3](close)
c8 = (indicator8 CROSSES OVER 75)
IF c8 THEN
SELL AT MARKET
ENDIF
//STOP/TARGET
SET STOP PLOSS 150
Prints of results below, tested with spread set to 0.8.
Not as good over 200k. Strategies using Bolinger bands for mean reversion seem to work quite well on a one hour timeframe, I have one of my own.
Also just noticed I didn’t put any spread in.
Thank you for the backtest, really appreciate it!
I mean, it doesnt look as bad if u just start backtest on 200K a little later hehehe.
Im more sceptical of how few trades there are.. 200K backtest and u got like 304 trades.. and this long and short? Seems a bit too curve-fitted. Also numbers are just too high and pretty to be true 😀