
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Vladimir Simakov:
My mate looked at this shit and said: 250 grand for me and 75 grand each for my two junks, and we'll rewrite this shit in six months or get rid of it.
this is the right decision judging by the set-up, with the approach described there will always be problems with the GPs.
I read all the posts about global variables and understood what all the participants in this discussion were trying to tell me. I will learn how to write program code without using global variables. Thank you all for this constructive advice!
Sincerely, Vladimir.
I continue studying the MQL5 programming language. I am pasting the revised code of the script again, taking into account the tips from the participants of this thread. I have tested the script in all modes. No problems detected. To begin with I have applied the minimum number of input parameters. The script code is written in English, comments to the code are in Russian, so that it is easier to digest. As I promised earlier, I tried to describe the script in a way understandable for a 1st class student of the programming school.
I hope I did it the way I was told by the participants of this thread, but I could be wrong.
Regards, Vladimir.
It's great that you have figured out how and where to move the global variable bool_timе. You are doing a great job.
Thank you, Peter, for your support and help. I moved the global variables inside the function thanks to the tips that were given to me earlier by the participants of this thread. Now, when the information is sorted out in my head, it becomes much easier to grasp the new things.
Regards, Vladimir.
Good morning everyone and good mood!
Dear programming experts! I would like to express my sincere gratitude for all hints and constructive advice, which you share with me!
Sincerely, Vladimir.
Good morning everyone and good mood!
Dear programming experts! I would like to express my sincere gratitude for all hints and constructive advice, which you share with me!
Sincerely, Vladimir.
Hello Alexey! Yes, that's right, I have a soviet higher technical education connected with automation of processes in production and experience as an electronic engineer in an organization which was engaged, in those same soviet times, in repairing ECMs.
Regards, Vladimir
Hello Alexey! Yes, that's right, I have higher technical education connected with automation of processes in production and work experience as an electronic engineer in the organisation which was engaged, in the same Soviet times, in repair of ECM.
Sincerely, Vladimir.
Continued at
It was clear from the post above that the focus was on functions. Everything was devoted to them and nothing but them. One might think that this is an obvious subjective bias or some arcane "philosophy". However, there is no philosophy here. And such attention to functions is not accidental. The point is that in programming, function is of fundamental importance. Moreover, the function is a very important and fundamental notion in mathematics. In the 20s of the last century, Alonzo Church developed a system of calculus based on functions. This was called lambda-calculus. This system formalized the notion of calculability and tightly bound computer calculations and mathematics. The leading programmers of the world developed so-called functional programming languages based on lambda-calculus, in which functions take the leading place. For example, in a functional Haskell programming language, there is not even a for loop or something similar. Instead, it is proposed to call a function in a special way, recursively, to calculate the desired value. It can be proven that with only functions and no assignment, it is possible to write a Turing complete programming language. This is a language that would allow to write everything that is possible in any other turing-complete language, such as procedural or OOP language.
MQL is not a functional language, but rather a procedural one, extensible by classes, with strict typing and rich subject-oriented API (in the form of the same functions, oh surprise). On the other hand, the theory of functions is based on a solid mathematical foundation, offers simple and effective patterns of using any programming language where there are functions, so it is at least not far-sighted to abandon functions and mathematical basis behind them. This is why I pay so much attention to functions. It doesn't matter how well you understand the array design, or if you make a mistake with a certain data type. This can be quickly fixed and corrected. But if you don't understand functions and how they are related, you won't even become an average programmer.
Thus, to learn how to normally prog, ie linearly over time to expand the functionality of your program, you need to learn the following:
Functions seem simple. "What's there to learn. You just need to read a paragraph here, and that's all. And then arrays, for, while..." - No, they're not. Functions do seem simple (and that's fine). But for them to really solve tasks efficiently, functions must have certain properties and be combined with each other in a certain way. How to do all this I will probably write later.
Hello Vasiliy! Please, if it is not difficult for you, write a sequel about function properties. For me, as for other novices in programming, it is very important and useful to know that functions must have certain properties and join each other in a certain way.
All your message blocks relating to functions are already collected for me in a single Wordboard file.
Sincerely, Vladimir.
Alexei, are you kidding? Yes, I'd like to learn the basics first!
Sincerely, Vladimir.