Doctrading

The "Keep It Simple and Stupid" strategy

Category: Strategies By: Doctrading Created: April 28, 2016, 8:38 AM
April 28, 2016, 8:38 AM
Strategies
6 Comments
The "Keep It Simple and Stupid" strategy

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

Download
Filename: KISS.itf
Downloads: 322
Doctrading
Doctrading Master
Hello, I'm Marc. Nice to meet you.
Author’s Profile

Comments

davidp13
10 years ago
#

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. 

 

davidp13
10 years ago
#

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.

Andres
10 years ago
#

Uffff, I didn't adjust the different index spreads. With the heavy spread of Italy It's negative too.

Andres
10 years ago
#

Hi,

Without optimize variables and only in the last year:

Bad in Spain & France.

Good in Italy.

;-)

Doctrading
10 years ago
#

Hello,

I didn't test it on other indexes. It was just like the way I traded manually the Dax.

Andres
10 years ago
#

Simple and interesting code, Doc! I have a lot of fear of strategies below 15min TF  :-) , I will trie this.

What about in other index? Is it still positive?

Thanks.

Andrés.

ProRealCode ProRealCode
Loading...