Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 241

 
toni_stark:


But I can't open the EA file on my computer with the extension ex4, but I can't open this file through MetaEditor. Please tell me what is the reason for this.

This is an executable file - not the source file. You need to open the mq4 in the editor.
 
Artyom Trishkin:
This is an executable file - not a source file. You need to open the mq4 in an editor.

I only have the ex4 file on my computer and the EA navigator window, and I can't open them in the editor in any way.

 
toni_stark:

I only have the ex4 file on my computer and the EA in the navigator window, and I can't open them in the editor in any way.

Well, that's not the case...

 
toni_stark: I only have the ex4 file on my computer and the EA navigator window, and I can't open them in the editor in any way.
When a pastry chef bakes a gingerbread cake, he uses a recipe.
If he is ordered a unique gingerbread, he asks the customer for the recipe.
Even if he is shown the finished gingerbread, he will say he needs the recipe.
Similarly, to write an EA you need a strategy.
Professional programmers say that an algorithm is needed.
This word can hardly be found on this website.
Written EA is saved in text form with extension MQ4.
It can be opened in MetaEditor and the algorithm can be found.
After compilation, we obtain an executable file with the EX4 extension.
It hides the algorithm, like a recipe in the ready gingerbread.
The developers of the terminal make changes from time to time,
which causes old programs to stop working.
Как самому создать советника или индикатор - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
Как самому создать советника или индикатор - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
  • www.metatrader5.com
Для разработки торговых систем в платформу встроен собственный язык программирования MetaQuotes Language 5 ( MQL5 ), среда разработки MetaEditor и...
 
STARIJ:
When a confectioner bakes a gingerbread, he uses a recipe.
If he is ordered a unique gingerbread, he asks the customer for the recipe.
Even if he is shown the finished gingerbread, he will say he needs the recipe.
Similarly, to write an EA you need a strategy.
Professional programmers say that an algorithm is needed.
This word can hardly be found on this website.
Written EA is saved in text form with extension MQ4.
It can be opened in MetaEditor and the algorithm can be found.
After compilation, we obtain an executable file with the EX4 extension.
It hides the algorithm, like a recipe in the ready gingerbread.
The developers of the terminal make changes from time to time,
that cause old programs to stop working.

1,841 pages searched for the keyword "algorithm".

Why are you talking nonsense?

Or do you position yourself as the only one using the term? That's where you're wrong.

Please do not insult the community.

 
Artyom Trishkin:

Well, that's not the case...


So the source code is still in the terminal where the EA was written?

 
toni_stark:

So the source code is still in the terminal where the EA was written?

Only you know where you put the source code.


 
Artyom Trishkin:

Only you know where you put the source material.



I see) thank you!

 

I can't solve a seemingly simple problem. Somewhere on the chart there was a MA crossing. We find a bar after the crossing. How do I calculate the number of bars from that bar to the current bar?

 
Youri Lazurenko:

I can't solve a seemingly simple problem. Somewhere on the chart there was a MA crossing. We find a bar after the crossing. How do I calculate the number of bars from this bar to the current one?


iBarShift()

Although, it can be simpler, to take the number of iteration of the loop, if the recalculation was performed deeper in the history from the zero bar.

Reason: