Expert Advisor Programming for Metatrader 4: Creating Automated Trading Systems in the Mql4 Language (英語) ペーパーバック – 2015/2/21
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
Brand new and fully updated for the latest versions of MetaTrader 4, Expert Advisor Programming for MetaTrader 4 is a practical guide to programming expert advisors in the MQL4 language. Leverage the latest features imported from the MQL5 language, including object-oriented programming, enumerations, structures and more. This book will teach you the following concepts:
- The basics of the MQL4 language, including variables and data types, operations, conditional and loop operators, functions, classes and objects, event handlers and more.
- Place, modify and close market and pending orders.
- Add a stop loss and/or take profit price to an individual order, or to multiple orders.
- Close orders individually or by order type.
- Get a total of all currently opened orders.
- Work with OHLC bar data, and locate basic candlestick patterns.
- Find the highest high and lowest low of recent bars.
- Work with MetaTrader's built-in indicators, as well as custom indicators.
- Add a trailing stop or break even stop feature to an expert advisor.
- Use money management and lot size verification techniques.
- Add a flexible trading timer to an expert advisor.
- Construct several types of trading systems, including trend, counter-trend and breakout systems.
- Add alerts, emails, sounds and other notifications.
- Add and manipulate chart objects.
- Read and write to CSV files.
- Construct basic indicators, scripts and libraries.
- Learn how to effectively debug your programs, and use the Strategy Tester to test your strategies.
All of the source code in this book is available for download, including an expert advisor framework that allows you to build robust and fully-featured expert advisors with minimal effort.
Whether you're a new trader with limited programming experience, or an experienced programmer who has worked in other languages, Expert Advisor Programming for MetaTrader 4 is the easiest way to get up and running in MQL4.
Amazon.com で最も参考になったカスタマーレビュー (beta) （「Early Reviewer Program」のレビューが含まれている場合があります）
This is a very good resource about the new MQL4 programming standards. I’m very grateful to have it in my hands because there aren’t that many resources out there. Granted there are a few, but Andrew Young has obviously spent countless hours of blood sweat and tears pulling this together. The book is not 1500 pages long like some programming books, but believe me when I say that all 271 pages are impressively JAM PACKED and full of information! If you really want to know the ins and outs of MQL4 this is the book to get!
I would like to give prospective readers my experience of learning MQL4 through Andrew’s book.
I got the book and dove in. This is my first attempt to learn any sort of programming language. Because this book is so full of information I shortly realized I wasn’t going to be able to just flip through the pages and just fling out an Expert Advisor (E.A.), but I was determined to learn. I took a deep breath and committed myself to really STUDY, STUDY, STUDY and absorb this stuff.
So, here is what I did:
I decided to treat this as a full Collage Course. I bought myself some blank ruled index cards and as I went through the book I would write down important points to remember. In most cases every page would have several cards of data to store in my brain. Most of the concepts are pretty easy and I was getting it. After each new concept I whipped out the Meta Editor and experimented with the code and tried a lot of different things that seemed to compile correctly.
However, a few weeks in and I was only at page 50. I already had a few hundred flash cards of important points to remember. I was retaining it and learning it, but I was feeling quite discouraged because I couldn’t see the big picture and how all of this stuff would come together. I was really feeling a lot of inner resistance and my frustration level was growing.
On page 61 the topic of Object-Oriented Programming, (OOP) was introduced. That’s when I hit a mental Wall. I really had a difficult time. I would stare at this stuff and the thought of giving up really crossed my mind. I would stare at the pages and let the words blur.
Mind numbing concept after concept – I thought, “Where in the Bleep is the “HELLO WORLD?” program? (laughing) I somehow kept going.
Using the MQL4 online reference helped a bit here and there. Finally, at page 99 on the verge of giving up and throwing the book across the room - I saw a small light at the end of the tunnel when a Simple Expert Advisor is introduced. It was as if I started to climb out of a dark tunnel. I really started to get the structure of how it all fit together.
I got to a point that I stopped trying to memorize every single blasted little thing and just kept going. I could always turn back and reference something if I needed to. I learned how to send orders to the market, how to modify them and close them. The information on indicators was good and I was finally starting to relax a bit.
I find it superbly ironic that at the “END” of the book in chapter 24 you FINALLY get to create a simple Message Box and learn how to Comment on the screen. Really? For those Star Trek fans out there I can hear Dr McCoy’s voice on Star Trek say - Quote, “Good God Man!”…. Andrew… Andrew…. Andrew… (slapping my forehead with my palm) Why in the world couldn’t you introduce this concept at the front of the book and not at the end? It would have made my life so much easier… (light hearted hearty belly laugh).
So any prospective readers who are new to programming, read a bit of chapter 2… THEN skip to chapter 24 and learn “a bit” about the Comment() function, Alert() function and MessageBox() function. Then, go back to chapter 2 and try some of this stuff so you can output some code to the screen. That one thing would have made my life so much easier. So don’t expect a lot of flashy stuff on your screen when your learning this stuff. It’s a lot of brain cramming memorization and finally at the end it all comes together and you get it.
SUMMARY: I did it! I learned how to create E.A’s using this book. It wasn’t easy for a person learning programming for the first time, but it can be done. I give it a 3 stars for the learning format and 5 stars for all the material that is referenced. So to balance it out I gave it a solid performer at 4 stars. I picked up a “C” language beginner’s book and found much of it familiar. I probably should have started there. But I’m better off for having made the attempt and for ultimately succeeding.
Despite my frustrations, Thank you Andrew for writing this book. I am glad that I bought it. :-)
Admitted, I have CS background so it made it easier to read as compared to a programming novice but it is written in a very clearl manner, dealing with all the important aspects that every trading system needs, not just strategies, but "administrative" tasks as well, like opening different types of orders, risk management, Timer for trading in certain time windows and tips about debugging the system and testing it using the Strategy Tester of MT4. (Don't expect a book on ground breaking strategies. The author uses very basic strategies to let you see how it fits within the framework of developing a trading system, which is a very good idea IMHO )
I highly recommend it to anyone who wants to not just pick up the syntax of MQL4 but would like to learn it within the context of coding components that every trading system needs.
Also, I have emailed the author 2 questions and got a response rather quickly which is a plus, and suffice it to say that I bought it a couple of weeks ago and already read it cover-to-cover.
I feel confident now to start using code developed along with newly written code by me when developing strategies and test it afterwards.