So the scenario is following:
I do have main data series, which is 1 min timeframe bars.
Also I have secondary data series, which is 1 tick timeframe.
In order to understand how this behave inside I wrote simple script which print me tick's data and respective bar's data.
As an example I got the following:
Date and Time of a Tick; Price of the Tick; Current 1Min bar number
1T bar: Time 27.08.2020 18:11:03; Close 3496,63; 1M bar Number 100
1T bar: Time 27.08.2020 18:11:03; Close 3496,46; 1M bar Number 100
1T bar: Time 27.08.2020 18:11:03; Close 3496,45; 1M bar Number 100
.
.
.
1T bar: Time 27.08.2020 18:11:56; Close 3495,14; EMA 3495,34110709542; 1M bar Number 100
1T bar: Time 27.08.2020 18:11:56; Close 3495,2; EMA 3495,31288567633; 1M bar Number 100
1M bar: 101 Time 27.08.2020 18:12:00; Open 3496,63; High 3496,7; Low 3494,93; Close 3495,2
And the result you see above is CONFUSING! This is far away from how realtime bars do shape.
As you may see first and last Ticks prices are respectively Open and Close of the bar they shape. So they belong to this bar. But at the same time bar's number is different to what we see near by each tick.
So it means that while ticks of a new (not shaped yet) bar appear, the current bar is still the previous one.. This is ok for OnBarClose Calculation setting but, I think, not acceptable for Calculate.OnEachTick or OnPriceChange.
My goal is to work with history of 1 min bars, where most recent bar is an actual one ( accessible via Close[0], Open[0] etc) and changing untile closed. I was expecting that second data series could help me but it doesnt.. there is no any lets say "temporary" actual bar.. seems I have to construct it myself somehow.
Any comment/advise ?
thanks a lot in advance
Andrei
Comment