Metatrader 4 - Hardware Considerations

jack

Administrator
Staff member
I decided to break this out of another thread I had since it fits here and is semi useful to people planning on buying a computer just for trading with MT4:


MT4 is old as dirt.. pushing past 10 years now.

It's strictly 32bit. It can't make use of more than 2Gb of RAM, single threaded, and it doesn't handle well on Windows Vista and beyond.

It also can't make use of a lot of the newer hardware assisted math functions found in some processors... nor have I seen anyone putting out a version that can take advantage of GPU computing to speed backtesting up.

Basically, it's dated.

So I found for the best possible experience (speed wise,) for MT4 backtesting, start by setting up a system with a higher clock rate, higher cache, dual core (not quad or greater) processor. You don't even need dual core, but it's not like you can find single core processors these days and at least the 2nd core means you can browse the net without it feeling sluggish as your MT4 works away on a backtest.

Run 32bit Windows XP... actually, I've been told by a very high up person at a brokerage (who knows his way around IT stuff) that the best OS for MT4 (stability and speed wise) was Windows 2000..

64bit Windows has to run MT4 in WOW mode, that's Windows-on-Windows... it's a compatibility layer and it slows the kinda processing MT4 does during backtesting down quite a bit.

Don't worry about RAM greater than 3-4Gb. More is just not needed (OS won't use it, MT4 won't use it.)


Just a few thoughts if you ever are building out a system specifically for MT4 backtesting. You won't be future proofing yourself going this way, but at least MT4 will run like a dream.

Now I do suggest investing in a decent (read: stable and well supported by the manufacturer) system that will allow you to run more intensive software than Metatrader 4, but if all you need is MT4 and don't want to spend a lot, then the quote above will help. A decent box for just MT4 can be had for under a hundred bucks these days if you pick up an off-lease business-level desktop from a refurb company.
 
Jack,

A (belated) happy new 2014 from downtown Toronto !

I got here from reading occasionally your useful detailed FF posts on brokers, and just now from roicool's 2012 threads where he posted some execution measurement tools (probably redundant with MT4 Build 563.)

Given your tech and trading background, I got a couple questions for you:

1. Is there a tool/script to measure total round trip execution buy/sell times with a DEMO account? (roicool's posts suggest his stuff works with live trading.) In any case, his stuff may not be not needed with Build 563 and is a load on the broker's server.

By total I mean including the network latency: the time it takes from the mouse click on BUY/SELL button to when your trade executes and its notification arrives.

I am doing some research into reducing network latency on (usually bad) international location connections, given poor local ISP speeds/latency. I am thinking maybe there is a way to reduce such latency down to a good 200-250 msec from the ridiculous 600 msec round trip latencies experienced from abroad. A case in point is online gamers from abroad (Malaysia, Singapore, Austrialia, others) whereby they can subscribe to LAN emulation or Split TCP Proxy services like Tunngle.net to get better QoS (quality of service.) Mostly those game servers are located in the US, perhaps some in Canada as it is a major game development destination.

Reducing high network latencies can certainly improve trading since your trade will execute before price moves a lot, especially in active UK/US sessions. Of course even in here, there is a lot of traffic shaping/throttling going on by Bell or Rogers to let premium traffic pass first. Until recently vpn type traffic made sense because encrypted traffic was automatically prioritized by default but there then always is the unnecessary encryption overhead (more with PPTP than say with L2TP.) Lately though network providers are getting smarter with port assignments.

See kferr response down below: http://www.howardforums.com/showthread.php/1794276-Does-using-a-VPN-speed-up-my-connection?s=9caa20a303e1c750224d924ca00d5c48

Your views/suggestions are welcome.

Cheers,
Athar.
 
atharmian said:
Jack,

A (belated) happy new 2014 from downtown Toronto !

I got here from reading occasionally your useful detailed FF posts on brokers, and just now from roicool's 2012 threads where he posted some execution measurement tools (probably redundant with MT4 Build 563.)

Hello and welcome atharmian,

Glad you found this place in good order. :)


atharmian said:
Given your tech and trading background, I got a couple questions for you:

1. Is there a tool/script to measure total round trip execution buy/sell times with a DEMO account? (roicool's posts suggest his stuff works with live trading.) In any case, his stuff may not be not needed with Build 563 and is a load on the broker's server.


Demo? Mm.. the issue here is that MT4 demo servers are usually separate systems, and thus, not really a good measure of live performance. I mean, you can test out demo servers all you want with the scripts you mentioned, but it wouldn't reflect what performance will be like live.


atharmian said:
By total I mean including the network latency: the time it takes from the mouse click on BUY/SELL button to when your trade executes and its notification arrives.

I am doing some research into reducing network latency on (usually bad) international location connections, given poor local ISP speeds/latency. I am thinking maybe there is a way to reduce such latency down to a good 200-250 msec from the ridiculous 600 msec round trip latencies experienced from abroad. A case in point is online gamers from abroad (Malaysia, Singapore, Austrialia, others) whereby they can subscribe to LAN emulation or Split TCP Proxy services like Tunngle.net to get better QoS (quality of service.) Mostly those game servers are located in the US, perhaps some in Canada as it is a major game development destination.

Ah.. but what you're describing is not battling latency, but consistency and priority of throughput (quality, uninterrupted high-throughput traffic.) In the gaming world this matters because there's usually a large payload of data that needs to be transferred, consistently and without variation of timeliness, for the game to remain fluid and responsive for all players involved. While such an improvement could help with trading applications (at least, it doesn't hurt,) it would not really speed up execution.

From what I've come to understand, execution delays/times in MT4 is broken down into three main parts: The network latency between client and sever (which your geographical location, and ISP's network affect,) MT4 client-to-server authentication windows and messaging (which rooi's scripts tried to game by keeping a session alive instead of re-initializing it every time you want to send an order,) and lastly the order processing time that the broker needs to fill your order (which can be just a millisecond or two with some brokers, or much longer with other brokers who delay order processing to stop people from latency arb'ing their quote feed.)

Again, rooi's scripts were to take the delay MT4 itself (as it was designed) needs to pass messages between the client and server... it didn't actually affect the time it took for packets to travel from client to server (network latency.. or anything related.)

atharmian said:
Reducing high network latencies can certainly improve trading since your trade will execute before price moves a lot, especially in active UK/US sessions. Of course even in here, there is a lot of traffic shaping/throttling going on by Bell or Rogers to let premium traffic pass first. Until recently vpn type traffic made sense because encrypted traffic was automatically prioritized by default but there then always is the unnecessary encryption overhead (more with PPTP than say with L2TP.) Lately though network providers are getting smarter with port assignments.

Traffic shaping and trotting (to curb P2P traffic) isn't designed to increase latency on traffic, so much as reduce throughput.. latency remains generally unaffected.

Think of it (VPN to overcome ISP throttling) like trying to mask an 18-wheeler truck as a regular car.

A car might get from A to B quickly, but it can't really carry much of a load. Us traders don't just want cars, we want sports cars... we don't need to carry much (quote data and order messaging is not very bandwidth intensive.. it's just text really,) but we need it to be ultra snappy about how we get around.

Someone wanting to download the last 20 seasons of The Simpsons wants the 18-wheeler truck.. they care about being able to get a large payload of data consistently arriving to their computer (higher throughput.)

ISP throttling is like allowing 18-wheelers to drive on the highway, but making a rule that if the purpose is "P2P file-sharing" then the truck can only carry 1 cardboard box worth of a haul at a time despite the ability to carry more.

Using an encrypted VPN makes the 18-wheeler truck appear like it's not actually for P2P transfers, and thus not be restricted to how much it can carry.

But..(and here's the key) all this car and truck talk doesn't change the amount of distance each vehicle has to drive.

Latency caused by geographical distance and ISP's networks can't really be 'worked around' in this respect. I mean, sure a company can come along an install a fiber line in between you and another point on the net (where there once was just copper,) and this will help a bit, but as the end user this isn't something you have much control over.

I mean, what matters to traders is how fast an order can get from client to server for processing. This is exactly why so many large firms co-locate their servers inside the exchange's data center. Heck, the majority of the HFT world relies on running their systems next door to the financial exchanges they trade with.. all in an attempt to reduce the latency between their systems and the exchange as much as possible.

All we can do, as traders, is make sure we're not using a method of getting online that in itself adds unreasonable latency. An example would be using a 3G or 4G cell network to access the net and trade, as these technologies (while getting faster and being able to transfer greater amounts all the time) are notoriously high latency type connections (100-200ms just to go from the wireless modem to the ISP's network and back, let alone how long it takes to send packets around the net.)

For a home connection, a modern DSL or Cable broadband line is good. If you can afford it, dedicated fiber is always awesome... oh, and in Canda, don't fall for Bell's "fibe" service.. It's not fiber to your home, it's DSL to your home. Their marketing team makes me angry sometimes.

Now, outside of all that, what we can try do is cut out the extra delays caused by inefficient programs / software... that's what the hack / scripts rooi put out for MT4 tried to accomplish before MetaQuotes and many brokers started scoffing at such tricks. ... but that's all on the (high up) application layer, not the network layer.

atharmian said:
See kferr response down below: http://www.howardforums.com/showthread.php/1794276-Does-using-a-VPN-speed-up-my-connection?s=9caa20a303e1c750224d924ca00d5c48

Your views/suggestions are welcome.

Cheers,
Athar.

That link and thread actually mentions a few things I said here...

Anyhoo, hope that helps. :)

EDIT: Ninja edits on stuff above... more clear.. less me being tired and failing at English.
 
Jack,

Thanks really for such a detailed and smart point-by-point reply.

So, in sum what you are saying is that network latency is not a huge part of total execution time, even if such latency is around 600 msec round trip ? (If latency is important enough, on the other hand, then latency reduction methods, e.g., split TCP proxy, should help?)

Can't such latency cause loss of several pips/trade for scalpers during active sessions?

Athar.
 
atharmian said:
Jack,

Thanks really for such a detailed and smart point-by-point reply.

So, in sum what you are saying is that network latency is not a huge part of total execution time, even if such latency is around 600 msec round trip ? (If latency is important enough, on the other hand, then latency reduction methods, e.g., split TCP proxy, should help?)

Can't such latency cause loss of several pips/trade for scalpers during active sessions?

Athar.

No. I'm not saying that. :/ It still is a huge part of total execution.

I'm saying network latency caused by physical distance cannot be helped by the methods you were talking about. In fact, they don't help that kind of latency (distance) at all. They help consistency of throughput (quality.)

Also, who/what are you pinging that's taking 600ms to respond? If that's what you're getting in MT4 as measured by some script, I bet a good portion of that time is spent between MT4 Client and Server processing message requests and the broker filling the order.
 
Hi Atharmian, hope all's good.
The above dialogue is beyond my comprehension :)
That said, I'm assuming you trade manually since you mentioned hitting the mouse for transaction. If this is the case do not worry about latency. Concern yourself with positive expectation.
 
Jack and Alpha-Bet,

I believe I am getting more clear about forex execution now :)
So looks to me that the above mentioned methods can improve QoS/throughput (this is good too), but not necessarily latency. It's just that when I google for latency reduction, I come across tons of posts talking about the methods above !

E.g., Split TCP here: http://en.wikipedia.org/wiki/Performance_Enhancing_Proxy
Or, game latency: http://www.teamliquid.net/forum/viewmessage.php?topic_id=188062

Maybe gamers are mixing up latency with good QoS.

Anyway, I am actually a newbie forex trader, who does it manually and, like all others, hoping to get to a good EA :) But my aim here is not my own trading but the potential for setting up a premium ISP abroad where 'latency' (and/or QoS) is bad enough that scalpers (most retail traders) are losing several pips/trade.

The 600 msec RT ping delay is just an ISP test from abroad, and does not look unusual, given online complaints by gamers. I have not yet asked my tech friends to measure forex execution speeds (next step after they learn to trade forex first!)

So basically this all above is to figure out whether there is a niche market for a high QoS network service for scalpers abroad. Perhaps setting up routers in one of those countries that then talk to routers in NYC or London and in which network you could control QoS by proper configuration, bypassing as much of the local networks as possible. One such local router would then support 40-50 traders in a single trading room, for instance.

Athar.
 
I feel like I might be type-casting myself with my first post, but such is the strange depth of knowledge I have on these topics.

On the computer build setups, since it's about Single-Core optimization, I know what you're looking for. You really want a Pentium 4 with at least 3.4Ghz processor. The "better" (read: later in the Prescott or Cedar Mills) model would serve you better. Win32 applications are very big users of pure clock cycles off the Core itself. They also double as a space heater & toaster. (115 watts @ around 30 amps through a single Core produces a monster amount of heat; multi-cores were required from there due to the Heat alone, but that doesn't matter for MT4)


On the issue of latency, the gamers aren't wrong. It's an issue of hops & routes from your point to the Server. Most of the services for those Games are out of SE Asia for a reason. The systems, generally, work by controlling the Routing between major exchanges & optimizing those connections.

This is why a secure VPN could *still* be a latency improvement, depending where you are in the world, due to forcing a different Route pattern. If you're going from Singapore to London, odds are you're getting routed through the Middle East and the undersea cables there. It's likely the "faster" route would be through the Los Angeles then London. Using the VPN to drop out from the USA could improve times. Or it might work the other direction.

The gaming services also tend to use prioritized bandwidth on the better networks, which you likely wouldn't get access to (as they're specialized services for games). You'd need to run a few Trace Routes on your connection to get an idea where the major break down exists.

It's also very possible, especially for the Middle East lines, to get flooded during high-traffic times. They've adding more lines, but it's hard for that to keep up with India slowly coming on line for Internet access.

Hope that helps a little. Never expected that chunk of knowledge to be useful for Forex Trading. Go figure!
 
Back
Top