Open DaveSkender opened 10 months ago
For the static non-observable time-series implementation, an approach to explore might be in the following form; though, it may need be IReadOnlyList
or IEnumerable
base.
public static class Ema : List<EmaResult>
{
/* saved properties + minimal quote cache */
/* new quotes */
void Add(TQuote quote) { ... }
/* throw simple exception when quotes arrive out of order */
}
Implement incrementing scenarios to calculate the next indicator bar:
Internals
OnNext()
handler1 uses cached data instead of inputs
Public APIs2
TResult
out2 repoints internal cache, then uses internal base increment? this wouldn't perform well if provided data is re-written to memory, but am not sure how to handle CLR compliance otherwise with by reference.
Other considerations