Moving From Metatrader to Oanda: Goodbye forever Metaquotes!

If you have been a victim of Metaquotes’ arbitrary updates and terrible business practices you might have already read some of my previous posts about them (here or here). Last year I said that 2013 was the last year I intended to use Metatrader 4 and I am now fully committed (especially after the last +600 build fiasco) to move away from this unprofessional platform (which is now more like a Persian marketplace for signal providers and bloatware than anything else). In order to carry out this change I have chosen Oanda to be my new broker and we now have – at Asirikuy – developed the solutions necessary to move our live trading to this broker. Through the rest of this post I will share with you why I chose Oanda, what steps I needed to take to make sure that my systems could be traded there and how we developed our live trading solutions to use their available API options.

2014-02-20_8-34-44

When seeking to move away from the Metatrader platform there were several things that I wanted to have within my new broker. My broker should allow as much flexibility as possible with lot sizing, should provide a free trading API – so that we could do professional automated trading – and should also offer the ability to easily divide capital into sub-accounts in order to trade/test several different setups. I looked into several brokers that could satisfy the above criteria – including FXCM and Dukascopy- but while they do provide free API solutions they are constrained by some of the limits in lot sizing imposed by the “Metatrader” way of doing things. For example FXCM and Dukascopy are limited to 0.01 lot size trades, which makes proper money management for the strategies I trade impossible under about 4000 USD. Then I looked at Oanda and initially it was missing a free trading API (because the REST API is yet to be released and the Java API was paid) but this all changed quite recently.

Last month Oanda decided to release their Java API for free. This meant that instead of paying 600 USD/month or wait until the REST API was released for live accounts, I now had a completely free and ready-to-trade API solution available on this broker. Added to this Oanda also has the ability to split your main account into as  many sub-accounts as you want, giving you the ability to trade several different setups in whichever way you want. However the best feature Oanda has is that – when trading through its API – you can trade positions down to 1 USD lots. This means that you can trade 0.00001 of a 100,000 USD lot, while all other brokers I know won’t let you go below 0.001 (that is on cent accounts which are usually limited in size and functionality). With Oanda you can trade 0.00001 on a 1 million dollar account if you want, there is no problem as Oanda manages these trades through its order book so you have no problem in making a market for someone willing to exchange just 1 dollar.

However if you wish to trade your systems with Oanda there are a few things you should be aware of. First of all, Oanda accounts work on a positioning based approach, meaning that if you open 1 lot long EUR/USD and 0.5 lots short EUR/USD you won’t see two trades (one long and one short) but you will see a single 0.5 lot long EUR/USD position. This is a typical net positioning approach – as used through most of the financial world – and there is no reason why a trade-based approach cannot be directly translated into a positioning based approach. Granted this is inconvenient for those of us coming from the Metatrader 4 world, where the system building view advocates for a trade-centered approach. This obstacle was sorted out through the creation of a virtual order manager. Positions with their individual SL/TP values are kept within a virtual file and then they are consolidated with the live positioning on a simple synchronization step. This creates a very small additional delay (about 5ms)  in the opening/closing of positions but I seek to measure its true impact once I start trading on Oanda live accounts.

Another thing we had to implement for our Oanda trading solution was an internal history file that would consolidate and generate enough history data so that we could use it on our systems. Since our trading systems rely on quote refactoring to reduce broker dependence and match simulation performance some of our strategies require more than 5000 1H bars in order to be able to work properly. Since the REST and Java API solutions cannot accommodate these limits, we created history files using Oanda historical data from their website and in this way we generated a “seed” from where we can start appending new data as it comes from the live servers. The history fetching functions look for the matching point between the saved history and the history obtained form the broker and only update the csv whenever a certain amount of time has passed between the last data available and the matching point. This is a fast and efficient solution to access large amounts of data without having to obtain large historical quotes from their servers. When using Oanda history also consider that they never close (they have bars through the week-end) so your system should properly refactor data to take this into account.

2014-02-20_8-18-51

Currently our live trading solution for Oanda uses a python based program (the Asirikuy Trader) gets information using the Oanda Java or REST API solutions, executes the F4 framework (C/C++) to get trading decisions from our systems and then executes these trading decisions on the Oanda servers using the aforementioned API solutions. The Asirikuy Trader has access to quote streaming on the Oanda Java API (streaming is still not available on REST), so the F4 framework is executed whenever a single tick is received (some systems may only react if the tick belongs to a new bar while others will act on every tick). On the REST API the framework is executed every X seconds but we seek to implement streaming as soon as it is released.

Although we are just done with the initial demo testing and implementation of the Java API for the Asirikuy trader I now feel enough confidence in this approach as to plan a complete and final move away from Metatrader 4. I have now started the process to close all the Metatrader accounts I have (a bit more than 50!) and put all my funds into Oanda. I will just leave one small cent live account (with 100 USD) that I will use for debugging purposes for Asirikuy members who want to continue using this platform. That said, I am now right on track to fulfill my promise to the Metaquotes corporation, at the end of 2014 I will have no significant money commitment to your platform and I will be completely free from it (in both testing and live trading).

If you are also fed up with Metaquotes and you would like to implement systems using other broker API solutions, such as JForex or Oanda  please consider joining Asirikuy.com, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)

Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

4 Responses to “Moving From Metatrader to Oanda: Goodbye forever Metaquotes!”

  1. Rodolfo says:

    Hi Daniel,

    current asirikuy strategies and private ones need changes or could run as they are on OANDA ? I’m also referring to those systems that open more than one order at a time.

    Leverage 1:50 set by Oanda won’t be a limit for small accounts ?

    Will you continue to support Metatrader and provide the F4 front-ends for those who want to continue use it ?

    Best,
    Rodolfo

    • admin says:

      Hi Rodolfo,

      Thanks for commenting :o) Let me answer your questions:

      1. Systems don’t need any changes (as you know this is part of why we made the F4 framework, code once, “trade anywhere”). As always we’ll fix any issues that may be experienced as we test things out (our intention is for everything that works in MT4/5 to work on Oanda without any changes).

      2. Our systems are mostly limited to 1:20 leverage. The 1:50 leverage is well above what our systems need.

      3. Yes, of course. As said in the article I’ll keep a small MT4 live account to continue supporting this platform for those who want to use it. I understand that many users would like to keep using MT4 so I’ll keep it supported.

      Thanks again for commenting Rodolfo :o) Feel free to post any additional questions you might have,

      Best Regards,

      Daniel

  2. moztrader says:

    Daniel ,
    Wow this is amazing move on your part. I just found you in google search because of this build600 situation !! I have been thinking how disgusting that upgrade build 600 was. Some of my systems use DLL’s and non of them work over night .. so now I have to troll through and try and work out W.T.F just happened. All auto trading ceases in meantime !
    Just what I need ..

    For quite some time now I believe the MT4 platform is geared to help brokers make the coin, hence it being free to traders. The majority ( I am sure , loose money trading forex in MT4)with proceeds going to brokers . So it makes sense that they are not overly concerned with traders .. I also think it does not help most traders believe they can earn quick money using fast time frames with spread killing you .. unless you have extreme speed and sophisttcated auto algorithm techniques.

    Weirdly, I use OANDA MT4 and I love the company. They run a very good ship. When I first developed trade robots they charged too much for the J API and we had to design a Java for IB.

    I still think you are missing opportunity in not building for IB Brokers because the platform is global trading on all instruments and your market is huge . You could easily create a new standard in auto programming with F4 with a big company like that. However , I understand OANDA is a quality solution and I am excited although I need to go see what the cost is to acess and then learn F4 .. For a non natural gifted programmer it makes me baulk at having to learn yet another language ..

    Can you point me to the tutorials and can you make a free f4 trial period for some of us to test that we can convert over with some faith ?

    Thanks again .
    MT

    • admin says:

      Hi MT,

      Thanks a lot for your post :o) I hear you, Metaquotes is not interested in traders being profitable. They are just interested in having the brokers happy and in selling traders signal/experts/indicators through their marketplace. For me its unacceptable for a professional platform to have a whole signal marketplace and store right there. Any serious algorithmic trader does not want all that bloatware on their platform. However the mandatory updates are the worst, you simply cannot trust these guys.

      About IB, I agree with you. We’re currently also implementing an IB API on the AsirikuyTrader to allow us to access IB accounts through the F4 framework.

      About the F4 trial, I am sorry but I cannot offer a trial because the whole F4 source is available once you have access to it so there is no way to “limit” the trial once someone has access to it. However if you have any doubts about how easy/hard it may be or whether it may be suited to your needs just send me an email or write a comment here and I will be happy to answer.

      Thanks a lot for commenting :o)

      Best Regards,

      Daniel

Leave a Reply

Subscribe to RSS Feed Follow me on Twitter!
Show Buttons
Hide Buttons