init
This commit is contained in:
@@ -510,14 +510,13 @@ class Analyzer:
|
||||
|
||||
isbuy = 0
|
||||
# 볼린저밴드 하단에 부딪힌 후 2개의 양봉을 보였으면, 매수한다.
|
||||
count = 0
|
||||
if len(STOCK) > 3 and STOCK[-1]['open'] < STOCK[-1]['close']:
|
||||
for idx in range(2, 5):
|
||||
if STOCK[-idx]['open'] < STOCK[-idx]['close']:
|
||||
count += 1
|
||||
if count > 1:
|
||||
if (BOLINGERBAND[last_index]['lower'] < STOCK[-3]['close'] < BOLINGERBAND[last_index]['upper'] or BOLINGERBAND[last_index]['lower'] < STOCK[-4]['close'] < BOLINGERBAND[last_index]['upper']):
|
||||
if len(STOCK) > 5:
|
||||
if STOCK[-1]['open'] < STOCK[-1]['close'] and STOCK[-2]['open'] < STOCK[-2]['close']:
|
||||
if (STOCK[-3]['low'] <= BOLINGERBAND[-3]['lower'] <= STOCK[-3]['high'] or
|
||||
STOCK[-4]['low'] <= BOLINGERBAND[-4]['lower'] <= STOCK[-4]['high'] or
|
||||
STOCK[-5]['low'] <= BOLINGERBAND[-5]['lower'] <= STOCK[-5]['high']):
|
||||
isbuy = 1
|
||||
|
||||
# 종가가 120일선 아래에 있으면 매수한다.
|
||||
#if STOCK[last_index]['close'] < STOCK[last_index]['avg120']:
|
||||
# isbuy = 1
|
||||
|
||||
Reference in New Issue
Block a user