From 38338ddbc04748386ba16b5b9e752e61b1ace6d8 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Fri, 15 Dec 2017 20:22:55 +0800 Subject: [PATCH] [Fix]Close #643 --- vnpy/trader/app/ctaStrategy/ctaTemplate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vnpy/trader/app/ctaStrategy/ctaTemplate.py b/vnpy/trader/app/ctaStrategy/ctaTemplate.py index 8a075d70..a460e8f1 100644 --- a/vnpy/trader/app/ctaStrategy/ctaTemplate.py +++ b/vnpy/trader/app/ctaStrategy/ctaTemplate.py @@ -192,7 +192,8 @@ class CtaTemplate(object): #---------------------------------------------------------------------- def saveSyncData(self): """保存同步数据到数据库""" - self.ctaEngine.saveSyncData(self) + if self.trading: + self.ctaEngine.saveSyncData(self) ########################################################################