I developed an indicator that calculates on each tick. However, when it gets plotted on chart, the indicator value is one bar behind comparing to current bar. Please see my screenshot attached.
Would you please help me understand why this could happen, and how it can be fixed?
Thank you!

Comment