I am writing my own trading platform using python. Something similar to event driven model from QuantStarts QSForex ( but something more speciic to my needs.
My problem is that the Oanda API only streams tick data and not minute/hour data. So I have to convert tick data into the timeframe I require for my system . For example I am only interested in 5 minute bars.
My thought was to simply create a DataHandler that does the following
on each tick Copy the data into a Pandas dataframe with the timestamp as the DateTimeIndex
at the 5 minute mark use the Pandas resample() method (to convert the data to 5 minutes
trigger a 'TICK' or data event to add the data to my queue for processing