No announcement yet.

Execution Speed - Direct Connect VS EA

  • Filter
  • Time
  • Show
Clear All
new posts

  • Execution Speed - Direct Connect VS EA

    A lot of the time we have complaints that Direct Connect is no longer available and that it was a far superior copier to the Expert Advisor method. This has started to be mentioned since the release of the analytics package which clearly shows the execution time of each trade (both open and close). This is just a quick post to go into a little more detail about how each copier works in terms of building the statistics which eventually get calculated as open/close execution time.

    First off, we measure execution time in microseconds based upon when the data enters our database vs the time at which the master executed. Direct Connect "appears" to have faster execution time, however this is not necessarily true. Both the EA and Direct Connect execute at pretty much the same speed. Our aim is to try and execute under 500ms (0.5 seconds) from when the master opens a trade. This includes the time to open the trade on the slave broker. This can be achieved using a good broker with fast execution, and a good connection with the EA.

    Now let me discuss the way that Direct Connect physically executes a trade and in turn code that gets the execution time into our database:

    1. Master account trades
    2. Direct connect sees trade, and trades on users account
    3. Direct connect instantly enters the trade data into our database
    4. DONE

    Now the EA:

    1. Master account trades
    2. EA picks up trade and trades on users account (at this point, we are as fast as DC which is the important bit)
    3. EA now runs through a few bits of code, which rely on a few simple factors - system performance, MT4's performance (kind of falls under system performance) (why? because its doing other checks that it needs to do to run as an EA)
    4. EA is now ready to upload the trade data to our servers
    5. EA uploads open trade data
    6. Our servers now have this trade data, and execute the same statements that Direct Connect does in step 3
    7. DONE

    Its important to point out that from step 3 and step 6 this is all done in a fraction of a second, but as you can see there are simply more steps that the EA has to go through before the trade data gets into our servers. When we execute a trade with multiple terminals running - we physically see the EA execute faster than DC, generally the open time of the EA is approx 0.5 seconds - the open time of DC reports at 0.35 seconds. Even though the EA did actually execute faster, DC is reporting that it executed faster, and thats simply because the report is faster to execute on Direct Connect. This isn't always the case, but 80% of the time the report on DC is faster.

    This does not mean the copier is slower, as I point out, the EA did actually execute faster.

    I hope this post is helpful if not a little bit more behind how it all works If you think it was a load of nonsense, fair enough. Its late