From 20d5ec7371d2ecaf36e0c7dbaf62f0c8d008a3f7 Mon Sep 17 00:00:00 2001 From: chenxy123 Date: Mon, 13 Jun 2016 22:53:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=B8=80=E4=B8=AA=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9A=84bid=E5=92=8Cask=E6=BC=8F=E4=BA=86=E6=A1=A3=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.trader/ctaAlgo/ctaBacktesting.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vn.trader/ctaAlgo/ctaBacktesting.py b/vn.trader/ctaAlgo/ctaBacktesting.py index 753c7afc..19bf0f6c 100644 --- a/vn.trader/ctaAlgo/ctaBacktesting.py +++ b/vn.trader/ctaAlgo/ctaBacktesting.py @@ -284,10 +284,10 @@ class BacktestingEngine(object): buyBestCrossPrice = self.bar.open # 在当前时间点前发出的买入委托可能的最优成交价 sellBestCrossPrice = self.bar.open # 在当前时间点前发出的卖出委托可能的最优成交价 else: - buyCrossPrice = self.tick.askPrice - sellCrossPrice = self.tick.bidPrice - buyBestCrossPrice = self.tick.askPrice - sellBestCrossPrice = self.tick.bidPrice + buyCrossPrice = self.tick.askPrice1 + sellCrossPrice = self.tick.bidPrice1 + buyBestCrossPrice = self.tick.askPrice1 + sellBestCrossPrice = self.tick.bidPrice1 # 遍历限价单字典中的所有限价单 for orderID, order in self.workingLimitOrderDict.items():