Backtesting/Optimization - page 84

 

Problems with my tester

Hi,

I am getting the following messages from my strategy tester:

"There were 134 passes done during optimization

...: optimization stopped, 954 cache records where used, 954 cache records rejected"

Unter the green running time line below the main few windows is

1 088 / 1 280 (39 204) written.

And the tester did only 134 runs.

How can I adjust my tester to make more runs??

 

Price history

Hello I have coded an EA that uses H4 and D1 charts on the eurusd. I want to backtest it from 2002-2012. I have increased my bars history and bars chart to 1000000 in MT4 options, and following this downloaded price history. I ran the backtest again specifying dates 2002-2012 however it still only starts from Jan 2009. What am I doing wrong? I want to backtest it further than 3 years. I can see I have sufficient bars on my chart because I can view price data preceding 2002. Any ideas?

 

Backtesting 5 digit adapted EA's

Hello everyone, I have a couple EA's that have been adapted to 5 digits but their back testing performance does not match the original EA's. Is it that 5 digit EA's can not be back tested? When using a pip ratio of 1 instead of 10, they still do not match the original performance. Anyone can shed some light in regards to this?

 

...

Usually the difference is not coming from the 4 or 5 digit data but from the EA itself (sample results being curve fited for example and then when you try the EA with default settings you get completely different result)

But, if the parameters are the same, then there is still some "leftover" in the EA that should be checked and corrected (assuming that the difference in the different broker data can not cause too big a difference)

elitecamper:
Hello everyone, I have a couple EA's that have been adapted to 5 digits but their back testing performance does not match the original EA's. Is it that 5 digit EA's can not be back tested? When using a pip ratio of 1 instead of 10, they still do not match the original performance. Anyone can shed some light in regards to this?
 

...

Thanks, Mladen I will check the EA then. Hopefully I can find the culprit.

 

Tester - open prices test method

Hi, I wanted to test my manual strategy based on VQ indicator. When I set "Only open prices..." (I would like to trade manually after bar close) as test model I get strange results - see screenshots and code below.

The questions are:

1) why am I not see right (non-zero) index buffer values (they are filled in other test methods) and why red bar at 06:45 has positive value?

2) where is not way to program EA to act right after bar close, right?

Thanks for your help.

Files:
open.png  124 kb
vqhisto.mq4  4 kb
 

...

There is one more problem at that chart :

If only open prices were used, since the bar size is calculated as high-low, those values could not be there on bar open (those are completely wrong values if they are taken on a bar open). So, the "Only open prices" does not mean what it seems to mean ... my guess is that it is the cause of your problems

mati_temp:
Hi, I wanted to test my manual strategy based on VQ indicator. When I set "Only open prices..." (I would like to trade manually after bar close) as test model I get strange results - see screenshots and code below.

The questions are:

1) why am I not see right (non-zero) index buffer values (they are filled in other test methods) and why red bar at 06:45 has positive value?

2) where is not way to program EA to act right after bar close, right?

Thanks for your help.
 

thanks

thanks mladen for clarification

 

thanks for you sharing

 
mati_temp:
Hi, I wanted to test my manual strategy based on VQ indicator. When I set "Only open prices..." (I would like to trade manually after bar close) as test model I get strange results - see screenshots and code below.

The questions are:

1) why am I not see right (non-zero) index buffer values (they are filled in other test methods) and why red bar at 06:45 has positive value?

2) where is not way to program EA to act right after bar close, right?

Thanks for your help.

Open prices is a good method of testing - fastest one

To use it properly EA needs to be adjusted correctly to work as you wrote "on closed bars".

For example if you are using High[0] - Low[0] to define range of current candle

you should not use open prices model, because in reality when you check all conditions

at bar open only then you don't know what will be final high or low of current candle.

At the begining all prices are equal to open (high = open, low = open, close = open).

So to use it properly you need to accept some delay (one bar delay) and recode EA to use

past bar for calculations High and Low (High [1] instead [0]).

Of course there can be other things checked at open.

Lets say that you will trade like that :

if prior bar range > 100 and open > ma and prior open < ma we trade long

This model will work perfectly with open prices only backtest.

But you need to count range on prior bars like High[1]-Low[1] and check other conditions

at current bar for example ma[0] open[1] .

Some will say : why to use MA values from current bar if it is not closed,

and if you will count values of moving average from close price or typical price then

it will change value till bar end. Of course I agree, but in this way (if you check Ma only

at open) you will be checking MA like it would be on closed bars.

And final word:

ea needs to have one more thing. If you are using open prices model for bactest

then you need to simulate same thing in ea. So it may execute start function

only ONCE at bar start.

The best way to do this is to define after start function begining something like that:

int start()

{

//----

static int newBar = 0;

if(Bars<=newBar)return;

newBar = Bars;

SOME OTHER LOGIC OF START FUNCTION (TRADING, MOVING STOP ETC)

//----

return(0);

}