mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-10 11:50:32 +08:00
ENH: Change open and close to midnight if using daily input data.
This commit is contained in:
@@ -819,7 +819,10 @@ class TradingAlgorithm(object):
|
||||
@api_method
|
||||
def add_history(self, bar_count, frequency, field,
|
||||
ffill=True):
|
||||
history_spec = HistorySpec(bar_count, frequency, field, ffill)
|
||||
daily_at_midnight = (self.sim_params.data_frequency == 'daily')
|
||||
|
||||
history_spec = HistorySpec(bar_count, frequency, field, ffill,
|
||||
daily_at_midnight=daily_at_midnight)
|
||||
self.history_specs[history_spec.key_str] = history_spec
|
||||
|
||||
@api_method
|
||||
|
||||
Reference in New Issue
Block a user