![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
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.
"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)
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.