To use chat, please login.
Back to contacts
Slavo (salmas64)
Jul 28 2010 at 07:04
5 poster
Hello programmers,

I'm newbie with programming EA.

I'm using my own EA and Ive made test to run same EA with same setting on few different brokers demo accounts.

EA on 2 brokers runs very similar in profit but on another 2 brokers runs completely different and to my surprise got 2 negative results and totally different. I've started them in same time on same balance and as far I know spreads are very similar on tested brokers.

Can anyone experienced advise me, what could cause this differences? That exactly same EA on same conditions with different broker gives completely opposite results?

My EA uses OrderProfit()+OrderSwap() functions to determine profit for each trade. Is it possible that different brokers can 'trick' EA and give different results?

1. Broker Feeds?
2. Broker Spread?
3. Broker native currency?
4. Account currency?

regards,
Slavo



Elkart (Elkart)
Jul 28 2010 at 07:49
941 poster
For starters I know for a fact the back office of MT4 can and I quote ' make life difficult for you'.

At the very least a broker can influence the volatility of your feed. But is suspect it goes a lot further than that. Remember the average MT4 broker budgets on your failure. If you don't fail they will help you along a little....

Are there any time functions in your EA? For example if you use pivots, each broker going to give you a different value. Also indicators that are volume based will be inaccurate as every broker will give you a different volume reading.

In Mt4 the volume is in fact tick volume for that broker and has nothing to do with actual volume traded.

So there's a just a few reasons. I can think of a dozen more.....

Steve B (stevetrade)
Jul 28 2010 at 08:12
1408 poster
Yep, I would need to know more about the way your EA works. However if it's scalping or has tight stops then you could expect very different results. Spreads and prices around news events can vary considerably between different brokers. They might be requoting you or throwing you old tick messages. Could be any number of reasons to be honest, depending on how the EA works.

11:15, restate my assumptions: 1. Mathematics is the language of nature. 2. Everything around us can be represented and understood through numbers. 3. If you graph these numbers, patterns emerge. Therefore: There are patterns everywhere in nature.
kennyhubbard (compuforexpamm)
Jul 28 2010 at 08:14
265 poster
Apart from that, I have one more word for you..........FILLS.

I have seen the same broker, running the same EA on 2 live accounts from the same VPS have different results.

Unfortunately a broker does not operate on the WYSIWYG(what you see is what you get) priciple like a good computer program, nor is it like a supermarket where you can just pick up any quantity of produce at the displayed price like the next shopper.

I always think of it as a big sign outside a store that says 'Price 1.64.....while stocks last'. This means that if I pick up an order, 1 ms(yup 1 thousandth of a second) before you do, you get whats left, not what you ordered.

Wealth Creation Through Technology
Elkart (Elkart)
Jul 28 2010 at 08:16
941 poster
Kenny,

You sell it back then during the next 1 ms?

kennyhubbard (compuforexpamm)
Jul 28 2010 at 08:36
265 poster
Ya boet, I run off cheap computers that can't do that, but I like the way you think. No wonder banks will spend millions to shave 1 ms off their latency.


Wealth Creation Through Technology
Slavo (salmas64)
Jul 28 2010 at 09:19
5 poster
Thanks for ideas. Hmm.... it seems to the world of MT4 is less ideal that I thought 😕

My EA works on idea of martingale system, but if case of larger movement of the market it opens hedges for some trades to protect equity. EA calculates combined profit for all opened BUY and SELL positions and if reaches 'Target combined $ profit' or 'Target Stop loss $ profit' closes all trades immediately with minimal slippage as possible.

EA calculates profit for each trade the way ( OrderProfit()+OrderSwap() ) so I believe this should be independent from broker's feeds. And big differences on balance I'm getting after closing those trades on some broker getting negative trend. 😞

Example: EA has open 30 trades (buys and sells) of size 0.01 lot and current combined profit is +$20.00.

After closing all 30 trades getting differences on closed trades:
Broker 1 = +$18.30
Broker 2 = +$17.80
Broker 3 = +$12.20
Broker 4 = -$2.20

I don't think that this is caused by slippage and different spread. That would be too high and I think EA calculates somehow differently on each broker the 'Combined profit' or is idea of combining trades bad way of trading? This is still on demo accounts, now I can imagine how it would be worse on real accounts.

Actually I'm not sure what is the real unit for OrderProfit() is it in traded currency, deposit currency or broker currency? See attached definition from MQL4 help, it's not quite clear to me.




Bifogade filer:


Elkart (Elkart)
Jul 28 2010 at 09:22
941 poster
Ya boet hey Kenny?

I put that into google translator and it tuned me you're a rock ek se....

kennyhubbard (compuforexpamm)
Jul 28 2010 at 09:57
265 poster
Ya, nee, I'm a yaapie, but at least from the right side of the railway tracks.........

Slavo,

If you are closing 30 orders, I am not surprised you are getting slippage and spread changes. You say that your EA closes all trades with minimal slippage.....care to elaborate on how it does that? As far as I know you cannot control slippage. Perhaps you should get your EA to record the Bid/Ask and then calculate your total slippage.......I think it may be an eye opener. And, yeah, I think you may have come across the fact that not all brokers are the same.

OrderProfit() is in deposit currency. It is the number that you see in the Profit column of the terminal.

Wealth Creation Through Technology
Steve B (stevetrade)
Jul 28 2010 at 10:19
1408 poster
Indeed, as MT4 EA's can only handle one thread with the broker at any one time you're going to be getting new prices all the time while your stack of orders closes. You might want to think about running separate MT4 instances for separate pairs in order to reduce this problem. Not sure how that would work out with your strategy but it's something you may want to consider.

11:15, restate my assumptions: 1. Mathematics is the language of nature. 2. Everything around us can be represented and understood through numbers. 3. If you graph these numbers, patterns emerge. Therefore: There are patterns everywhere in nature.
Vänligen logga in för att kommentera.