Moving Average calculation

Hello! Could you please explain me why we need shift data by 1 position when we calculate moving average?

Hi Nina,



We shift the data by 1 if we consider only the past data while calculating a moving average. For example, until the 5 minutes candlestick is completely formed we don't know the close price of it, so we use the past close prices to calculate the current trend by taking shift 1.