Real-time data and indicators with python

Hi every one,

I have no problems to get histocial data and real-time data.
Now I would like to calculate indicators using historical data in real time, as twap and moving average.

I’m wondering if I need to stock some historical data in a variable, with a loop to add the last value (depend on the timeframe), Then create a method which calculation and display.

Does someone have a good way or advice to do that?

Thanks!
Ben

Not as suggestion, but maybe some popular libraries like ta-lib or tulip might be helpful for you to get the indicators values.

Hi aisling

I already check, and yes, ta-lib looks pretty good to fetch some indicators’ data.
But twap is not available.

Maybe I’m on a good way, for the moment, I put my streaming data in lists, I have a maximum value in this list, and each loop I retrieved one to leave the place at another and calculate the indicators again with the precedent value and the new one.

Thanks for your answer

1 Like