This commit is contained in:
dsyoon
2021-07-24 02:15:28 +09:00
parent 184d2a0e02
commit 11534d0e53
2 changed files with 7 additions and 7 deletions

View File

@@ -520,14 +520,14 @@ class Common:
return ""
def checkPotentialEnergy(self, stock, i):
# 365일 중 가장 찾은 금액과 가장 높았던 금액 중 현재가의 위치 계산
# 120일 중 가장 찾은 금액과 가장 높았던 금액 중 현재가의 위치 계산
top = stock[i]['close']
bottom = stock[i]['close']
price = stock[i]['close']
if len(stock) > 365:
for i in range(2, 365):
if len(stock) > 120:
for i in range(2, 120):
if top < stock[-i]["close"]:
top = stock[-i]["close"]
@@ -537,7 +537,7 @@ class Common:
if top - bottom > 0:
energy = (price - bottom) / (top - bottom)
if 0.1 < energy < 0.5:
return "e(" + str(round(energy, 2)) + ")_"
return "p(" + str(round(energy, 2)) + ")_"
return ""