I actually just wrote a small article on my blog about taking in price update data and creating your own simple time series and indicators from it. Although I typically work in C#, but I don't see any reason the code wouldn't be somewhat similar.
http://programmingandtrading.blogspot.com/2013/10/creating-indicators-from-live-data.html
Hope it helps!
http://programmingandtrading.blogspot.com/2013/10/creating-indicators-from-live-data.html
Hope it helps!
