add isolated increment methods
DaveSkender opened this issue · comments
Implement incrementing scenarios to calculate the next indicator bar:
Internals
- base increment1
- observer
OnNext()
handler
1 uses cached data instead of inputs
Public APIs2
- base increment (system agnostic I/O), all needed inputs, appropriate
TResult
out - external cached (like observer handler, but using external data storage interface), consider cache-aside design pattern.
2 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
- static time-series implementation (see below)
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 */
}