AMP-MetaTrader 5 as IB alternative for automated intraday futures trading

Discussion in 'Index Futures' started by Zyker, Jul 24, 2021.

  1. Zyker

    Zyker

    TLDR: Looking for real user experiences using the AMP / MetaTrader 5 setup for automated intraday futures trading; stability, delays, execution etc.

    --

    I have been a happy IB customer for almost 15 years, and am gradually automating my "higher frequency" trading. Thus far this has involved nightly heavy number crunching followed by trading US stocks at the open. IB TWS has been well up to this: I work with Python and Matlab, supplemented by compiled C code to speed things up, and can interface the IB API without problems. So all good ...

    ... except that now I'm in the process of automating an intraday system - still a relatively low frequency one on E-mini S&P and Nasdaq futures, with trades typically lasting for 1 to 3 days - and I no longer see IB as a good option. Although the situation has improved over the past few years (IB API on Github, the marvelous ib_insync etc), it seems to me that one still has to spend a tremendous amount of time to realize a stable connection between TWS or Gateway and the Python code. The icing on the cake is the daily restart/logout functionality that seems to both change periodically and still require human intervention during mobile authentication even if you use third-party autologin implementations. I mean, come on! It's 2021. What's the point of automation if you have to babysit all along? So considering the alternatives lead me to the AMP / MetaTrader 5 combo, mainly because NinjaTrader and SierraChart would require changing from Python (or executing a lame system call to Python which I won't do).

    I have had some reservations about MetaTrader in general, mostly due to it having historically been associated with shady forex or CFD providers. But AMP seems to be serious about it, so I enrolled for a demo. The platform looks stable, and seriously more lightweight than TWS. Sadly, like NT and Sierra, it too is not native Linux, but the usual Wine workaround seems to do its job. Interestingly, there is a Python interface (https://www.mql5.com/en/docs/integration/python_metatrader5) that seems to work out of the box in my testing. Sure, the features are minimal compared to IB API, but in terms historical and live market data, it has literally all I need, plus functions to execute trades and monitor positions.

    So now the question is: what am I missing? In particular, since the Python - IB API connectivity seems to be such an issue, how does AMP/MT5 perform in this respect? Connection losses? Requotes? Execution quality?
     
  2. Millionaire

    Millionaire

    I cant comment on Meta trader.

    I use AMP and Rithmic for automated futures trading. They are very good, but i think IB is slightly better.

    eg.

    The IB API is more flexible with the number of order types on offer.
    IB internal processes are slick and all automated, they are a 25Billion company with big software development budget. Where as AMP sometimes do things by hand behind the scenes. This isn't a major problem but sometimes they can be very slow compared to IB and also this can lead to human error. Rithmic is software company so there are better than AMP in this regard.

    I do intra day futures only, so like AMP for the low margins they offer. But you plan to hold 1 to 3 days, i.e. overnight, so low intra day margin might not really an advantage for you. You need to put up full exchange overnight margin.

    If IB intra day futures margins weren't so high i would of stuck with IB.

    Hands free automated trading is a nice idea, sadly network connectivity and software/hardware failures will always be problem regardless of which ever broker you use.

    eg. Your local PC, your internet connection, the clearer servers, the execution platform servers The exchanges servers and connectivity between all these different servers.

    Something can always go wrong in that chain. Maybe not very often but may be a couple of times a year regardless of who you are using. So it can never be 100% hands free and reliable in my opinion.
     
    Last edited: Jul 24, 2021
    tayte likes this.
  3. fan27

    fan27

    You might want to take a look at Tickblaze. They have support for Python and I have not had any issues with their connection to IB.
     
  4. Zyker

    Zyker

    Thanks @Millionaire and @fan27.

    While intraday, I still only do relatively low frequency stuff, so being "available" is not an issue per se. But then again, I don't need scanners, option chains, tens of simultaneous market data streams, depth, complex orders (updated frequently), etc. So essentially, I would want to trade all this fancy functionality (that IB provides) to a basic yet stable API connectivity (that IB does not provide), and AMP/MT5 seems to deliver, unless I'm missing something. Maybe at this point I should reiterate that IB has been good to me over the years. It is just seems that their API is not for this purpose of mine. Yes, the software IB provides themselves is solid; TWS and Gateway can robustly recover from errors, loss of data connectivity etc, but there are forums dedicated to making this translate to API-connected applications outside their software.

    I will be hosting things on a remote Linux server, providing a much more stable environment than local pc/network. For the technical issues beyond the trading software at server, I will implement programmatic messaging (Telegram). I have done this for other non-trading related activities for many years, works well. As for the clearing/execution/exchange connectivity, it would be very interesting to hear how AMP/MT5 performs. What kind of issues and how frequently should I expect to see, etc.

    When AMP offered SierraChart for free, I benchmarked it, and gave serious thought to converting everything I have to ASCIL (a subtantial work). I don't mind paying for a quality piece of software, but like said, all I need is a stable API with basic trading/data features.
     
    fan27 and 6wives like this.
  5. Millionaire

    Millionaire

    With AMP i think you chose between AMP and Rithmic for the executions.

    Rithmic seems to more reliable than CGQ, just to give you an idea, i just looked in my Inbox for CGQ problems since i joined in AMP in the middle of the year.

    CGQ had serious problems on the following dates, (routing issues, margin calculation problems, synthetic order creation etc).

    July 19th 2020
    September 20th 2020
    March 16th 2021
    March 18th 2021
    June 21 2021
    Jul 12 2021

    I had just one problem with Rithmic over the last year.
     
    Last edited: Jul 24, 2021
    Zyker likes this.
  6. Millionaire

    Millionaire

    Although a similar thing happened to me with IB in 2006, they forget to upgrade the server software on one server node, and every time my ATS sent an order via TWS to that node the server process crashed. Took 2 days for IB to figure out the problem.

    But IB were pretty good over the 15 years i used them. I only 3 or 4 problems like that over 15 years.

    Another example was IB got 'good after time' orders wrong on a software upgrade, sent my orders straight away instead of waiting for the 'good after' time. They offered me compensation but it wasn't worth the paperwork. I was watching and reversed the positions pretty quick.
     
    Last edited: Jul 24, 2021
  7. Zyker

    Zyker

    Out of curiosity - how did you learn about these problems? Through your own messaging code implementation or AMP sending you status reports to email?
     
  8. Millionaire

    Millionaire

    The CGQ ones were AMP emails sent to the whole AMP user base by the looks of things, I dont use CGQ so didnt care about them.

    My Rithmic problem was specific to me, AMP never sent out any email, i use the Rithmic protocol buffers websocket API which was having problems. I dont think AMP have many other customers who use that interface.
     
  9. cafeole

    cafeole

    I have AMP/CQG and the last two issues he mentioned was reported to me by AMP. Fortunately I was not in a trade at the time.
     
  10. Zyker

    Zyker

    I should add that their snapshot data feed seems to be quite robust in crash-like events.

    (Funny thing - back in 2008 I had a desktop PC with a processor cooling fan that was very noisy on high cpu load. During the Lehman bellyup days, you could literally *hear* the market gathering speed by listening to that fan responding to increasing activity within TWS. Even then, most performance issues were due to that PC, not TWS.)
     
    #10     Jul 24, 2021