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

 
Can you tell me if you can hide indices in the mt5 code, in mt4 you can in mt5tom I can't figure it out
 
Igor Makanu:

I'm sorry - I've sinned! I didn't read the certificate, I wrote on the forum while drunk!

I thought it was a new feature...

 

Is there any way to limit the range of input parameters other than the initialisation check?

Using stochastic levels as an example.

input  double  so_up    = 80,
               so_down  = 20;

These variables can be specified as negative or more than 100. And you need from 0 to 100

 
Igor Makanu:

I studied both Pascal and C++ at university and it's still there:

C++ : for , while , do...while

Pascal : for , while , repeat

MQL : for , while , do...while


For example I would love tosee 2 more cyclesrepeat on the net but its not the main point, I would like to make my own as far as I understand I need to create my own compiler to implement it but no one showed me in the examples yet how at least the forloop is arranged. And I am even worse, I do not have any uni, I am studying by myself.

 
Seric29:

For example, I would like tomake my own as far as I understand I need to create my own compiler to implement this, but no one has shown in the examples how at least the forloop is arranged. And I am even worse, I do not have any uni, I am studying by myself.

The for loop is very simple, it's hard to explain in words, I once studied with lessons from Dmitry Sleptsov on YouTube, and it clearly shows the purpose of the loop.
https://www.youtube.com/watch?v=we8kWGmuM2k

 
Alexandr Sokolov:

The for loop is very simple, it's hard to explain in words, I once studied with a tutorial by Dmitry Sleptsov on YouTube, and it clearly shows the purpose of this loop
https://www.youtube.com/watch?v=we8kWGmuM2k

I know how it works, I'm interested in its engine, how it works, I mean the code of the loop itself, I want to create my own loop.

 

Good day gentlemen! Can you please advise me how to start writing in MQL5? How to understand the logic and sequence of processes? What is the step-by-step process for writing a trading robot!

I want to have some idea of where to start and what to end with!

 
Олег Юдин:

Good day gentlemen! Can you please advise me how to start writing in MQL5? How to understand the logic and sequence of processes? What is the step-by-step process for writing a trading robot!

I want to have some idea of where to start and what to end with!

Forum on trading, automated trading systems and strategy tester

FAQ from Beginners MQL5 MT5 MetaTrader 5

Vladimir Karputov, 2019.07.18 08:07

The best way to study is "On Demand". In other words, you set a task first, and study MQL5 while solving it.


For example, the first step is to learn how to create a dummy (template) -create a new program usingMQL4/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.

 

Hello!

I have found on forum a functionthat calculates how many points a price has passed for a certain number of seconds int ItemsPerSecond(const int seconds,MqlTick &tick). I put it into code and compiled it - everything is OK, but when I try to call it, the compiler generates wrong parameters count.

What am I doing wrong?

 
novichok2018:

Hello!

I have found on forum a functionthat calculates how many points a price has passed for a certain number of seconds int ItemsPerSecond(const int seconds,MqlTick&tick). I put it into code and compiled it - everything is OK, but when I try to call it, the compiler generates wrong parameters count.

What am I doing wrong?

What's wrong?

All asleep or extinct?

Reason: