Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1093

 
Олег Юдин:

Hello Gentlemen! I need to learn MQL5, but unfortunately I don't understand where to start and the logic. So to speak areas of responsibility. If there are people who know this language, if this person has a minute to explain at least in two words!

I would be grateful!)))

Oleg, I'm serious, start by learning C.
Personally, I started there when I realized that Mql is a C-like language.
But not with YouTube videos, but with full-fledged courses from different schools or universities.
If you have the opportunity and desire, it's better to study on-site at an educational institution. There, at any time, any of your questions will be answered by the teacher.
If there is no such possibility, if you have a good search on the Internet, you can find paid video courses from schools and universities in the C language, but they are freely available.
The C language will give you the very basics, the understanding of programming in general the functional paradigm.
When you understand the structure and meaning of C and then look at Mql code you will be surprised how much you already know and understand in Mql)).
And then, with help of mql documentation, you can study functions description, read forum articles, look for additional mql video tutorials, and mess around with examples from kodobase.
If you manage to do all this, after a year or two, you will be able to switch to OOP. That is, if you need to.
At the beginning, you don't need OOP at all, and later you won't need it either. For instance, in mql you can write only on functions, and in most cases this will be enough.
But for further development, when you master functional programming, it is better to learn OOP.
For this reason, start with the study of the C language and understanding of the functional paradigm.

 
Олег Юдин:

Hello Gentlemen! I need to learn MQL5, but unfortunately I don't understand where to start and the logic. So to speak areas of responsibility. If there are people who know this language, if this person has a minute to explain at least in two words!

I would be grateful!)))

The best way to study - "On Demand". In other words, the first you set a task, and in the process of solving it, you study the MQL5 language.


For example, the first step is to learn how to create a dummy (template) -create a new program usingthe MQL4/MQL5 Wizard.

And select an Expert Advisor (template) or a custom indicator:

The first step of the wizard is to select the type of the project to be created:

  • Expert Advisor (Template)
    To create a template of advisor - a mechanical trading system, which allows fully automated analytical and trading activities for effective work on the financial markets.
  • Custom indicator
    Generate a template for writing your own technical indicator for price dynamics analysis.
Мастер MQL4/MQL5 - Справка по MetaEditor
Мастер MQL4/MQL5 - Справка по MetaEditor
  • www.metatrader5.com
Благодаря Мастеру MQL4/MQL5, трейдер может создать советника, не обладая знаниями в области программирования. Все что нужно сделать — это выбрать торговые сигналы, которые будет использовать советник, алгоритм мани-менеджмента и трейлинг-стопа. Код советника будет сгенерирован автоматически на основе выбранных параметров. Помимо этого, Мастер...
 
Vladimir Karputov:

The best way to learn is "On Demand". That is, you set a task first and study MQL5 in the process of solving it.

For example, the first step is to learn how to create a dummy (template) -create a new program usingthe MQL4/MQL5 Wizard.

And select an Expert Advisor (template) or a custom indicator:

The first step of the wizard is to select the type of the project to be created:

  • Expert Advisor (Template)
    To create a template of advisor - a mechanical trading system, which allows fully automated analytical and trading activities for effective work on the financial markets.
  • Custom indicator
    Generate a template for writing your own technical indicator for price dynamics analysis.

To understand the process of the task at hand, you need to understand what you are doing and know the basics.
So just study the theory first, variables, functions, loops, arrays, etc. with all the intricacies of these elementary basics.
Opening a dummy "on demand", the trainee will sit and look at it like a moron )) from not understanding the meaning, code structure and what to write.

 
Roman:


This is why you should first study the theory, the variables,


These "C" basics are completely unnecessary They are even GREAT. Why shoot at sparrows from a tank? You need to study MQL5 gradually - set a problem, solve it yourself, work it out - you can move on.

 
Олег Юдин:

Hello Gentlemen! I need to learn MQL5, but unfortunately I don't understand where to start and the logic. So to speak areas of responsibility. If there are people who know this language, if this person has a minute to explain at least in two words!

I would be grateful!)))

Here is an example: The task and its solution -simple Expert Advisor. Check of the bar size. BUY/SELL

 
Vladimir Karputov:

These "C" basics are completely unnecessary They are even GREAT. Why shoot at sparrows from a tank? You need to study MQL5 and gradually - set a problem, solve it yourself, work it out - you can move on.

Your answer is brilliant ))
The market does not allow for such recommendations, and I would not advise to take them seriously.
If you do not know the theoretical base, it will be a long and tedious break your brain in search of answers to your questions.
Hit a wall of no understanding, and often lost the desire to further study, because of the simple not understanding how to write, and why it is so, and not otherwise.
For this reason it is better to be with the baggage of knowledge and in the tank, then perhaps you won't need mql (exaggeration).
How do we know the purpose of any of us, perhaps in the future someone will want to fully program, will develop their applications, etc..
For this reason, in programming, you cannot go without theory, and C is the basis for a high-level language. And don't ever write that learning any language is harmful, it sounds ridiculous.

 
Roman:

Your answer killed the day))
Such recommendations are harmful and I would not advise taking them seriously.
A person who does not know the theoretical background will be long and tediously racking his brains in search of answers to his questions.
Hit a wall of no understanding, and often lost the desire to further study because of the simple not understanding how to write, and why it is so, and not otherwise.
For this reason it is better to be with the baggage of knowledge and in the tank, then perhaps you won't need mql (exaggeration).
How do we know the purpose of any of us, perhaps in the future someone will want to fully program, will develop their applications, etc..
This is why in programming, you must have theory, and C is the foundation of the high-level language. And don't ever write that learning any language is harmful, it sounds ridiculous.

Are you sure of your highlighted words? Wasn't Basic the first high-level programming language? Wasn't it the first, rightfully so? What are you talking about here? Doesn't every language have the same types of variables? Doesn't every language have the same loops and conditions? What difference does it make learning which language understand what a variable is, what its type is, what a variable is, what a loop is, what kinds of loops there are. Just imagine, I can't write a single line in any version of C, except for declaring variables. And nothing, I'm doing without this knowledge to write in mql5.

And if you consider that most people who want to learn mql, just want to write an Expert Advisor by themselves, so as not to show their "brilliant" ideas to the public, learning C will just push the implementation of that idea far ahead. And for some people, even to an unattainable horizon.

Don't they teach programming basics in schools now? These are the basics enough to start learning mql from the documentation.

 
Alexey Viktorov:

Are you sure of your highlighted words? Wasn't Basic the first high-level programming language? Wasn't it the first, rightfully so? What are you talking about here? Doesn't every language have the same types of variables? Doesn't every language have the same loops and conditions? What difference does it make learning which language understand what a variable is, what its type is, what a variable is, what a loop is, what kinds of loops there are. Just imagine, I can't write a single line in any version of C, except for declaring variables. And nothing, I'm doing without this knowledge to write in mql5.

And if you consider that most people who want to learn mql, just want to write an Expert Advisor by themselves, so as not to show their "brilliant" ideas to the public, learning C will just push the implementation of that idea far ahead. And for some people, even to an unattainable horizon.

Don't they teach the basics of programming in schools nowadays? Those are the basics that are enough to start learning mql from documentation.

What does this have to do with the first high-level language?
We are talking about mql, and it has a similar structure to C/C++, so it was recommended to study C to begin with, as it's easier and less complicated to understand.
That's why the expression "basic foundation" was used for C and similar languages. In general, for all languages, because all the latest ones are derived from it))
Not Jawa or Python, the similarity is not the same, you know, but the meaning is the same.
The main thing is to understand the concept, but then the transition to mql will be a little harder.
That's what I'm saying, you need to have at least some understanding of the basics.
And the basics will only sink into your brain through the theory of C -> Mql.
Why C? Because for a beginner, it's the best. There are many books, courses, etc. on it. Having studied and understood C/C++ you'll easily code in mql.
It's also affected by the lack of quality training specifically in mql, it was discussed in a neighboring thread, and Renat gave a comprehensive answer.
And it's better to study the language in full, not on forums, but where you can actually learn to code.
Later you will get woeful coders saying my memory is weak, or I have errors, or I don't understand it at all).
A forum is for further more meaningful applied study of examples.

 

I set the test interval in the tester from 17 July (yesterday) to 19 July (tomorrow).

But the test stops at 23:59 on the 17th of July.

Why is the test not running for today, although there are already quotes for half a day? In MT4 it works.

 
Roman:

What does this have to do with the first high-level language?
It's mql, and it has C/C++ like structure, that's why it was recommended to study C for a start, it's easier and not too complicated to understand.
That's why the expression "basic foundation" was used for C and similar languages. In general, for all languages, because all the latest ones are derived from it))
Not Jawa or Python, the similarity is not the same, you know, but the meaning is the same.
You can learn either Delphi or Fortran, the main thing is to understand the concept, but then the transition to mql will be a little harder.
This is what I'm saying, you need to have at least some understanding of the basics.
And the basics will only sink into your brain through the theory of C -> Mql.
Why C? Because for a beginner, it's the best. There are many books, courses, etc. on it. Having studied and understood C/C++, you'll easily be able to code in mql.
The lack of quality training in mql may also have an impact here. This was discussed in a neighboring thread, and Renat gave a comprehensive answer.
You better study the language once you have started, not on forums, but there where you will be really taught how to code.
Later coders will start showing up expecting a memory leak, or I have errors, or I don't understand them at all).
A forum is for further more meaningful applied study of examples.

Apart from the highlighted one, you could have written nothing.

Sincerely Y.

That's what knowledge of C++ would help not to ask such questions?

Forum on trading, automated trading systems and testing trading strategies

Any questions from beginners on MQL4 and MQL5, help and discussion on algorithms and codes

novichok2018, 2019.07.18 10:07

Hello all!

I've found a function on forum,that calculates how many points price has passed for a certain number of seconds int ItemsPerSecond(const int seconds,MqlTick&tick). I put it into code, compiled it - everything is ok, but when I try to call it, compiler keeps shouting wrong parameters count.

What am I doing wrong?


Reason: