markus it's not super elegant, but what do you think about a util like:
discontinuous_series_helper(lambda series: ta.sma(series, 20), close_stocks)
# where close_stocks is, for example, `[120, 150, 145, 108, 104, nan, nan]`
# the util's procedure is as follows
## if `close_stocks[-1]` is `nan`, it retrun `nan` for the current value
## if `close_stocks[-1]` is not `nan`, call the lamda fnc with `close_stocks` sans all the `nan` values (ie filter them out)
# do this recursively if a series of past values is desired
This would make it so that TA fncs for stocks after closing time would return a current value of nan
, but for time periods where there are candle values, the indicator value(s) would be as expected. This seems like OK behavior to me. Lemme know if i'm missing something though 😃