Merge pull request #1886 from 1122455801/mod——kk——0701
[Update] king_keltner_strategy.py
This commit is contained in:
commit
6d9384c56b
@ -96,7 +96,7 @@ class KingKeltnerStrategy(CtaTemplate):
|
||||
|
||||
vt_orderid = self.sell(self.intra_trade_high * (1 - self.trailing_percent / 100),
|
||||
abs(self.pos), True)
|
||||
self.vt_orderids.append(vt_orderid)
|
||||
self.vt_orderids.extend(vt_orderid)
|
||||
|
||||
elif self.pos < 0:
|
||||
self.intra_trade_high = bar.high_price
|
||||
@ -104,7 +104,7 @@ class KingKeltnerStrategy(CtaTemplate):
|
||||
|
||||
vt_orderid = self.cover(self.intra_trade_low * (1 + self.trailing_percent / 100),
|
||||
abs(self.pos), True)
|
||||
self.vt_orderids.append(vt_orderid)
|
||||
self.vt_orderids.extend(vt_orderid)
|
||||
|
||||
self.put_event()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user