Thanks for the EA. Today I noticed that it doesn't process missed ticks and as a result High/Low of the written bar are stored incorrectly if the new High/Low occurred on such a missed tick. As there are countless ticks per minute which are not sent by the broker (aka missed ticks) the issue occures quite often. Especially new Highs/Lows often consist of just a single tick. Many times High/Low of the bar is updated immediately but the tick itself is not sent by the broker.
A very simple example for a bullish bar with the High on a missed tick:
Tick 1: 1.2500'0 - bar state: 0/0/0/0 (meant as shortcut for O/H/L/C, only the last digit noted)
Tick 2: 1.2500'2 - bar state: 0/2/0/2
Tick 3: 1.2500'4 - bar state: 0/4/0/4
Tick 4: 1.2500'5 - bar state: 0/5/0/5 - if this tick is missed/not sent by the broker the stored High of the recorded bar will still show 4
Tick 5: 1.2500'4 - bar state: 0/5/0/4
Tick 6: 1.2500'3 - bar state: 0/5/0/3
So with tick 4 missing the stored second bar looks like 0/4/0/3 while the M1 bar correctly shows 5 as the High.
How to fix this: You should not only process the arrived tick as new Close but also monitor High/Low of the corresponding M1 bar. If the M1 bar makes a new High/Low during the building time of the second-bar and the new H/L is not reflected in the tick price itself then you know you missed a tick and should update H/L of the current Second-bar.
Why is this an issue: Because regular candles of the regular timeframes make new High/Lows but there are cases where your Second-chart doesn't.
Did I explain this in an understandable way? I could elaborate more and post screenshots of examples and the data in the HST files if you wish so. But I think the issue is easy to grasp and just writing it up like I did would be enough (and saves me some time). :-)
What's your opinion? Thank you
ps: Is it possible to store the seconds in the .HST file? You only store full minutes so all bars of a minute have the same timestamp. See the attached screenshot. It shows 4sec-bars of the Russel. All bars of a minute have the same timestamp but they should have different ones, each one with a shift of 4 sec. to the precessor.