I spent most of 2008 trading futures and developing automated systems on Tradestation. The futures trading didn't turn out so well as I lost 40% of my account and had to call it quit. My quant development work on the other hand, was coming along slow but steadily. However, since I couldn't bear the monstrous maintenance fee anymore at Tradestation, I had to abandon that work. Then last year when I wanted to pick up where I left off on Matlab, I found that I couldn't just continue my work. For one, I've lost most of my files. I think I left them in my other computer in Hong Kong. Which is probably in a landfill by now. Secondly, I didn't keep a thorough journal back then in 2008 like I'm doing now. Lastly, from the important files that I've kept, I didn't bother to convert the codes because I might as well write new ones from scratch than figure out what I did. The reason why I am reminiscing at the moment is because I am finding myself in the same cycle again. As regular readers may be aware, recent events have accelerated my quant projects schedule. I am experimenting with using Metatrader 4 for my foreign exchange trading and scripting in MQL4 for automated trading. Like Tradestation, Metatrader 4 is a trading platform with scripting capabilities. Its programming language, MQL4, is a proprietary language based on C. I took a few hours this weekend to learn it (as I'm familiar with C already). So that I can start coding this week. However, after giving it more thought, I've decided to scale down on my projects with MQL4. I don't want to rely on a proprietary system for short-term convenience. As trading programmers know, the language used is merely a choice. Experience tells me that the bulk of development time is not spent on the actual programming itself. Rather, much of the time is spent on formulating, analyzing, and optimizing your algorithm. So I might as well bite the bullet to build from scratch my automated trading systems and quant analytics on one platform (i.e. on Python). That has been my long term plan all along. Everything under one roof. But I digressed. Then there's the issue of re-useability. Metatrader 4 is forex-only and only works with brokers that support it. As such, I would have to use something else for stock trading. Even for a forex-only system, it would help if I can do intermarket analysis quantitatively. That's not possible as far as I know with MQL4. Which is another major downside for me. To summarize other reasons on how I came about this decision, here are the advantages and disadvantages of using MQL4 versus using a general programming language, such as Python or C++. The advantages of using MQL4 are:
- Saves A LOT of development time as it's already built for trading
- Charting, manual and automated trading on one platform
- Based on the popular C programming language
- Many forex traders use it
- Large repertoire of forex-specific programs
Disadvantages of using MQL4.
- Not for real quant analysis or data mining
- Limited to MT4-supported brokers
- Forex trading only
- Proprietary programming language
- Must run on Metatrader 4 client terminal
- MQL5 coming soon
This is certainly a tough choice. Judging by the huge user base, it's evident that many people are satisfied with MQL4. Yet, as I've discussed here, there are downsides to using it (besides technical matters). My current plan remains the same as what I said in my last month's trading review. That is, I will use MQL4 to plug holes in my trading system for now before migrating to build my own system. In fact, I am already brewing my first expert advisor starting today. Perhaps I might even have something to post by the end of this week.