Skip to content

Commit

Permalink
#30 0.6.3 发布
Browse files Browse the repository at this point in the history
  • Loading branch information
zengbin93 committed Jan 31, 2021
1 parent 390d6f5 commit be954d4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion czsc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .factors import CzscFactors
from .utils.ta import SMA, EMA, MACD, KDJ

__version__ = "0.6.2"
__version__ = "0.6.3"
__author__ = "zengbin93"
__email__ = "[email protected]"

Expand Down
46 changes: 23 additions & 23 deletions czsc/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def check_bi(bars: List[NewBar]):
except:
return None, bars

bars_a = [x for x in bars if x.dt <= fx_b.elements[2].dt]
bars_a = [x for x in bars if fx_a.elements[0].dt <= x.dt <= fx_b.elements[2].dt]
bars_b = [x for x in bars if x.dt >= fx_b.elements[0].dt]
max_high_b = max([x.high for x in bars_b])
min_low_b = min([x.low for x in bars_b])
Expand Down Expand Up @@ -270,29 +270,29 @@ def __update_bi(self):
def get_signals(self):
s = OrderedDict({"symbol": self.symbol, "dt": self.bars_raw[-1].dt, "close": self.bars_raw[-1].close})
s.update({
"最近三根无包含K线形态": "other",
"最近三根无包含K线形态": "其他",
"未完成笔的延伸长度": 0,
"第N笔方向": "other",

"第N笔的三笔形态": "other",
"第N-1笔的三笔形态": "other",
"第N-2笔的三笔形态": "other",
"第N-3笔的三笔形态": "other",

"第N笔的五笔形态": "other",
"第N-1笔的五笔形态": "other",
"第N-2笔的五笔形态": "other",
"第N-3笔的五笔形态": "other",

"第N笔的七笔形态": "other",
"第N-1笔的七笔形态": "other",
"第N-2笔的七笔形态": "other",
"第N-3笔的七笔形态": "other",

"第N笔的九笔形态": "other",
"第N-1笔的九笔形态": "other",
"第N-2笔的九笔形态": "other",
"第N-3笔的九笔形态": "other",
"第N笔方向": "其他",

"第N笔的三笔形态": "其他",
"第N-1笔的三笔形态": "其他",
"第N-2笔的三笔形态": "其他",
"第N-3笔的三笔形态": "其他",

"第N笔的五笔形态": "其他",
"第N-1笔的五笔形态": "其他",
"第N-2笔的五笔形态": "其他",
"第N-3笔的五笔形态": "其他",

"第N笔的七笔形态": "其他",
"第N-1笔的七笔形态": "其他",
"第N-2笔的七笔形态": "其他",
"第N-3笔的七笔形态": "其他",

"第N笔的九笔形态": "其他",
"第N-1笔的九笔形态": "其他",
"第N-2笔的九笔形态": "其他",
"第N-3笔的九笔形态": "其他",
})
s['未完成笔的延伸长度'] = len(self.bars_ubi)

Expand Down
2 changes: 1 addition & 1 deletion czsc/trader.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def run_selector(self):
nine_values = [x.value for x in FdNine.__members__.values() if x.name[0] in ["L", "S"]]
# seven_values = [x.value for x in FdSeven.__members__.values() if x.name[0] in ["L", "S"]]

for freq in self.freqs:
for freq in ["15分钟", "30分钟", "60分钟", "日线"]:
if s['{}_第N笔的九笔形态'.format(freq)] in nine_values:
return "{}_第N笔的九笔形态_{}".format(freq, s['{}_第N笔的九笔形态'.format(freq)])

Expand Down

0 comments on commit be954d4

Please sign in to comment.