Given a stream of real-time financial data, write an algorithm to find the moving average within a sliding window.