Amir Goudarzi

MT4 Algo Trading

Published: 2022-10-02

I recently started getting into algo trading. As I have a full time job, I am unable to daytrade and so a lot of my trades are longer term swing trades. I have tried in the past to create algos, as I have always been interested in the financial markets and im a professional software engineer, but have always been met with frustration as it is almost like learning programming all over again.

So this time I am going to try and push forward and not give up. I am going to start with the easiest path to get working. Using Metatrader4 to create an algo bot for the spot forex market, the platform makes it easier to get running quickly, but one of the big con’s is that the mql4 language is very dated and more difficult to work with. I am used to being able to follow lots of tutorials to understand a subject, however with mql4, despite it being old, has been hard to find quality walk-throughs. Another issue is the inconsistancy between the people that do create content around algo creation, so you need to find one creator and stick to their methods.

First and foremost, I decided to find an easy enough idea that seems like it has positive alpha and can be done in a relatively short amount of time with the limited knowledge I have. After browsing the terrible forex forms, which there is never short supply of, I came across a technical indicator called GMMA (Guppy Multiple Moving Average).

First need to break this into a few steps to digest the process of algo creation:

  1. Create a custom indicator that will display the moving averages
  2. Create the BUY/SELL signals within that indicator to figure out how to create the EA (Expert Advisor is what MT4 calls the algo bots)
  3. Create the crude bot based on what criteria I created for the signal markers in above point
  4. Refine and backtest
  5. Profit??

Step 1 complete

Step 1