Skip to content

Commit

Permalink
history_bars 在 after_trading 时取当日日线
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuizi7 committed Oct 10, 2018
1 parent eeee585 commit 5952c05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rqalpha/api/api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,9 @@ def history_bars(order_book_id, bar_count, frequency, fields=None, skip_suspende
if frequency == '1d':
sys_frequency = Environment.get_instance().config.base.frequency
if ((
sys_frequency in ['1m', 'tick'] and not include_now
sys_frequency in ['1m', 'tick'] and
not include_now and
ExecutionContext.phase() != EXECUTION_PHASE.AFTER_TRADING
) or (
ExecutionContext.phase() == EXECUTION_PHASE.BEFORE_TRADING
)):
Expand Down

0 comments on commit 5952c05

Please sign in to comment.