AutoGraf Series 4 - MQL features. - page 12

 
unpack on top of the previous build?
 

Yes, there's only a new news file. Hardly anyone needs it (the old one).

 

2. Добавлен настроечный параметр - программная пауза. Изменение значения позволяет регулировать загрузку процессора.

Where can I find this setting?

 

Pause_Program. The last parameter in the list of digital settings (in EA settings).
To access the settings (well, what can you do) you must:
1. Press the EA button.
2. Press F7.
3. Set the new parameters, OK.
4. Press EA button to start working (EA will start working from the nearest tick).
---

Such a technology of access to settings is dictated by technical limitations of MT4. One can only hope that some things will change in 5. For example, I want to believe that it will be possible to call the settings panel at runtime. Perhaps the properties of special functions will also be extended.
In the meantime.

 
Oh, sorry, I thought the setting was a button or sub-button with a scale :)
 
Yes, there's more. Time_Before_News = 5. This is a boo-boo 5 minutes before the next newsgroup is released.
 
the "peek-a-boo" worked honestly, which is a good thing, even with hidden news lines, approve :)
 

"I also do cross stitch...":)

The format of the news file has changed slightly. 0 and 1 are the importance of the news.
The + to the right of the currency name indicates important news.

(The news file can be viewed in notepad, it's easy; type or correct there too)

 
Sergei, please explain what Pause_Program is allowed to do, so that you don't have to try it by "gut feeling".
 
alexx_v:
Sergey, please explain what is permissible value of Pause_Program, so that you don't have to try it by "gut feeling" method.

This parameter increases the duty cycle of the process.

While working on the program, I set the iteration counter. With the default value of Pause_Program = 1, the program executes between 20 and 500 iterations per second (similar to a movie tape, 24 frames/sec). This means that the duration of the process (including pause) is between 2 and 50 milliseconds. Pausing increases the duration of the work cycle, but during the pause the program is not running. This reduces the load on the processor.

On average, at 100 iterations per second, the program runs for 9 ms + 1 ms pause = 10 ms. The duty cycle is very small (approx. 1.1, see https://book.mql4.com/ru/special/index). If the pause is increased to e.g. 10 ms, the duty cycle will increase (to approx. 2), i.e. it will relieve the processor by half.

A further increase in this setting will offload the CPU even more, but the program will run more and more inertly. But if you set Pause_Program too large, for example = 1000, the delay in execution of the user's control action will be quite noticeable. For example, after dragging the icon on the chart to place an order, the program will pause (its duration will be random within the specified value) and only then it will start to execute the specified algorithm (similar to the slowing down of a movie, i.e., the image becomes jerky).

To understand your own preferences, set this parameter to a value of 1000 to 2000, so that the delay is sensitive. Then decrease it to a value where you cannot distinguish the delay. Most likely an acceptable value will not be more than 300-500. At the same time, see how the load on the CPU changes. The relation is inversely proportional, so increasing value above 500 makes no sense (what difference does it make whether CPU load is 10/300 or only 10/500).

It is recommended to set Pause_Program to a value between 1 and 100.