MetaTrader4 (MT4) Software: A Beginner’s Algorithmic Trading Platform

Before we begin, you’ll notice this post deals with finance and investing, both of which are highly risky. This site and this post is strictly educational. Nothing in this post or on this website is intended as, nor should be construed as investment advice. Kindly first visit the Disclaimers page before you proceed, taking careful note […]

Before we begin, you’ll notice this post deals with finance and investing, both of which are highly risky. This site and this post is strictly educational. Nothing in this post or on this website is intended as, nor should be construed as investment advice. Kindly first visit the Disclaimers page before you proceed, taking careful note of CFTC Rule 4.41 regarding hypothetical performance. Further, investing and trading is extremely risky, to the point that 90% of participants rapidly fail. As such, your participation in investing and trading could lead to loss of principal, and even further losses beyond that in some cases. Neither this site in its entirety, nor this post, nor any portion thereof, nor any resulting discussion or correspondence related to this site and post, is intended to be a recommendation to invest or trade mutual funds, stocks, commodities, options, or any other financial instrument. I will not accept any responsibility for any losses which might result from applications of ideas expressed on this site or in this post from the techniques or systems mentioned on this site or in this post. Nothing shown is the result of an actual trade. Neither past actual performance, not simulations of performance assure future results, profitable or otherwise.

Introduction: Why MetaTrader 4 (MT4) as a Beginning Algo Trading Platform

Alright! With the obligatory legalese out of the way, my journey into algorithmic trading and quantitative finance continues. Obviously to trade, you need to have a vehicle for doing so. Unlike the days of old where you would call a stock broker, most trading today is electronic. For many electronic trading use cases, you need:

There are tons of software platforms and configurations which can be used to design and develop an algorithmic trading program. For the purposes of this education, MetaTrader 4 was selected as the starting platform. Though I’ve dealt with some other programs in the past such as NinjaTrader, yes, Robinhood (sigh), and TD Ameritrade’s ThinkorSwim, MT4 is the platform for this foray.

Advantages

For Mt4, we will get free live data from the Broker. Additionally, historical data is available from MetaQuotes and other online sources like Dukascopy.

 

Disadvantages

 

 

Other Possible Trading Software Platforms

 

Various reasons the above platforms listed aren’t being used includes, but not limited to:

1) Cost

2) Difficulty of learning the coding languages

3) Complicated user interfaces

4) Backtester and/or optimizer not included.

5) Software platform not well designed for building and trading algo strategies.

6) Limited access to markets

7) Poor community support and documentation

 

Why not MT5?

The main reason MT4 is being used over MT5 is because most brokers support the former but not the latter.

Some key differences between MT4 and MT5:

1) Different coding language (MQL4 vs MQL5). MQL5 is more difficult to pick up for beginners.

2) MT4 has been around longer and has better online support. There are many code libraries, templates and examples for MT4.

 

3) MT5 does not allow external data import (This is unfortunate- data management is a huge component of backtesting.)

 

Final Note: Why Forex as a Trading Instrument?

Convenience: Forex data isn’t (as) affected by many common market variables such as stock splits, futures contract roll-overs, expiries and dividends, etc. These factors can greatly complicate the testing and data cleaning process.

Data is available: Free data everywhere! Data on other instruments is much harder to obtain.

Can often extrapolate to other instruments: Algos built on forex can often be easily modified to fit CFDs on other instruments.

Principal instrument traded on MT4.

 

Wrap-Up

Thanks for tuning in- if you’re weird enough to like this, you might find my beginner’s foray into SQL interesting as well. Cheers!