Download MetaTrader 5

Diffrent broker, different market :(

To add comments, please log in or register
Did you like the article? Share it with your friends!
zeTrade 2016.06.13 18:55 

Hi all,

I'm new here, I've been trying to write an EA for the last couple months and finally got something working right. the problem is I have two accounts with 2 different brokers: Oanda and ThinkForex.

My EA performs well on Oanda EURUSD, the one I developed and backtested on, but when I run the same test in the ThinkForex account, it's very bad. In fact, the markets look alike but they are very different when looking up close.

I was informed that one can download more reliable data from Dukascopy but I wonder what's the point since obviously that data will be different from Oanda's data and from ThinkForex's data, invalidating my test anyway..

How can I trust my tests then? What do you guys do?

Thanks a lot

ceaser234 2016.06.14 07:52  

How can I trust my tests then? What do you guys do?

You should test your Bot visually and see the working of Bot patiently. And check that is it working same as u code or not if it is not working than there is some wrong logic in your code .

As some one write ::

A program can only do what it's programmed to do, to the letter of the law. Unfortunately, what's written doesn't always

coincide with what the programmer intended the program to do. This principle can be explained with a joke:

A man is walking through the woods, and he finds a magic lamp on the ground. Instinctively, he

picks the lamp up and rubs the side of it with his sleeve, and out pops a genie. The genie thanks

the man for freeing him and offers to grant him three wishes. The man is ecstatic and knows

exactly what he wants.

"First", says the man, "I want a billion dollars."

The genie snaps his fingers, and a briefcase full of money materializes out of thin air.

The man is wide-eyed in amazement and continues, "Next, I want a Ferrari."

The genie snaps his fingers, and a Ferrari appears from a puff of smoke.

The man continues, "Finally, I want to be irresistible to women."

The genie snaps his fingers, and the man turns into a box of chocolates.

Just as the man's final wish was granted based on what he said, rather than what he was thinking, a program will

follow its instructions exactly, and the results aren't always what the programmer intends. Sometimes they can lead to

catastrophic results.

Programmers are human, and sometimes what they write isn't exactly what they mean.

Janek6191 2016.06.14 13:46  
Is your EA using tick data?
zeTrade 2016.06.14 15:09  

Thank you both for your replies!

Ceaser, my code behaves just fine, the problem is that the same market, EURUSD, is different from different brokers. The bar's open high low close's are not the same in each of them.. The question is, should I create a different EA (or just different stop losses / take profit) for each broker to get positive backtests or is this a very bad practice?

Janek, actually I have 2 different EA's, so 2 different strategies, one needs tick data or at least 1h data to back the 4h since the EA runs on the 4h time frame, the other just works fine by assessing the situation at each bar opening.. In either cases, I get different results in the different brokers data :(

graziani 2016.06.14 16:41  

If we assume that there is no adaptation (e.g. 4 digits vs 5) nor coding error (algorithm is coded as intended) then your trading logic/concept is wrong.

It is typical for beginners to fall into a trap to think that a stochastic process can be captured by an analytical expression (formula).

That is what you have done, and after calculating the coefficients in your formula/expression/algorithm, you have just optimized their values to fit the history curve. So the moment that the curve changed in just fragments your concept failed.

You should try to make your program parameter-less wherever possible and try to analyse in a sense of relationships and behaviour. Fixed number can't work in stochastic.

Janek6191 2016.06.14 19:17  

For what it's worth, MT4 tester generates tick data from a function, it doesn't store real, historical values.

Therefore, you can make millions in strategy tester very easily.

Now, why people use TickStory - because it provides them with real tick data. And then, sadly, most tick-based systems fail.

So if one of your EA's use it...

As graziani said above, fitting your sl and tp levels is probably not a good idea.

If it works with sl and tp in one period and you test it on other periods and it still works, then there might be something to it.

whroeder1 2016.06.14 21:22  
zeTrade: should I create a different EA (or just different stop losses / take profit) for each broker to get positive backtests or is this a very bad practice?
If the same code generates very wide results with small changes in the chart (different brokers) then your strategy is unstable. That is bad period.
zeTrade 2016.06.15 12:31  

Thank you so much guys! This is very enlightening!! ..and I'm very screwed :)

I just don't see how to do this :

Grazioani : You should try to make your program parameter-less wherever possible and try to analyse in a sense of relationships and behaviour.

Should I understand by this that the code should rely on indicators like moving averages or rate of change to decide when to get out?

In fact I'm very committed to making EA's for a living and I would love it if someone could point me to a kind of online class or a mentor with which I could bounce ideas with!

Anybody knows anybody? :)

Thanks again!!

graziani 2016.06.17 07:48  

We need to measure things, so we need to use MA to transform PA into a continuous function, so it has sense to look for first derivative to get the info about the direction and slope i.e. ROC if that is how you want to handle it.

However it is not easy to recognize the trend change out of this, neither to recognize if this is just a correction rather then trend change.

Generally, as one is not able to predict the future, you can only try to recognize a trend and to stay in it as long as possible to achieve RRR high as possible: it is not realistic to expect a high number of correct hits in guessing the direction so you need a high RRR to keep positive balance.

You need a exit criteria to keep your winnings, and you can use MA to do this, but try not to fix this to a number but rather use a criteria like e.g. breaking a trend line or  like e.g. when PA moves from the edge of bollinger channel  (std dev)  back to the MA.

And of course it should be clear to you that you wont find a working strategy anywhere on the internet and that it is highly unlikely that someone who really knows will share his knowledge with you without a reason.

zeTrade 2016.06.20 13:37  

Well Graziani, thanks a lot for your help!

That is exactly the kind of coaching I'm looking for in a mentor.. Those guidelines that are not written anywhere in a clear concise form and yet, are key to success.

Is there a way to PM you?

graziani 2016.06.21 01:27  
Well we can continue here, I don't see a reason why not, however if you are not comfortable this way you can use mql5 messaging for start.
To add comments, please log in or register