[Fix]Close #599
This commit is contained in:
parent
cc5c85f1ba
commit
d8817247d3
@ -408,7 +408,7 @@ class BarManager(object):
|
||||
self.xminBar.volume += int(bar.volume)
|
||||
|
||||
# X分钟已经走完
|
||||
if not bar.datetime.minute % self.xmin: # 可以用X整除
|
||||
if not (bar.datetime.minute + 1) % self.xmin: # 可以用X整除
|
||||
# 生成上一X分钟K线的时间戳
|
||||
self.xminBar.datetime = self.xminBar.datetime.replace(second=0, microsecond=0) # 将秒和微秒设为0
|
||||
self.xminBar.date = self.xminBar.datetime.strftime('%Y%m%d')
|
||||
|
Loading…
Reference in New Issue
Block a user