I have tested your script and I am not able to reproduce this behavior.
However, your script adds a series and has no conditions with BarsInProgress. This means the value will sometimes be for the tick series and will some times be for the primary series.
Your print doesn't specify which BarsInProgress is processing.
However, that said, I am seeing that the DeltaClose is the same from the script as it is from the indicator on the chart.
Below is a link to a video of the test.
Comment