From 838727f015a401b46dddfc74f59bd9e9068ec7b2 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Tue, 2 Jul 2019 14:57:26 +0800 Subject: [PATCH] [Mod] rename variable --- .../cta_strategy/strategies/king_keltner_strategy.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vnpy/app/cta_strategy/strategies/king_keltner_strategy.py b/vnpy/app/cta_strategy/strategies/king_keltner_strategy.py index 9f918c1e..1176641b 100644 --- a/vnpy/app/cta_strategy/strategies/king_keltner_strategy.py +++ b/vnpy/app/cta_strategy/strategies/king_keltner_strategy.py @@ -94,17 +94,17 @@ class KingKeltnerStrategy(CtaTemplate): self.intra_trade_high = max(self.intra_trade_high, bar.high_price) self.intra_trade_low = bar.low_price - vt_orderid = self.sell(self.intra_trade_high * (1 - self.trailing_percent / 100), - abs(self.pos), True) - self.vt_orderids.extend(vt_orderid) + vt_orderids = self.sell(self.intra_trade_high * (1 - self.trailing_percent / 100), + abs(self.pos), True) + self.vt_orderids.extend(vt_orderids) elif self.pos < 0: self.intra_trade_high = bar.high_price self.intra_trade_low = min(self.intra_trade_low, bar.low_price) - vt_orderid = self.cover(self.intra_trade_low * (1 + self.trailing_percent / 100), - abs(self.pos), True) - self.vt_orderids.extend(vt_orderid) + vt_orderids = self.cover(self.intra_trade_low * (1 + self.trailing_percent / 100), + abs(self.pos), True) + self.vt_orderids.extend(vt_orderids) self.put_event()