Skip to content

Commit

Permalink
Merge branches 'develop' and 'master' of https://github.com/ricequant…
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWang committed Mar 31, 2017
2 parents 59225e1 + 878b29f commit 21f4404
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rqalpha/model/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ def mavg(self, intervals, frequency='1d'):

# copy form history
env = Environment.get_instance()
dt = env.calendar_dt

if (env.config.base.frequency == '1m' and frequency == '1d') or ExecutionContext.phase == EXECUTION_PHASE.BEFORE_TRADING:
# 在分钟回测获取日线数据, 应该推前一天
Expand All @@ -308,6 +309,7 @@ def vwap(self, intervals, frequency='1d'):

# copy form history
env = Environment.get_instance()
dt = env.calendar_dt

if (env.config.base.frequency == '1m' and frequency == '1d') or ExecutionContext.phase == EXECUTION_PHASE.BEFORE_TRADING:
# 在分钟回测获取日线数据, 应该推前一天
Expand Down

0 comments on commit 21f4404

Please sign in to comment.