New article Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator is published:
MetaQuotes Programming Language 5 (MQL5), included in MetaTrader 5 Client Terminal, has many new possibilities and higher performance, compared to MQL4. This article will help you to get acquainted with this new programming language. The simple examples of how to write an Expert Advisor and Custom Indicator are presented in this article. We will also consider some details of MQL5 language, that are necessary to understand these examples.
After downloading the file "indicator_TP_en.mql5", rename it to "indicator_TP.mql5", please.
This ExpertAdvisor does not work on MT5 build 712, at least not for me.
There is an error message "Cant't copy indicator buffer".
Also the indicator does not compile without warnings,
"possible loss of data due to type conversion" on line 53,
"possible use on uninitialized varaiable 'day_n'" on line 54
"possible use on uninitialized varaiable 'h_day'" on line 62
"psosible use on uninitialized varaiable 'l_day'" on line 63
Can you correct these problems, please?
This is otherwise a good example for us who have background in other software but MT5.
This is a excellent article, for beginners and people who comes from mql4, with in prime a good trading strategy example.
There are some minor lacks in code (error checking not always implemented), but the EA works very well if used on minute timeframe as recommended by the author. Warnings when compiling the indicator are only warnings, and are not blocking you to use it and the EA.
this is not an easy way of explaining mql5 to the people. (like beginners ever had chance to understand it!) its like with programming books 90% of people dont have idea how to start. They open this book for example about c programming and first "Easy example" is long for 1 whole page written in tiny fonts. In my whole life i read only one good programming book that could teach programming to anyone. The reason for that is that they are being written by probably excellent programmers, but unfortunately very bad teachers. Programming can be really easy and i will prove it to you making a simple tutorial for MQL4 programming language when i have a little more time than now. For everyone - even total beginners. The biggest mistake is to teach people details of language most of their work should be ctrl+C and ctrl+v and use google for the commands and most important - keeping everything VERY SIMPLE. I know 10+ programming languages (I programm since i was 7) and i am still am scared by the way this "Easy example" on 11kb (!!!) is explained. I would like to know is there is any real programming beginner that learned MQL5 from this example ;D. I doubt it and if there is you can count these people on fingers of one hand.
You are right about programmers not being good teachers in general.
But I don't agree when you said mql5 is so difficult to learn, mainly for a programmer who have experimented with 10+ languages.