Add suspended and ST data helpers
This commit is contained in:
@@ -285,6 +285,16 @@ impl StrategyContext<'_> {
|
||||
self.data.next_trading_date(date, n)
|
||||
}
|
||||
|
||||
pub fn is_suspended(&self, symbol: &str, count: usize) -> Vec<bool> {
|
||||
self.data
|
||||
.is_suspended_flags(self.execution_date, symbol, count)
|
||||
}
|
||||
|
||||
pub fn is_st_stock(&self, symbol: &str, count: usize) -> Vec<bool> {
|
||||
self.data
|
||||
.is_st_stock_flags(self.execution_date, symbol, count)
|
||||
}
|
||||
|
||||
pub fn has_subscriptions(&self) -> bool {
|
||||
!self.subscriptions.is_empty()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user