nardew / talipp

talipp - incremental technical analysis library for python
https://nardew.github.io/talipp
MIT License
367 stars 59 forks source link

Customizable start time for sampling #141

Open CITIZENDOT opened 2 months ago

CITIZENDOT commented 2 months ago

First of all, Thank you for such a great library :heart:. There are not a lot of packages which offer streaming calculations.

Coming to the issue, Start time of sampling is restricted to the semantic beginning of time units.

https://nardew.github.io/talipp/latest/reference/talipp/input/

Each timeframe is counted from different starting point. Seconds are counted since whole minutes, minutes are counted since whole hours, hours are counted since whole days and days are counted since the beginning of the year.

Why this is an issue? Let's take an example:

I think, Sampler can have an optional starting point (datetime). If user did not set it, it can behave just as it's behaving now. But if user sets it, it'll use it instead.

So, Everyday, user can set it to market's opening time.