Some thoughts on testing and designing EAs

 

I have been testing some of the EAs found here. After some thought, I think most of the EA back tests or forward tests that are given here is not accurate. Why? Because most EAs only open new orders when certain conditions are met but only if there are no existing orders.

That means unless the opened orders are closed, new orders will not be opened even if the certains are met again. This will make the back testing or forward testing inaccurate because the testing will then be dependent on the starting time that you attach the EA to the chart.

In theory, if a trading system is really profitable, you should open new orders every time the system tells you so. You should not restrict the EA from opening new orders just because the previous orders is not closed yet.

So my suggestion to future EA programmers is to code the EA in such a way that new orders will be opened whenever the system tells you so. Do not restrict the EA from opening new orders because of previous opened orders. That way, we can more accurate back test and forward test a EA.

 

no multiple positions

hi

it simply means that no multiple positions should be intiated in the same direction.......

 

But this restriction of not opening multiple orders in the same direction will only distort any back testing or forward testing results because everyone will try the EA at different times and so will have different results.

 
pengie:
But this restriction of not opening multiple orders in the same direction will only distort any back testing or forward testing results because everyone will try the EA at different times and so will have different results.

I may say that sometimes yes and sometimes not.

If orders exits on s/l (t/s) so the common rules that one order at the time per pair or chart. It is the common rules. All the programmers and all the ideas are like this. This common rules exist during the many years already. Because of the risk.

New order will not be opened untill the old one will be closed. Almost all EA is programmed like this. It's the common usefull standard. If programmers are coding like this he will not get any question "why". But if the programmers are coding as you suggested so he will get many question "why" and he will have to explain.

You are right about the time starting.

For example if I am forward testing some EA with EMA cross with exit on s/l (t/s) and if you start the same EA in different time so we will have different results during the one day or several days testing.

But after that our results will be the same. It affects on the first several day testing results only.

I understand that some traders may open 5 or 10 orders within half an hour on the same pair/timeframe but I think it is very risky.

It should be special trading ideas or trading strategies to be developed to do it. We can not implement it to any idea/strategy/EA.

BTW I think your idea is good.

But it should be detalized by indicators, manual testing, should be proven by results and after that it may be programmed.

But I want to say the programmers are coding only. Programmers are translators from English language onto mql4 language. Usually the developer should express the idea, prove the idea, test it manually, many people should join the thread with this idea to make some suggestions, idea should be fully elaborated. And after that only the programmer may translate this idea from English language on to mql4 language using already elaborated idea.

The programmer (any programmer) may code some indicator or EA if it is interesting for him personally or professionally; or if it is interesting for many members of this forum. If it is interesting for one person only I think no one will do anything. Any idea should be developed.

People who expressing the ideas are developers. They are creating the threads with some ideas. People who are coding are programmers.

Anyone can be a developer.

But the programmer will code if the developer already elaborated the idea. It is the common rules for the people to work for free:

- Developer (and other members of this forum) will get EA or indicator as a result of elaboration of the idea.

- Programmer will increase his reputation.

So the people will have indicator/EA, and programmer will keep a good record.

If the progammer is coding the idea which was not elaborated and evaluated so it will affect on his reputation.

If the idea is fully elaborated so the programmers will stand in a queue to code it.

We have many examples on this forum:

First example: Beluck and Alex programmed two EAs (mandarine and mandarine FX) using one idea. Because it was very popular idea and everybody wanted to code it.

Second example: we may look at the BrunoFX threads. He is elaborating his ideas very good and sometimes the coders are standing in a queue to code.

Sometimes the developer and coder is one person.

 

pengie is absolutely right.

for testing a strategy his suggestion is very helpful in a way to indicate, that the strategy is a good one or not.

the reason is simple because we will get more trades to reveal.

real trading is another case. for MM reasons it will be mostly useful to open only one order at time.

but for testing it is very useful to ignore this "only one order" rule.

exceptions to this are EAs that are everytime in the market.

 

For forward and real testing i think it depends on idea and user. Anyway it may be good to have this option in the EA's setiing as true or false. So the users may choose to use it or not.

But I think that many EAs are ok except some EAs with EMA cross and some others.

It should optional.

I know that some EAs (with MA crossing for example) are keeping the orders opened during the many days. So if we implement this idea we will have many sell and buy orders opened in one chart. It should be optional because not everybody will want to use it. As I know some version of Firebird EA is working like this: during the one or two weeks we may get 1,000 pips in profit and for an other one week 1,000 pips losses.

 

And as i know Goldwarrior EA is working like this also. It is profitable in generally but not everybody can use it because it is necessary to have big deposit even if we are trading by 0.01 lot.

It depends on the user and original idea programmed.

 

yes newdigital, it should be optional.

as i said, for real trading it's not useful in most cases.

but for (back)testing you can start with big virtual deposit and let the EA all potential trades out. the summary of trades then should give a better picture of EA's behavior.

maybe for some reason one cannot apply that for some EA.

but in general it's worth to think about.

 

Yes, I agree that my idea is not applicable for all EAs. I just voice out this opinion because I see some recent EAs which do not have stoploss and thus open orders for a long time. From their back testing results, it seems very good but if you think more deeply, they look good not because their indicators system is really good but because if the marking is ranging and if you hold your orders long enough, it is likely that you will see it in profit one day, no matter under what conditions you opened your orders.

 

This is what I always have think. I begin an account with $1000 on Marketiva on the begining of the year and six months later I had $5000 on this account. What I do? Nothing special, I only check trend on all diferent timeframes, and place an order. If the order gos to negative profit I hold it until it becames positive and close it after. But I never put my margin in risk (in fact I put one time and lost $400 in one hour).

I believe that In order to construct the "perfect" EA we need to settle ideas and put in scheme what we want to do. I'm a programmer for all my life, since I was 18 and begin to program fractal interpolation to analise geological prospections.

What we need is a scheleton for this EA with all diferent parts selected and then analise it performance alone.

I do not programme on MQ4 so I can draw a flowchart and if anyone interested we can begin something

roger