Also: please test this only from a single series chart, as if you're working with a MultiSeries one you would be using non equidistant bar spacing -
CalculateOnBarClose will always be 'true' for historical data, setting it to 'false' and working inside FirstTickOfBar would only be effective using realtime data going forward or for example in Market Replay mode.

My stupid bad.
) . Unfortunately, as you can see, they are still not even close. This picture is of your Test2 calling tsiTest.
Comment