Add instrument history helpers
This commit is contained in:
@@ -269,6 +269,14 @@ impl StrategyContext<'_> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn instruments_history(&self, symbols: &[&str]) -> Vec<&Instrument> {
|
||||
self.data.instruments_history(symbols)
|
||||
}
|
||||
|
||||
pub fn active_instruments(&self, symbols: &[&str]) -> Vec<&Instrument> {
|
||||
self.data.active_instruments(self.execution_date, symbols)
|
||||
}
|
||||
|
||||
pub fn all_instruments(&self) -> Vec<&Instrument> {
|
||||
self.data.all_instruments()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user