Introducing the Asirikuy Trader: Our link between F4 and different broker API solutions for live trading :o)

Checkout this recent post to learn more about the F4 framework and our strategy tester. 

As you may know, during the past few months I have been reconsidering the use of MT4/5 and I made the decision to make a significant effort to ensure the Asirikuy trading community would be moving away from this platform by January 2014. In order to achieve this goal and develop our “dream trading platform” we started a joint development effort with Jorge – an Asirikuy member – in order to create the Asirikuy Trader (AT), a trading platform that would allow us to interface the F4 framework (a professional system development framework we programmed at Asirikuy) with different broker API solutions. Today I have the pleasure to say that – after a lot of hard work – we now have the basic layout and functions for the Asirikuy Trader, along with complete API functions for both Oanda and JForex. We now have the ability to execute our systems outside of the MT4/5 strategies, on professional broker API solutions with a custom platform designed for speed and cross-platform compatibility. Through this post I am going to talk about the Asirikuy Trader, how we have developed it, what we want to achieve with it and what we will be implementing going forward.

I have always dreamed of a trading platform that would be all that MT4 is not. A platform that would allow me to trade the way I want to trade, specifically targeted towards algorithmic trading, light resource usage and cross-platform compatibility. I have always wanted an algorithmic platform that runs on a linux console, that doesn’t have any GUI (save the resources!), that works efficiently, that works in parallel, that can talk to any number of brokers with any number of strategies on any number of accounts without any problems. I have been dreaming of a platform that I can run without arbitrarily imposed updates that break functionality, a platform that I can tweak in whatever way I want, a platform where I can modify the source, change the error handling, implement new functionality, etc.  In essence I have wanted to develop a platform that addresses all my needs and not a platform that I have to work around. This is the vision from where we started to develop the Asirikuy Trader.

25-06-2013 23-13-21

The Asirikuy Trader is being developed in Python, a very powerful scripting language that is extremely fast (libraries such as numpy are almost as fast as C). We chose python because it’s cross-platform, it’s relatively light and it can access a ton of third party libraries to suite our purposes. Additionally it is very easy to interface python with almost any language (C, java, pascal, etc), making it ideal for the development of a platform that needs to interface with many different broker API solutions (developed across many languages). To tell you the truth, I was introduced to Python by Jorge only a few months ago and coding inside of it already feels like a complete breeze when compared with languages like C/C++. Development times are ultra-fast and debugging is a complete breeze. In addition we were already experienced in interfacing python with the F4 framework, because our back-testing solution (the Asirikuy New Strategy Tester) was developed in this language as well. With this knowledge the development of F4->python bindings and the development of python->broker API solutions seemed like something we could easily achieve (a dream come true).

After choosing the language (and coding some preliminary tests) we then decided to implement classes to wrap the API functionality, so that we could simply write the definitions of the different functions for each broker API without the need to rewrite the whole interface. Strategies from F4 are always called in the same way –  interpreted through the same functions – and the only thing that changes between two broker API solutions are the broker class definitions. This allows us to add functionality for new API solutions without breaking functionality for API solutions we have already added. We have currently added two broker API solutions, which are the Oanda REST API and the Dukascopy JForex API, allowing us to trade F4 systems outside of the confines of the MT4 trading platform. In addition we have also implemented an orderWrapper class that allows us to trade perfectly on broker API solutions that require FIFO and non-hedging rule compliance. With this solution orders are passed through a virtual order manager that then synchronizes a net positioning approach, allowing us to trade any number of systems on the same symbol as if we were on a platform with native hedging support.

It is true that right now the Asirikuy Trader is in the beginning stages of development (pre-Alpha) and we are nowhere near the level of debugging that we would like to have before live trading. We still have to polish our error handling, run the systems through stress tests and do many other things before we can trust this new platform with real money. However we are right on track to migrate away (hopefully forever) from MT4/5 by January 2014. The truth is that trading F4 systems outside of the MT4 platform is now a reality (we are doing it on demo tests right now!) and therefore this is no longer a dream, it’s a technical fact :o) The platform has been developed to allow you to run as many systems on as many accounts as you want, so – for example – I am currently running a demo test with 2 strategies on one Oanda account and 1 strategy on a Dukascopy account (as showed in the picture above). Other API solutions are also a priority (like FXCM).

25-06-2013 23-10-38

Before we use this in live trading there is also a lot of additional functionality we would want to develop. For example there are some details about the console interface, like printing the UI files from the strategies into the console and making the tables where we have the orders printed more aesthetically pleasing. But most importantly, we would like to implement openMP support in order to be able to execute accounts in parallel by using the multi-core capabilities of modern processors. Making parallel developments in python is very easy (and F4 is thread safe), so hopefully we will be able to achieve this reliably before release. It is also key to be able to use this tester on Linux, so compiling the F4 framework under the Linux platform will also be a high priority (the framework has been developed to be cross-platform but we haven’t had the need to compile under linux till now — that we have a platform for historical testing and another for trading!). I would also like to thank Jorge for all the great team-work during the past few months, rarely have I ever coded so efficiently with someone as a team :o)

The Asirikuy Trader will most probably remain in pre-Alpha during July and we will then release it to the Asirikuy community (perhaps early August) so that our members can help us stress test the program on demo accounts. The idea is that by January 2014 we will have a reliable solution to trade live without using Mt4/5. It is also worth noting that the source of the Asirikuy Trader will be available to all Asirikuy members (so that people can change the code to suite their needs if they wish). If you would like to learn more about the F4 framework and how you too can develop systems that you’ll be able to use and test outside of the MT4 platform please consider joining, 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.

9 Responses to “Introducing the Asirikuy Trader: Our link between F4 and different broker API solutions for live trading :o)”

  1. Maxim says:

    Hello Daniel,

    Thanks a lot for all your effort!
    It’s great to see how you take the community to new horizonts!


    • admin says:

      Hi Maxim,

      Thank you for your comment and support :o) It wouldn’t have been possible without members like yourself, who have helped us code, debug and understand different problems as we have progressed. Thanks again for posting!

      Best Regards,


  2. Geektrader says:


    I am reading your blog posts since years and it´s so great to see that there finally is a serious MT4 alternative coming that can do everything and more that MT4 can´t (and doesn´t want to it seems!). It´s about time that the days of Metaquotes are over with their dictation and your platform is a serious competitor soon and being developed so quickly, that´s really impressive.

    Keep it up!!


  3. Jacob says:

    great stuff daniel,
    AFAIK, IBFX/Tradestation also has an api for IBFX with trade sizes as small as 100 units minimum and no api fee so that may be worth investigating as well
    also, FXCM appear to be using FIX api so maybe that would be worth investigating – just so there are more than just one broker option;-)

    Thanks for your article!


    • admin says:

      Hi Jacob,

      Thank you for your comment :o) We are going to only consider API solutions that do not carry any fees to start (reason why we won’t be implementing the TradeStation IBFX API from the start). We plan to implement the FXConnect API for FXCM but the FIX API is actually not well suited for our purposes because FIX doesn’t allow you to retrieve historical rates (only execute trades or retrieve quotes). The JForex API allows you to trade on Dukascopy, Alpari US or FXDD and the Oanda API allows you to trade at this broker so right now we have 4 powerful broker choices :o) Thanks again for writing!

      Best Regards,


      • ktrader says:

        Hi Daniel,

        great stuff.

        If I understand correctly with your platform it will be also possible to execute/trade mq4 and ex4 code on Dukascopy API. If that’s the case I am sure Dukascopy will be happy to offer you any support you would require.

        All best,

        • admin says:

          Hi Ktrader,

          Thank you for your post :o) I think your understanding is not entirely correct. We have developed a platform that allows us to trade systems developed within our F4 pogramming framework on JForex or other broker API solutions (such as Oanda). Our F4 systems can be traded within MT4/MT5 but they are all contained within an ANSI C DLL, within our specific programming framework. This means that our platform will NOT allow you to trade any mq4/ex4 file, it is ONLY for systems developed in F4. If you want to trade your systems along all of these frameworks (MT4/MT5/JForex/Oanda/etc) you will need to join Asirikuy and port your systems to the F4 framework. I hope this clears it up :o)

          Best Regards,


  4. rfileger says:

    A GUI capability at some level (limited to the browser) has to be an important part of your product. If you are not already familiar with “WEB2PY” you should become familiar with it. It is the best “Enterprise Web Framework” available, bar none. “WEB2PY” is a free and open source full-stack enterprise framework for agile development of fast, scalable, secure and portable database-driven web-based applications. web2py is written and programmable in Python designed around good software engineering practices, such as the Model View Controller (MVC)pattern.
    The system is easy to obtain and evaluate.

  5. hukam says:

    Hi Daniel,
    is it possible MT5 & MT4 (Mql5 & Mql4 Metatrader platforms) tick data and broker all feeds, interface by pass to stable MT4 or MT3 with any API or DLL or standalone application?
    Thanks & regards

Leave a Reply

internal_server_error <![CDATA[WordPress &rsaquo; Error]]> 500