mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-26 13:18:31 +08:00
MAINT: Pass data_frequency to get_history_window
This allows us to remove the check for whether the provided dt had a time of midnight, which was a flimsy way to infer if the data frequency was 'daily'. Besides the explicit check being preferable, this method was broken on the futures calendar, since midnight is a valid market minute.
This commit is contained in:
@@ -2160,6 +2160,7 @@ class TradingAlgorithm(object):
|
||||
bar_count,
|
||||
frequency,
|
||||
field,
|
||||
self.data_frequency,
|
||||
ffill,
|
||||
)
|
||||
else:
|
||||
@@ -2176,6 +2177,7 @@ class TradingAlgorithm(object):
|
||||
bar_count,
|
||||
frequency,
|
||||
field,
|
||||
self.data_frequency,
|
||||
ffill,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user