Book recommendation: Learning to create a trading algorithm
- Wissam
- 21. Dez. 2021
- 2 Min. Lesezeit
After trading "manually" on Plus500 for a few years, I became aware of the MetaTrader 5 (MT5) trading platform. This platform is free of charge and contains all the functions you need in forex trading. The predecessor of this platform is MetaTrader 4 and one of the many changes between these two platforms is the development environment (MQL4 to MQL5), with which algorithms are programmed.
Books that bring you closer to the MetaTrader development environment are really very raw. The quality of the existing reading is all the more important.
With this blog I would like to recommend to you the best book that will give you a structured understanding of how to create a trading algorithm: "Expert Advisor Programming for MetaTrader 5" by Andrew R Young.
The good thing about this book is that you don't actually need any previous knowledge of programming. The book starts (very compactly) with the elementary basics of programming. Experienced programmers can therefore quickly skip the first few chapters.
After the short and compact elementary knowledge you are already familiarized with the most important building blocks of trading algorithms (OnInit () -, OnTick () - and OnDeInit () - functions). A lot of examples are given and a simple trading algorithm is finally created that combines all the learned code blocks.
It is also noteworthy that the author Andrew R. Young not only deals with netting but also with hedging accounts, since the programming is different for both account types.
Individual code fragments are also provided on the homepage mentioned above, so that you do not have to put all the fragments together yourself. Unfortunately, the codes provided are not error-free and there are some errors that I only noticed during backtesting (e.g. incorrect buffer assignment in indicator classes). But that is the only flaw in this book and anyone who reads the reading carefully will find the errors at the latest when profiling or backtesting their own algorithm.
Since MQL 5 is an object-oriented programming language, it makes a lot of sense to save "repeatable code fragments" in classes, which can then be called using a class object. Such classes are also mentioned in the book and provided as fragments. For example, order placements, price information, pending orders and time slot settings are listed as classes.
Such tools ensure that you quickly gather the foundation for new algorithm-creations and that you can concentrate even better on the strategic direction of the algorithm.
I personally also use the specified classes that have been created in this book. Most of the time I vary them a little to adapt them to my personal preferences (for example: error handling functions).
The book is written very technically and therefore serves as a reference book in addition to learning to program. While I am writing an algorithm, this book is mostly open so that I can quickly look up code-related things.
In this case, I can only highly recommend the book, especially if you are an inexperienced programmer. The benefit is in no way related to the small price of around € 30.
Comments