And why will they be round if you first make CopyRates from hourly timeframe (the round numbers are obtained), then pass to the procedureCreateFigure the time from the current timeframe (time, which turns into Time), and then search the index by the current timeframe?start_index=ArrayBsearch(Time,start_time);
That's right, we're looking for a round time on a non-round time in the array... I.e. looking for, a bar on a minute timeframe on which the time corresponded to the opening time of the hour.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
And why will they be round if you first make CopyRates from hourly timeframe (the round numbers are obtained), then pass to the procedureCreateFigure the time from the current timeframe (time, which turns into Time), and then search the index by the current timeframe?start_index=ArrayBsearch(Time,start_time);
That's right, we're looking for a round time on a non-round time in the array... I.e. looking for, a bar on a minute timeframe on which the time corresponded to the opening time of the hour.
О!
Emotions are good!
But maybe there will be some substantive thoughts!?
Here's what about time for example - I added two variables to save time
We get a print like this
I.e. as if in a normal/stationary situation everything is correct.
You can see that at 14:00 there is a correction of bar opening time on the minute TF to 14:05 - actual time of the first bar appearance on TF M1.Emotions are good!
But maybe there will be some substantive thoughts!?
The hour is the same, so limit=0. I wanted to do it myself.
The hour is the same, so limit=0. I wanted to do it myself.
So what if the hour is the same? After all, there are 60 bars in this hour on TF M1!
And in case of coincidence of the current TF and the calculated one there is a protection and there will be no divisions by zero in this situation
Sleeping
You're hiding!?
Sleeping
???