MB Trading MetaTrader latency

Discussion in 'Automated Trading' started by FutureScalper, Dec 29, 2010.

  1. I'm measuring latencies of about 1.5 seconds on OrderSend operations from within a MetaTrader 4 EA.

    Code is typically like this:
          int startOrderTimestamp = GetTickCount();
          int elapsed = 0;
          ticket = OrderSend(Symbol(), OP_BUY, 
                volLots, // lotsize to buy
                Ask, // buy to refreshed ask
                1000, // slippage
                0, // stop loss
                0, // take profit
          elapsed = GetTickCount() - startOrderTimestamp; 
    This is rather bad performance. However, there's the possibility they have a faster server hidden somewhere.

    Anyway, what latencies does anyone else see with MB?

    This is EUR/USD on a highly tuned system with a 50 msec ping latency.
  2. Any MB Trading MetaTrader users out there who know their order execution latencies from within an EA ? Market Orders to keep it simple. EUR/USD currency pair.

    MB Trading's offering is Non-Dealing Desk, STP processing to ECN variable pricing spreads with commission... so we have to compare amongst Apples please... Not interested in dealing desk performance with fixed spreads.

    After working with them for a while, it appears their MT4 performance averages about 1.5 secs for Market Order fills. During volatile markets I've measured out to 18 secs. Clearly unacceptable. I have to have latencies below 500 msecs and better consistency.

    They have very good customer service, hands down. But this performance issue with MT4 is spoiling the deal for me, unless it can be improved and there is no firm commitment to improving performance that I can discern. In fact, I was told by one tekkie that it was not going to change.

    Generally, their explanations are twofold: 1) There is a FIX bridge behind MetaTrader and, 2) The ECN gets "crossed" BID/ASK and that makes trading impossible for short periods of time. My view is that the FIX messages are NOT being sent immediately, but their FIX bridge is "polling" periodically and that explains both the variabilities and delays in most cases.

    I have 2 alternatives. Use their FIX connectivity (losing the convenience of MetaTrader) and maybe get those times down to 300 msecs, or find another broker if they can't improve this performance with their MetaTrader FIX bridge implementation.

    Anybody else have experience with their MT4 (STP, ECN) performance?

    I really like MB Trading's offering because trades are permitted down to the Micro level if desired. Most other brokers are at the Mini level as their smallest lot size.
  3. You are better off just using their demo MT4 for charting ( & have Alpari U.S demo as backup), and conducting order executions thru MBT Desktop.
  4. Well, thanks for the info, but considerable effort has already been expended on a MetaTrader-based solution. This is an automated execution system, so the alternative is to dig into their API and that's as much trouble as a FIX connection.

    MetaTrader does socket communications to the Order Entry client, so there's bidirectional status communications, and I don't want to recreate all of that.

    They have very good customer service, but this may be a technical problem they are unable or unwilling to fix, their MetaTrader implementation, that is.

    Thanks for your suggestion.
  5. From my experience it seems the MT4 latency problem has a bit to do with the broker not willing to work with the developers of MT4 to come up with a more efficient/faster system for ECN orders. Remember that MT4 was originally meant to be used with a dealing desk which adds god awful amts of latency. I think for now you are stuck with what is offered to you, good luck.

    ** Yeah, 18 sec even during volatile market conditions is kinda nuts; should be no more than 6-10(in my opinion)
  6. southbeach4me,

    Thanks so much. I'm beginning to piece together the true picture. One tekkie said MetaTrader was a "shell" on top of their API. I'm beginning to think they start a "shell script" on their server for each order request, and the setting up and tearing down of connections is what is really going on here.

    But, like I said, I have access to their support engineers, and am telling them that this could be a showstopper for me.

    Once I figure out exactly what the delay problem is, I can either do a FIX connection and ditch MetaTrader which I am very reluctant to do, although I have a fancy client which could do the direct FIX connections.

    I did some investigation and a Market Order type of FIX connection can use only a small subset of what would be required for a comprehensive FIX solution.

    Anyway, I have been told by their engineers that FIX execution times from another client doing something similar were in the 300 msec range, and I believe that's achievable or maybe better.

    I'll keep pushing it with MB Trading. They are truly cooperative and knowledgeable, but as to whether we can get decent execution times, I just don't know right now.

    Thanks !! Anybody else who knows how MetaTrader to FIX bridges are typically implemented, I'd like to hear about it from a performance and reliability standpoint.
  7. Just an update on this issue. No way will the MetaTrader be fast enough, it appears.

    So, I wrote a full-blown C# multi-threaded client using their SDK/API and am interfacing with my main trading platform via this hosted API client.

    Now I have much more flexibility and have abandoned MetaTrader.

    I have put pressure on them to review the MetaTrader implementation, but it is no longer a concern for me.

    Instead of writing comms stuff in an EA, which I did, using a C# client (very similar to Java's capabilities) was my solution.

    I hasten to add that MB Trading's support and high level technical folks are VERY helpful. No doubt about it, but they could not resolve my performance issue.

    Part of the performance issue is related to the STP/ECN nature of MB Trading's Forex order processing. They go out to some <speculation_alert> interbank market to get fills and sometimes this introduces delays.

    However, apparently they are on the forefront of organizing the liquidity providers around better trading standards, etc., and have just recently started paying for limit orders placed on their systems, in order to increase liquidity.

    So MB Trading is a FIRST CLASS organization, and I would recommend it to anyone. The MetaTrader, however, is more of a secondary consideration for them, however, and I believe their implementation could be improved.

    So, I am very happy with MB all-round, with the exception of this MetaTrader performance issue.

  8. this probably won't be much use but Oanda's FXTrade has virtually instant execution
    compared with MT's 'seconds' - at least when entering trades manually

    Oanda's API:
    "OANDA charges an initial licensing fee of USD $600, which entitles the customer
    to two free months of access to one API library for testing and implementation.
    After these two months, a monthly fee applies. The monthly fee is USD $600
    discounted by USD $50 for every USD $1M in monthly volume of currency traded
    from the account.
    Note that customers with accounts exceeding USD $12M in volume in a month are
    entitled to free usage of the API for the next month."
  9. Interesting. I don't know much, but if a Dealing Desk is in between, then they can execute instantaneously, since I guess they'll turn around and get a better price from the interbank market.

    So one has to compare like to like. MB Trading's "FIX guy" claims that delays can happen because the counterparty isn't set to "auto fill" for some reason or other.

    He was explaining to me how DD executions tend to be fast, but you're not getting a "market price".

    Yes, Forex is the "wild west", I guess... :)
  10. Just for closure on this, I used MB Trading's API and was able to get execution times down in the 800-1000 msec range for Forex.

    This was an improvement, and I've communicated my opinion that execution latencies should be improved.

    That doesn't make me popular with MB Trading, but I think it's a perfectly reasonable request for Forex execution latencies to be under 500 msecs.

    Again, I understand that they use STP/ECN execution, but sometimes I should hit their ECN and matching should be fast.

    Anyway, I've debated this with them to the point where I have to accept execution times will be in the 1 second range, and maybe slightly better.

    However, let me not that using their API "burns" up an allocated login, and so this also became an issue for me. Their Navigator / Desktop platform cannot be used concurrently with API access. Yes, you can request an additional login, but it is rather awkward, and so these restrictions have been disappointing to me.

    With all due respect to MB Trading's technical staff, I guess I just ask too many questions :)

    Just for closure on this topic.
    #10     Feb 11, 2011