Share your backtests :)

 

Hi all! I thought I would share a back test of my best strategy. I wish to see your best back tests here so feel free to show it off because I know you want to. ;)



Strategy: Support & Resistance; (uses only open prices so ran "open prices only" modelling quality. Same result as Every tick.)

2003.01.01-2012.06.01.

Currency Pair: EURUSD.

Time frame: H1.

Lots: Uses 0.10 (ten cent lots) all the way up to final result.

Deposit: $1000.0.

Result: $9608.93.

Thank you!

 

Hi!

The simplest thing in the world to create very nice in-sample equity curves. But try to get the some performance during an out-of-sample backtest, let's say on the newest 30 percent of the bars. In-sample backtest means nothing. Really nothing. Let me show what a simple thingis to make a nice equity curve:

I made this curve within the last half hour to paste it here (data mining methods and tools were ready).

EurUsd, 5 minutes, from 2003 to 2012.01.01, with fixed 0.1 lot, stops are 20 pips (+/- spread), maximum simultaneously open orders are only one.

Random sample size is about 12 percent of all candles (about 78000 candles), this amount of data was used for generating these (good-for-nothing) strategies.


Backtest it in 2012, and you will see it cannot make profit.

Code is to be applied for backtesting only.

Moderator edit : the code below is NOT de-compiled code. Please refer to several comments below. RaptorUK and phi.nuts (both are moderator to mql4.com) has clarify that the code is not de-compiled

Files:
 
Along with equity curve, if you can post trading strategy as well, that would be nice...
 
Thanks for sharing your back test LordofTheMoney. You are right that it can be simple to create a "curve fitted" back test. I will say that the strategy I posted was created using support and resistance strategy that can be used on any time frame because support and resistance applies to all time frames. It was not written using the optimization tool in back tester to curve fit. Obviously I wouldn't feel confident running the strategy on a live account yet even though it can be run on other time frames such as m15,m30 and h4 with decent results. I actually found it when going through all the strategies that I have written over two years and this popped up :). I do believe that it could be run on live account if I plowed all my power into money management for it. I was just surprised that I had such a promising strategy amongst all my work. I do not think I will be running it live as of yet. Thanks again for posting!
 

dineshydv: i posted the code, but i am sorry, i hurried too much with it, so it may contain some more errors (even now, after the second modification too).

WhooDoo22: There is no need to say thanks, because it was my pleasure. Otherwise you are welcomed.

 
WhooDoo22:
Thanks for sharing your back test LordofTheMoney. You are right that it can be simple to create a "curve fitted" back test. I will say that the strategy I posted was created using support and resistance strategy that can be used on any time frame because support and resistance applies to all time frames. It was not written using the optimization tool in back tester to curve fit. Obviously I wouldn't feel confident running the strategy on a live account yet even though it can be run on other time frames such as m15,m30 and h4 with decent results. I actually found it when going through all the strategies that I have written over two years and this popped up :). I do believe that it could be run on live account if I plowed all my power into money management for it. I was just surprised that I had such a promising strategy amongst all my work. I do not think I will be running it live as of yet. Thanks again for posting!


Try out some time in demo with other programs also to see if it is only managing own trades and to look at journal to messages for some bugs

not show up with strategy tester

 
LordoftheMoney:


Code is to be applied for backtesting only.

* picture and code now edited

Why are you posting Decompiled code ?
 
RaptorUK:
Why are you posting Decompiled code ?

This code is not decompiled. Why do you think that? I made it right before posting.
 
LordoftheMoney:
This code is not decompiled. Why do you think that? I made it right before posting.
OK, my mistake, at first glance it looks like decompiled code . . . all the dxx variable names.
 

No problem. It would be harder to generate the tree without pre-defining the indicator values some way like that.

 
Hard to Read
Avoid roundoff where both IFs are false
if(d67 < 9.5){x=1.81;y=52;index=1591;}
if(d67 >= 9.5){
  if(d25 < 49.5){x=1.12;y=17;index=1592;}
  if(d25 >= 49.5){x=1.71;y=17;index=1593;}
}
if(d67 < 9.5){      x=1.81;y=52;index=1591;}
else if(d25 < 49.5){x=1.12;y=17;index=1592;}
else{               x=1.71;y=17;index=1593;}
Reason: