Major apologies everyone. Despite having okay'd the publish of this EA with several brokers prior to posting this thread, i have been since informed by two brokers that this could cause major issues for them in processing load and bandwidth issues, and they would prefer if it was not released. I have taken down the original EA that was here, and i've put a script instead.
Amongst scalpers execution speed (and thus slippage) is highly important. Below I will detail a method that can be used by anyone to improve their MT4 order execution speed by about 500 ms. Let me explain how it works:
Metatrader 4 works on a 30 second session length - That is when there has been no trading activity for 30 seconds the "session" times out. Outside of this time any communication with the Server from the same IP address needs to be re-authenticated ie: Go through the Login/Password verification process. This authenticating takes about 500 ms (however this value varies considerable from broker to broker, from as little as 200 ms to as much as almost 2 seconds with some brokers).
When a trade is placed within 30 seconds since the last server contact the process is:
MT4 Client >>>>MT4 Server>>>>ECN
Outside of the this 30 seconds because of the re-authentication measure the process is now:
MT4 Client >>> MT4 Server >> MT4 Server Password Database >>>Authentication>>>ECN
The increased steps is where the latency lies - This is common across all MT4 Brokers.
By making contact with the trading server shortly before you anticipate placing a market order, you will reduce the execution speed of that market order by about 500ms
I have attached a script below that opens a pending buy limit on eurusd at price 0.00001, then on every successive run it changes the TP back and forth between two values, thus opening a new authenticated session that will remain open for 30 seconds, allowing you to place your market order. The script can be run very quickly and easily especially if a hot key is used.
This script can also be used to test execution speed, (though market order execution speed may be slightly slower than pending order execution speed). The script times how many milliseconds it takes to modify the order. It prints and comments on this duration.
EDIT 11-05-2012: I'm re-uploading the original EA considering there was not an excessive number of downloads of the script and other versions of the EA (~350 downloads in 4 months). The EA modifies the order automatically every 29 (or custom number) of seconds. Only run the EA if you need to, as it puts an extra processing load on your brøker's server. Some brøkers will ask you to stop running this EA. Other brøkers may charge you (MB Trading charges USD 0.005 per server message). The EA prints in the expert's tab of the terminal the execution speed of the order modify commands. If this execution time is greater than 1000 ms, then set the modification frequency lower to 28 or 27, otherwise 29 is optimum.
Amongst scalpers execution speed (and thus slippage) is highly important. Below I will detail a method that can be used by anyone to improve their MT4 order execution speed by about 500 ms. Let me explain how it works:
Metatrader 4 works on a 30 second session length - That is when there has been no trading activity for 30 seconds the "session" times out. Outside of this time any communication with the Server from the same IP address needs to be re-authenticated ie: Go through the Login/Password verification process. This authenticating takes about 500 ms (however this value varies considerable from broker to broker, from as little as 200 ms to as much as almost 2 seconds with some brokers).
When a trade is placed within 30 seconds since the last server contact the process is:
MT4 Client >>>>MT4 Server>>>>ECN
Outside of the this 30 seconds because of the re-authentication measure the process is now:
MT4 Client >>> MT4 Server >> MT4 Server Password Database >>>Authentication>>>ECN
The increased steps is where the latency lies - This is common across all MT4 Brokers.
By making contact with the trading server shortly before you anticipate placing a market order, you will reduce the execution speed of that market order by about 500ms
I have attached a script below that opens a pending buy limit on eurusd at price 0.00001, then on every successive run it changes the TP back and forth between two values, thus opening a new authenticated session that will remain open for 30 seconds, allowing you to place your market order. The script can be run very quickly and easily especially if a hot key is used.
This script can also be used to test execution speed, (though market order execution speed may be slightly slower than pending order execution speed). The script times how many milliseconds it takes to modify the order. It prints and comments on this duration.
EDIT 11-05-2012: I'm re-uploading the original EA considering there was not an excessive number of downloads of the script and other versions of the EA (~350 downloads in 4 months). The EA modifies the order automatically every 29 (or custom number) of seconds. Only run the EA if you need to, as it puts an extra processing load on your brøker's server. Some brøkers will ask you to stop running this EA. Other brøkers may charge you (MB Trading charges USD 0.005 per server message). The EA prints in the expert's tab of the terminal the execution speed of the order modify commands. If this execution time is greater than 1000 ms, then set the modification frequency lower to 28 or 27, otherwise 29 is optimum.
Attached File(s)
rooicol - Maintain Session EA.ex4
3 KB
|
4,855 downloads
|
Uploaded May 12, 2012 5:33am
rooicol - Maintain Session Script.ex4
2 KB
|
3,978 downloads
|
Uploaded May 12, 2012 5:33am