Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1521
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
Thank you. Got it. Does it only show today's prints or can it be configured to show prints for other days?
I've never asked that question as I've never needed to. Look on the site, maybe someone is already interested in something similar. Search for expert tab or something similar.
Regards, Vladimir.
Thank you. Got it. Does it only show today's prints or can it be set to show prints from other days?
If you have a lot of prints, not all of them are displayed for today. But it's better to see the latest ones here. After all, you have to open the log file, but here you can see it at once.
If it were possible, I would not be sitting here...
.
Good day and good cheer everyone!
Questions from a beginner in programming:
I am not a professional programmer, so do not judge me strictly and my answer may be inaccurate.
A structure is an OOP element. Unlike a simple variable, it contains several data types and allows you to describe some object.
For example, we are programming a computer game and we need to describe a monster that has several lower limbs (int),
several upper limbs (int), some strength (float, double), time of birth (datetime), coordinates in space and other characteristics.
You can create an array of structures, a structure element can also be an array or a structure. In some cases it is almost impossible to do without
structures.
As for speed, I think that the difference with ordinary variables is minimal. You can test it - it is not difficult.
You can test it - it's not difficult.
Thank you. I was just thinking about this topic - why create a structure when you can easily do without it with global variables. Well, this is my unprofessional opinion.
I have a complete problem with speed measurement, as I have never done it and have no idea how to do it. ))
Regards, Vladimir.
Thank you. I was just thinking about this topic - why create a structure if you can easily do without it with global variables. Well, this is my unprofessional opinion.
I have a complete problem with speed measurement, as I have never done it and have no idea how to do it. ))
Regards, Vladimir.
I can't imagine how you can implement the appearance of a new object with several different properties without structures / OOP.
Disappearance of one of the old objects (for example, a monster was killed).
Especially if the number of objects changes dynamically and is not known in advance.
There are a lot of examples of measuring speed / comparing execution of different code fragments here.
The same saber posts several examples every day.
1. Create a high-resolution timer
2. Print its value before the operation is executed.
3. After the operation is executed.
The difference is the time of the operation execution.
Do it for a regular variable and for a structure and compare.
and why would you create a structure
for example, to put it together,
/*struct PriceData { double open[]; double high[]; double low[]; double close[]; };*/
or to create structures for monsters in the game
further
example from the help... names changed