Discussion of article "Liquid Chart" - page 3

 
Any luck finding the cause?
 
handel:
Any luck finding the cause?
It wasn't a quick fix. A thorough tracing is required. I'm about to finish some work and I'll look into the matter.
 
It seems to me that the reason is that at the beginning of each week there is an extra candle, which accumulates and shifts the chart every week, this applies to the daily chart with the base H1. You can make a screenshot at the weekend and at the beginning of the week, it will be clearer.
 

I tried to do my best to contribute, maybe it will help in finding the error. On the pictures taken at different times, you can see how the indicator chart is shifting relative to the main chart.

Files:
H_1-_19.07.png  27 kb
H_1-_01.08.png  19 kb
H_1-_03.08.png  21 kb
 
In the last two pictures you can see the difference in the chart as two candles appeared at once on Monday 03.08.
 
handel:
It seems to me that the reason is that at the beginning of each week there is an extra candle, which accumulates and shifts the chart every week, this applies to the daily chart with the base H1. You can make a screen at the weekend and at the beginning of the week, it will be clearer.

Yes, it does. At certain values of the shift, "phantom bars" appear - for more details, see fig. 4 of the article, the reason for their occurrence is also described there. Since they appear at the junction of weeks, they are most noticeable on the higher timeframes. Especially on the daily chart (as in your example), because the screen shows a time range of several weeks, and with each week the shift is more and more noticeable.

This is not a bug, it is a feature. You could discard "phantom bars", but that's data loss, which is not a good thing. Ideally, you'd want to shift the original graph in such places, but you don't have that option. If synchronisation of the initial and resulting charts is critical for you, you can filter "extra" bars returned by the GetRatesLC() function just before copying them to the indicator buffer.

 
If I understand correctly, the phantom bar appears when the trading session ends at 23:00 on Friday. And if the trading session ends at 23:59, where the bar can appear from. Please describe on a concrete example, what time interval includes two candles that appeared on Monday. I do not understand such a point, the opening price of daily candles on the indicator at the shift to any number of hours remains unchanged, although it should take the opening price of the hour candle, which is the first at this shift?
 
About the opening price -- that's out of the question.
 

Done a similar thing. It seems to work for me without any phantom bars.

Since I can't analyse the source code in its entirety, I only came across some strange things (in my opinion) on the surface.

Firstly, in several places I saw the construction tO-=PeriodSeconds(). I'm not sure it can be done this way, because subtracting PeriodSeconds from t0 you can get to the previous bar. The essence of the situation when t0 is out of bounds is that this liquid bar has not yet started to form and there is no need to try to artificially move its beginning by one period.

Secondly, the closing time should be determined not by the number - how many base bars theoretically fit into the current period relative to the opening, but individually for each bar of the current period take its opening time, take the opening time of the next bar, for the second look for a bar of the base period and read the previous bar in the base period - this will be the end of the liquid bar.

 

Why do I need this? I want to see what Americans, Australians, Japanese, etc. see on daily charts. Since the terminal time is different for everyone, the time of formation of a daily candle is different for everyone, and therefore the picture on the daily charts is different for everyone. Having an opportunity to watch the situation in different time zones, there are more opportunities not to miss the right moment of entry. What if we don't try to subtract the time of the necessary tick by subtracting the shift time from the time of an optredetermined bar. And take the GTM time as a reference point, subtract the shift time from this time and the first tick that comes after this time will go to form a new candle and accordingly the tick that comes before this time will be the last tick of the previous candle. This is the same principle as the formation of a regular chart, if the terminal time is 00:00, it does not matter when the first tick comes, it will still be the first tick of a new candle.