Skip to content

Commit

Permalink
0.8.14 fix signals (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
zengbin93 committed Jan 21, 2022
1 parent 4b445dd commit 8b1847a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions czsc/traders/advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,10 @@ def _cal_signals(self):
s.update(ks.signals)

s.update(self.kas[base_freq].bars_raw[-1].__dict__)
s.update(self.get_s_long_pos())
s.update(self.get_s_short_pos())
if self.long_pos:
s.update(self.get_s_long_pos())
if self.short_pos:
s.update(self.get_s_short_pos())
return s

def update(self, bar: RawBar):
Expand Down

0 comments on commit 8b1847a

Please sign in to comment.