Mt4 End of support. - page 22

 

Now there is one problem in the function that no one has noticed yet. I'll tell you myself:

The start of all above one minute timeframe counters is incorrect. In other words, everything is calculated correctly, but the start of counting time to a new bar on timeframes above a minute does not coincide with the real start of these bars. That is, when the counter H1 counts up to one hour and sets the flag of a new bar, in fact, this bar does not exist. Because the hour counter does not start counting from the exact start of the hour, but from the moment the Expert Advisor starts. Thus, this solution is not complete. It needs to be refined.

 
Artyom Trishkin:

You need the fact of opening a new bar on any of the proposed symbols on the threefold timeframe.

If there is no quote on any of the symbols, then there is no fact of a new bar opening. And a new bar will appear only with the arrival of a new tick. If there is a new bar in EURUSD, but the USDCAD has not yet received a new quote corresponding to the new bar, the new bar will not be build. But we need to know the exact fact of the new bar opening without any reservations about its time. We need to know the fact of the beginning of the construction of a new bar:

if there is a new bar on M5 on EURUSD, then...
if there is a new bar on H1 on EURUSD, then ...
if there is a new bar on D1 at EURUSD, then...
--------
if there is a new bar on M5 on USDCAD...
if there is a new bar on H1 on USDCAD, then ...
if there is a new bar on D1 on USDCAD, then ...

You are wrong. The new bar is formed automatically even without the arrival of the quote. That is, the new bar will be the size of one pip and will be located at the last price.
 
Реter Konow:
You are wrong. A new bar is formed automatically, even without the arrival of a quote. That is, the new bar will be the size of one pip and will be located at the last price.

Are you familiar with the concept of "bar skipping"?

 
Реter Konow:
You are wrong. A new bar is formed automatically, even without the arrival of a quote. That is, the new bar will be the size of one pip and will be at the last price.
In order to see for yourself that you are wrong, you need to compare the close and open prices of the nearest bars, they are not always the same.


With respect.

 
Artyom Trishkin:

Are you familiar with the concept of "bar skipping"?

I haven't seen it on the charts.
 
Andrey Kisselyov:
To be sure of your delusion, you need to compare the close and open prices of the nearest bars, they are not always the same. Besides, you will get a bar that does not exist and has already opened according to your algorithm after the weekend.


Respectfully.

Sometimes I can't understand what you are trying to say at all. Please try to express your thoughts more clearly.

Regards.

 
Реter Konow:
I haven't seen that on the charts.

Read it, look it up, especially closer to the beginning of the story - 1970 - there are only daily charts there at all.

 

Basically, my solution is as simple as a 5 kopeck. It is several time slot counters of different durations. When the counter reaches its maximum value it is reset to zero and a new bar arrival event is set for the corresponding timeframe.

The only thing to do is to calibrate the start of each counter.

I will fine-tune it and give it to the public. I cannot say when exactly. Maybe in a couple of days.

 
Artyom Trishkin:

Read it, look it up, especially closer to the beginning of the story - the 1970s - there are only diaries there at all.

Perhaps, well, I'll have a look.
 
Реter Konow:

Sometimes I can't understand what you are trying to say at all. Try to express your thoughts more clearly.

Respectfully.

how much clearer?
To be sure of your delusion, you need to compare the close and open prices of the nearest bars, they are not always the same. Besides, you will get a bar that does not exist and has already opened according to your algorithm after the weekend.

Sincerely.