Some traders have probably noticed that speed of quoting at different forex brokers often differs. The reason for this may be: feed aggregation from different liquidity providers, such as banks, or broker’s cheating, such as quote feed smoothing. The gist of arbitrage on market is as follows: buy a thing, in our case a currency pair, cheap and imediately sell it for a higher price, profit being the difference of prices. Of course, one can get profit from such arbitrage only if this difference is higher than brokers’ spreads and commissions combined. Such operations are called classical (bipedal) arbitrage. The main advantage is the absence of risk, so it has zero drawdown. If one dealer quotes are always delayed to the other, it is better to use one-leg arbitrage, where orders are only sent to the broker with its quotes lagging.
In this article, we will implement an arbitrage strategy on EURUSD symbol using Megatrader software.
1. Place MegaTraderExchange expert advisor (exports data from the MetaTrader to Megatrader) to the "experts" folder of MetaTrader installation directory (for example, C: \ Program Files \ Alpari MT4 \ experts).
2. Push the “Expert advisors” tab on the toolbar:
3. Apply the MegaTraderExchange expert advisor to any chart opened:
If configured correctly, the Advisor icon located in the top right corner of the chart will be a "smile":
All of the above is repeated for the second terminal.
Now the MegaTrader part:
1. Run the MegaTrader, select "Settings" - "General Settings", open the tab "MetaTrader" and set the ID program. ID must be "0" to "19”. When multiple instances of program are opened (up to 20) their IDs should be different.
2. Select the menu item "Settings" - "Instrument settings" and press “Add instrument” in the “Short” tab:
- Account - the account number in MetaTrader (in the upper-left corner of terminal’s window).
- Symbol - exactly as written in MetaTrader (for example, EURUSD).
- Weight - is equal to "w" in the following formula SPRED=(w1*X1+...+wn*Xn)-(wn+1*Xn+1+...+wn+m*Xn+m).
- Position size - size of opened position.
- “Execute first” - other terminals will only send an order after this one is executed.
Then, create a second instrument in "Long":
3. On the "Advanced" tab you can specify trading time. For 24-hour trading write "Opening trades" - 0:00:00, "Closing trades" - 23:59:59 (You will need to specify if needed to trade, for example, during NYSE session).
Now, it is needed to connect MetaTrader to MegaTrader by opening "Connect" - "Connect to MetaTrader". Charting will begin after first tick data loads into MegaTrader.
Below is a live account chart, several peculiarities can be spotted:
There is an opportunity to buy at around -0.0002, and sell at 0.00005. Even if a 0,00005 slippage occurs, we will still have a 0,00015 points of profit. “1,5 pips - that’s a tiny profit, I scalp for more!” - one may say, but consider that we just made a profit with nearly zero risk, so you can ditch money management here and trade grand lot sizes for bigger gains!
A script was written to automate this trading strategy: it sells spread when Offer (red line) is less than or equal to -0.0002 and closes order when Bid (green line) is greater than or equal to 0.00005, and vice versa:
Then you can turn autotrading on, by going to “Script” - “Run the script”.
After a few days of real trade, it was found out that the profits accumulate on one account. So we decided to switch our strategy to one-legged arbitrage, where orders are sent through only one broker.
Real trading results can be found in the Statistics section.
However, you should consider the following differences of one-legged arbitrage:
1. Your order is not hedged, and as a result drawdown can increase a bit.
2. Your broker should be loyal to scalpers and short-time deals. It is best achieved if trading on a ECN account, where brokers mostly encourage scalping.