ta4j
ta4j copied to clipboard
order book imbalance
any suggestions for building out orderbook imbalance indicator? seem to be able to stitch some pieces of code together from other indicators but nothing specific for OFI. thanks in advance
We could add a new core model interface (ex. OrderBook) and then add another isSatisfied overload to Rule, i.e.
boolean isSatisfied(int index, TradingRecord tradingRecord, OrderBook orderBook)
It's kind of a bolt-on approach but it's very quick to get off the ground, consistent with the existing approach, and there should be little (if any) backwards compatibility issues or required refactoring.
Related: https://github.com/ta4j/ta4j/pull/961#issuecomment-1515119151