Lean
Lean copied to clipboard
Data types can define how they update security cache
Expected Behavior
- Data sources can define a way to update the security cache price properties
See related https://github.com/QuantConnect/Lean/pull/7808
Actual Behavior
Not possible. Security cache class knows how to handle trade/tick/quote bars, does not how to handle python data for example
Potential Solution
- We can create a base virtual function in BaseData class
- override in quotebar/tradebar and tick, this would just be moving the code from the security cache into each specific data type
- at this point custom data sources in python could define their own implementation. We could explore adding a helper method for o/h/l/c/v just to make users life easier
Checklist
- [x] I have completely filled out this template
- [x] I have confirmed that this issue exists on the current
masterbranch - [x] I have confirmed that this is not a duplicate issue by searching issues
TODO: consider handling OHLC specifically for custom data types instead, not generically not worth it for now