Merge pull request #1836 from 1122455801/backtesting_mod_0615

[Mod] 回测引擎增加日期过滤
This commit is contained in:
vn.py 2019-06-16 14:34:39 +08:00 committed by GitHub
commit 6909588b9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,6 +214,10 @@ class BacktestingEngine:
if not self.end:
self.end = datetime.now()
if self.start >= self.end:
self.output("起始日期必须小于结束日期")
return
self.history_data.clear() # Clear previously loaded history data
# Load 30 days of data each time and allow for progress update