Possibly the prices are stored on the broker server with timestamps belonging to the begin instead of the end of the bar, while live prices have a end of bar timestamp. This is not very visible with M1 data, but on 15 min data it can become obvious. Use the TickFix variable for fixing the lookback data on the fly.