init
This commit is contained in:
@@ -512,11 +512,32 @@ class Common:
|
||||
어제는 정배열이 아니었는데, 오늘은 정배열인 경우
|
||||
"""
|
||||
if len(stock) > 2:
|
||||
if (not (stock[i-1]["avg120"] < stock[i-1]["avg60"] < stock[i-1]["avg20"] < stock[i-1]["avg5"]) and
|
||||
(stock[i]["avg120"] < stock[i]["avg60"] < stock[i]["avg20"] < stock[i]["avg5"])):
|
||||
if not (stock[i - 1]["avg120"] < stock[i - 1]["avg60"] < stock[i - 1]["avg20"] < stock[i - 1]["avg5"]) and (stock[i]["avg120"] < stock[i]["avg60"] < stock[i]["avg20"] < stock[i]["avg5"]):
|
||||
return "arrange_"
|
||||
return ""
|
||||
|
||||
def checkPotentialEnergy(self, stock, i):
|
||||
# 365일 중 가장 찾은 금액과 가장 높았던 금액 중 현재가의 위치 계산
|
||||
|
||||
top = stock[i]['close']
|
||||
bottom = stock[i]['close']
|
||||
price = stock[i]['close']
|
||||
|
||||
if len(stock) > 365:
|
||||
for i in range(2, 365):
|
||||
if top < stock[-i]["close"]:
|
||||
top = stock[-i]["close"]
|
||||
|
||||
if stock[-i]["close"] < bottom:
|
||||
bottom = stock[-i]["close"]
|
||||
|
||||
if top - bottom > 0:
|
||||
energy = (price - bottom) / (top - bottom)
|
||||
if energy < 0.5:
|
||||
return "e(" + str(round(energy, 2)) + ")_"
|
||||
return ""
|
||||
|
||||
|
||||
def check_W1Rise(self, stock, i, limit):
|
||||
if len(stock) > 5:
|
||||
rate = round((stock[i]["close"] - stock[i-4]["close"]) / stock[i-4]["close"],2)
|
||||
|
||||
Reference in New Issue
Block a user