oransel/node-talib

Is there a way to stream data to these functions?

Closed this issue · 2 comments

I want to run these over a large set of data, getting an updated value of each indicator at each data point. I don't want to hold all the data in memory as the dataset is large. Is there a way to stream data points to the functions and have it update incrementally?

Thanks!

As far as I can tell, the underlying implementation of the library requires the data to be in memory to iterate over it. I am sure there can be a way to have a running state in the API but it will require extensive development.

The current issue is a bit relevant for me. I need to compute only last value for the time series having all previous elements already computed. i.e. some new price have arrived and I need to calculate a new indicator value. It is useful in terms of optimization if you have several 1000 elements. For now I'm just pass in to the functions only 50-200 and extract the last value which equals to passing 1000. But still some functions can require such things as 'last high' that can go beyond these 200 candles. Am I right?