For an indicator I’m writing, I would like to cache properties calculated over the previous N bars, and do disjoint, simpler calculations on the current bar relative to those properties. However, with the current API and documentation, the Calculator.map function is called for every bar with the state of N-1 as the input Calculator object. This makes sense for a lot of indicators, but doesn’t allow state caching for more complicated indicators.
Is there an optional callback that could be added to call the Calculator object at the open of each new bar as a transition step so that any calculation that uses calculations on historic data can be cached?