Anyone who wanted to see charts without missing bars - here =)

 
Today an article Charts without "holes" was published, which describes in detail the algorithm for filling in missing bars.
There was so much "shouting" (and just statements) on the forum in favour of such charts that I just couldn't help but look into the matter =)

So, let's try it and make suggestions and suggestions for improvement.

ps: discuss in an article is not very convenient - every time you download an extra hundred kilobytes - why? ;)
 
komposter писал (а):
Today an article Charts without "holes" was published, which describes in detail the algorithm for filling in missing bars.
There was so much "shouting" (and just statements) on the forum in favour of such charts that I just couldn't help but look into the matter =)

So, let's try it and make suggestions and suggestions for improvement.

ps: discuss in an article is not very convenient - every time you download an extra hundred kilobytes - why? ;)

Please advise why you have chosen an Expert Advisor rather than an indicator for "AllMinutes.mq4"?
(I myself wrote "close to it" as an indicator only because I thought "better many indicators on a chart than many charts with one expert". ZS. Lots of indicators/experts/scripts for "my nuances" are fundamental).
 
(I myself wrote "close to it" in the form of an indicator only because I felt that "better many indicators on a chart than many charts with one expert". ZZY. Many indicators/experts/scripts for "my nuances" are fundamental).


AllMinutes.mq4, working on one chart, updates multiple charts (up to 32).
What is the indicator for? Is it a pity to have one "service" chart? ;)

Actually, I just did not think about such a possibility )))
 
The window for editing the post behaves strangely, and the content of the post after pressing "add comment" has disappeared somewhere, ok, I'll try to type again. I think it should be like this: 1. at the first second of a new bar, we look if there is a quote: a) yes, there is a quote - the bar is drawn normally, the code can rest until the end of the bar time (the start without a new tick will not work, so surely we need a script); b) no quote - we draw an "empty bar" and switch to the mode of periodical checking for the tick to appear within our "empty bar"; 2. if an "empty bar" has been drawn, periodically check if a quote has appeared: a) a tick has appeared - replace the "empty" bar with a real one and set the code on holidays until the end of the current bar time b) no tick - continue to be in the waiting mode; this will significantly decrease the CPU load :)
 
The 0th bar will not be updated "normally" - these are off-line charts.
And drawing a non-existent price seems wrong to me too - a missed bar should only be drawn when it is clear that it is missed =)
 
Gentlemen! The problem is solved in this way in only a small part -

1. Built-in indicators (and those delivered with MT4) will still work incorrectly, as well as EAs based on them. You can, of course, rewrite the necessary ones... that's what many do :)
2. I, for example, would like to know what causes a gap in data - it's one thing when the price does not change, and quite another thing when it is a consequence of technical problems.
Again with the zero bar. That it is skipped can be determined when more time has passed from the last bar than the chart period. But there is no information about the reasons for such a skip... And there is no guarantee that we will be able to place (close) an order at the last known price at this moment.
 
>> And no one guarantees that an order can be placed (closed) at the last known price at that moment.

If the price hasn't changed, why is "no one guaranteed"?
Search this forum and http://www.metatrader4.com/ru/forum for discussion threads on bar skips.
The topic is so beaten up that all that remains is a recommendation to search the forums.
 
1. Built-in indicators (and those supplied with MT4) will still not work correctly, nor will EAs based on them. You can, of course, rewrite the necessary ones... which is exactly what many do :)

Why? On ALL* charts too?


Again - with a zero bar. That it is skipped can be determined when more time has passed from the last bar than the chart period. But there is no information about the reasons of such skipping...

This is why AllMinutes only draws missed bars when the first "normal" bar appears.
 
komposter писал (а):

1. Built-in indicators (and those supplied with MT4) will still not work correctly, nor will EAs based on them. You can, of course, rewrite the necessary ones... which is exactly what many do :)

Why? They do it on ALL* charts too?

Because indicators are calculated for a certain number of bars backwards. If there are gaps - it is clear that the same MA may be calculated at different periods of time backwards. I.e. when calculating MA(9) it is implied that MA is calculated for the last 9 time periods. And if there are omissions, we will get (in fact) then MA(10), then MA(20).


Again - with a zero bar. That it is skipped can be determined when more time has passed from the last bar than the chart period. But there is no information about the reasons of such skipping.

This is why AllMinutes only draws missed bars when the first "normal" bar appears.


The question with the Reason for skipping is still open.
 
Renat:
>> And no one guarantees that an order can be placed (closed) at the last known price at that moment.

If the price has not changed, why is "no one guarantees"?

Because there may be some technical problems, apart from the fact that the price did not change. I do not think we need to explain what we are talking about.


Search this forum and http://www.metatrader4.com/ru/forum for threads discussing bar skips.
The topic is so hackneyed that all that remains is a recommendation to search the forums.

I agree, it's trite. And it still is.
 
Because the indicators are calculated a certain number of bars backwards. If there are gaps - it is clear that the same MA may at different points in time be calculated for different periods of TIME backwards. I.e. when calculating MA(9) it is implied that MA is calculated for the last 9 time periods. And if there are omissions, we will get (in fact) then MA(10), then MA(20).


Why? On ALL* charts too?


I specifically clarified: on the charts generated by the AllMinutes expert are also wrong?


The question with the REASON of skipping is still open.


Alternatively, the constant checking of IsConnected().
Besides, if the bars were missing due to loss of connection, they must be downloaded when the connection is restored.
However, I did not test such a situation and do not know how the "hole filler" would behave.