What RefreshRates() updates - page 8

 
Aleksey Mavrin:

If you really have to. it works :)

Exactly

Exactly what? In five, at least once every two minutes you need to query the data from the right symbol and timeframe to keep it up to date. What does "it's much more complicated" have to do with it?
 
Artyom Trishkin:
What "exactly"? In A, at least once every two minutes you need to request data from the right symbol and timeframe to keep it up to date. What does "it's much more complicated" have to do with it?

This is not the first time I've heard "at least once every two minutes from the correct timeframe". Where does the information come from, is it in the manual or is it an expiry in the creation of crutches?

 
Mikhail Nazarenko:

This is not the first time I've heard "at least once every two minutes from the correct timeframe". Where did the information come from, is it in the manual or did it come from the experiential data when creating crutches?

The results of communication with the developers on the forum.


Artyom Trishkin:
What "exactly"? In 5, at least once every two minutes you need to request data from the right symbol and timeframe to keep it up to date. What does this have to do with "it's much more complicated"?

That being said, it is indeed more complicated. For example, initialisation (waiting for data). This problem doesn't exist in 4ka.

And regular refresh didn't always help, plenty of cases where people complained about "time-series falling off". There were plenty of bugs in this area. It may or may not have been fixed.

 
The easiest way is to check the number of bars in the series, if there is more than one bar, it means that history is being loaded and we recalculate it.
And we don't need any crutches, the time series are constantly updated by themselves.
 
Taras Slobodyanik:
The easiest way is to check the number of bars in the series; if there is more than one bar, it means that history is being loaded and we recalculate it.
And we don't need any crutches, timeseries are constantly updated by themselves.

Such an option seems to be more difficult. What justifies it? The code is possible.

 
Mikhail Nazarenko:

Such an option seems to be more difficult. What justifies it? The code is possible.

if (prev_calculated==0 || rates_total-prev_calculated>1) 
   flagReCalc=true;
 
Artyom Trishkin:
What 'exactly'? In 5, at least once every two minutes you need to request data from the right symbol and timeframe to keep it up to date. What does this have to do with "it's much more complicated"?

I don't know what you mean by more complicated, but I'm not sure what you mean by complicated.

 
Taras Slobodyanik:

With the turkeys, it's clear. I meant for the EA. In OnTick()

 
Mikhail Nazarenko:

With the turkeys, it's clear. I meant for the EA. In OnTick()

the same way, create the same variables and check iBars

Документация по MQL5: Доступ к таймсериям и индикаторам / iBars
Документация по MQL5: Доступ к таймсериям и индикаторам / iBars
  • www.mql5.com
iBars - Доступ к таймсериям и индикаторам - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Taras Slobodyanik:

Exactly the same, create the same variables and check iBars

It will work, but there are problems with getting the previous value at first launch, when loading a new history, when the number of bars in the history changes from outside. But it works if calling the iBar will stimulate the terminal to make the next updates of time series.