This commit is contained in:
dsyoon
2023-12-14 09:20:17 +09:00
parent 1fecd560ab
commit e4fb3759c5

View File

@@ -133,8 +133,7 @@ class BuySellChecker():
# 방법 2:
if data['avg480'][i] < data['avg120'][i] < data['avg60'][i] < data['avg20'][i] < data['avg5'][i] < data['close'][i]:
if data['avg240'][i] < min(data['avg5'][i], data['avg20'][i], data['avg60'][i], data['avg120'][i]):
if BUY_LIST is not None and 0 < len(BUY_LIST['buy_list']) and data['ymd'][i] < \
BUY_LIST['buy_list'][-1]['buy_ymd'] + timedelta(minutes=10):
if BUY_LIST is not None and 0 < len(BUY_LIST['buy_list']) and data['ymd'][i] < BUY_LIST['buy_list'][-1]['buy_ymd'] + timedelta(minutes=10):
if BUY_LIST['buy_list'][-1]['buy_price'] < data['close'][i]:
buy_price = data['close'][i]
buy_type = 'golden'
@@ -187,6 +186,13 @@ class BuySellChecker():
sell_price = data['close'][i]
sell_count = sum([price['buy_count'] for price in BUY_LIST['buy_list']])
down_count = [1 for c in range(i - 3, i + 1) if data['close'][c - 1] < data['open'][c]]
if 3 <= sum(down_count):
count = sum([price['buy_count'] for price in BUY_LIST['buy_list']])
if 0 < count:
sell_price = data['close'][i]
sell_count = sum([price['buy_count'] for price in BUY_LIST['buy_list']])
return sell_price, sell_count
def checkTransaction1(self, ticker, MAX_BUY_PRICE, data, data_signal, BUY_LIST=None, isRealTime=True):