스토캐스틱, RSI 추가

This commit is contained in:
dsyoon
2021-11-12 23:02:51 +09:00
parent 3aa11a3d0c
commit 72828f3d39
2 changed files with 21 additions and 7 deletions

View File

@@ -377,13 +377,13 @@ class Analyzer:
return status, buy_price
def getPositionalEnergy(self, stock, i):
def getPositionalEnergy(self, stock, last_index):
# 260 (= 52 * 5)일 중 가장 찾은 금액과 가장 높았던 금액 중 현재가의 위치 계산
top = stock[i]['close']
bottom = stock[i]['close']
top = stock[last_index]['close']
bottom = stock[last_index]['close']
for i in range(8, 260):
for i in range(1, 260):
if i > len(stock) or not stock[-i]:
break