init
This commit is contained in:
@@ -476,6 +476,7 @@ class AnalyzerSqlite:
|
|||||||
self.makeDir("daily_bol_candidate")
|
self.makeDir("daily_bol_candidate")
|
||||||
self.makeDir('daily_3_5')
|
self.makeDir('daily_3_5')
|
||||||
self.makeDir('daily_5_20')
|
self.makeDir('daily_5_20')
|
||||||
|
self.makeDir('daily_ichimok')
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -602,6 +603,15 @@ class AnalyzerSqlite:
|
|||||||
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
|
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
|
||||||
result.append({'ticker_code': CODE, 'ticker_name': NAME,'close': stock_daily['close'][0], 'type': '3~5'})
|
result.append({'ticker_code': CODE, 'ticker_name': NAME,'close': stock_daily['close'][0], 'type': '3~5'})
|
||||||
|
|
||||||
|
check = self.common.buy_stock_ichimok(stock_daily)
|
||||||
|
if check:
|
||||||
|
count += 1
|
||||||
|
dir_name = "daily_ichimok"
|
||||||
|
log = str(count) + "_" + dir_name + "_"
|
||||||
|
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
|
||||||
|
result.append({'ticker_code': CODE, 'ticker_name': NAME,'close': stock_daily['close'][0], 'type': 'ichimok'})
|
||||||
|
|
||||||
|
|
||||||
pStr = '[Stock Analysis]\n'
|
pStr = '[Stock Analysis]\n'
|
||||||
i = 0
|
i = 0
|
||||||
for item in result:
|
for item in result:
|
||||||
|
|||||||
@@ -724,3 +724,17 @@ class Common:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def buy_stock_ichimok(self, stock_daily):
|
||||||
|
# 어제의 저가는 선행 1과 2 사이에 있었는데, 오늘은 선행 1과 2 위로 올라왔다.
|
||||||
|
|
||||||
|
check_buy = False
|
||||||
|
|
||||||
|
min_open_close_1 = min(stock_daily['open'].iloc[-2], stock_daily['close'].iloc[-2])
|
||||||
|
min_open_close = min(stock_daily['open'].iloc[-1], stock_daily['close'].iloc[-1])
|
||||||
|
|
||||||
|
if (stock_daily['leadingSpan1'].iloc[-2] < min_open_close_1 <= stock_daily['leadingSpan2'].iloc[-2] and
|
||||||
|
stock_daily['leadingSpan1'].iloc[-1] < stock_daily['leadingSpan2'].iloc[-1] < min_open_close):
|
||||||
|
check_buy = True
|
||||||
|
|
||||||
|
return check_buy
|
||||||
|
|||||||
Reference in New Issue
Block a user