If you look closely, you will see that all your moving average graphs are shifted to the right slightly. That is because you assign the average value for a period to the end of the period instead of to the middle of the period. It doesn't make a big difference when looking at the graph all by itself, but it creates false impressions when comparing it directly to other graphs.
Well, moving averages here have not been shifted to the right, but instead they have not been calculated for the initial period of the SMA. Say, we are calculating a 30-day SMA for price - since, for the first 30 days, we don't have 30 points to calculate moving average on, it is difficult to calculate SMA in that period, which is why these periods have been omitted from the graph.
If you look closely, you will see that the ends align for the actual data and their SMA vs a shift.
You are, for example, assigning the average for the first 30 days to the 30th day in the graph. It works better if you assign it to the 15th day instead. Try it and you will see the graphs line up nicely instead of the SMA graph having a 15 day lag.