This commit is contained in:
dsyoon
2021-07-13 20:00:24 +09:00
parent 02ffb74849
commit ffdd8dea70
5 changed files with 37 additions and 33204 deletions

View File

@@ -62,12 +62,15 @@ class Analyzer:
cursor.execute('SELECT * FROM fnguide WHERE rowid=?', (rowid,))
result = cursor.fetchone()
while result != None:
if result[2] == "227950":
print (1)
data = json.loads(result[2])
self.fnguide[result[0]] = True
if (year1 in data and year2 in data and year3 in data):
if (data[year1]['영업이익'] < 0 and data[year2]['영업이익'] < 0 and data[year3]['영업이익'] < 0):
# 3년 연속 영업이익이 적자이면 매수하지 않는다.
if (data[year1]['영업이익'] < 0 or data[year2]['영업이익'] < 0 or data[year3]['영업이익'] < 0):
# and 3년 연속 영업이익이 적자이면 매수하지 않는다.
# or: 3년 중 1번이라도 영업이익이 적자이면 매수하지 않는다.
self.fnguide[result[0]] = False
if (data[year1]['영업이익'] < -100):
# 전년 영억적자가 100억 이상이면 매수하지 않는다.
@@ -345,6 +348,12 @@ class Analyzer:
status += eveningstar_status
"""
# Potential Energy
potential_energy_status = self.common.checkPotentialEnergy(STOCK, i)
# 365일 중 가장 찾은 금액과 가장 높았던 금액 중 현재가의 위치 계산
if potential_energy_status != "":
status += potential_energy_status
return status, buy_price
# 그래프 출력