We save the last calculation time.
On next ticks, we check the number of seconds that have passed.
If it is more than the specified time, it is calculated, otherwise we exit without calculation
int GetTickCount(); // Функция GetTickCount() возвращает количество миллисекунд, прошедших с момента старта системы. // Счетчик ограничен разрешающей способностью системного таймера. Так как время хранится как беззнаковое целое, то он переполняется каждые 49.7 дней.
Yes, indeed. At the 5 digit mark, the turkey is slowing down.
I don't know why. It's all right in the code...
Да, действительно. На 5-ти знаке индюк тормозит.
А вот почему, не пойму. Вроде всё норм. в коде...
Probably the frequency of quotes is higher than on 4.
Compare tick volumes.
----- and recalculation and re-rating should be done when there is a "significant" change in price.
"Materiality" should probably be put in the parameters. 5-7 pips on a 5 marker won't change the weather.
;)
Good afternoon.
There is an indicator in the Code Base section - https://www.mql5.com/ru/code/8752.
According to the description, it shows on the history in its window the equity of one position or the sum of several positions. On a certain period of history.
I cannot run it even for one currency!
"Before you install the indicator, create at least one vertical line on the chart with the following parameters:
The position of the line openN (where N is the ordinal number of the packet) sets the time of the packet opening."
I have created a vertical line. But I don't understand - what is the parameter openN (it is not present in Properties) and where N is set ?
Further :
"The positions in the indicator are only set with trend lines of a certain colour on the instrument chart.
The position of the line determines the opening and closing time of the packet."
I don't know how to draw a limited segment of the trend line. It appears to be an endless ray in one direction all the time.
Please advise.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
My question is as follows: how can I make an indicator recalculate itself no more often than a certain number of times per second, for example no more than 2 times.
The Sleep function does not work in indicators.