Hello everyone,
I wanted to test a strategy that I used manually in Day Trading on the DAX in graphs 5 minutes.
The problem is that it is not always easy to backtest a manual strategy, particularly it is difficult to determine the slope of the moving averages, the levels of supports / resistances, etc.
So I slightly adapted the parameters for automatic trading.
We have a profit factor of 1.25 (spread included in the backtest) ; in manual trading I am rather at a profit factor of 1.5 (but exit rules are slightly different, on a trailing stop that is difficult to adapt) . I’m quite happy with my backtest that looks pretty close to reality. The strategy is very simple, it is the “KISS”, Keep It Simple and Stupid strategy. It uses only three moving averages, we trade with the trend.
Note that the test is positive in M5 timeframe (but I can only test it on 2,5 years), it is much worse on the upper timeframes.
Defparam cumulateorders = false
Ctime = time > 080000 and time < 180000
MM200 = average[200](close)
MM180 = average[180](close)
MM20 = average[20](close)
// ACHAT
ca1 = MM20 > MM180 and MM180 > MM200
ca2 = MM200 > MM200[1] and MM180 > MM180[1] and MM20 > MM20[1]
ca3 = close crosses over MM20
ca4 = close > open and close > close[2]
ca5 = ADX[14] > 12
IF Ctime and ca1 and ca2 and ca3 and ca4 and ca5 THEN
buy at market
ENDIF
Sell at MM180 stop
// VENTE
cv1 = MM20 < MM180 and MM180 < MM200
cv2 = MM200 < MM200[1] and MM180 < MM180[1] and MM20 < MM20[1]
cv3 = close crosses under MM20
cv4 = close < open and close < close[2]
cv5 = ADX[14] > 12
IF Ctime and cv1 and cv2 and cv3 and cv4 and cv5 THEN
sellshort at market
ENDIF
Exitshort at MM180 stop
// Clôture des positions le soir
IF time = 200000 THEN
sell at market
exitshort at market
ENDIF
You must be logged in to post a comment.
Good day. I know this was posted such a long time ago, but I though rebuilding the system on another platform might just seem worth the while. Testing it on multiple FX pairs, mostly USDJPY, USDCHF, USDCAD, GBPUSD and AUDUSD. Seem to have promise and this is over 5yrs data using 5m, 15m and 1hr timeframe. I did however add a position tracking mechanism. Again I did not write it on PRT.
Hello,
I didn't test it on other indexes. It was just like the way I traded manually the Dax.
Also to note that the one position in my code does not close the other, which as far as I know PRT does not allow hedging or maybe this was just IG stopping hedging.