This commit is contained in:
dsyoon
2023-01-28 11:20:27 +09:00
parent 3e0b397e62
commit 054467842c

View File

@@ -600,7 +600,7 @@ class Bithumb_minute(HTS):
# 매수 매도 체크
bsLine = self.checkWithEnvelope(stock1, stock2, isRealTime=isRealTime)
print(ticker, "/", datetime.now().strftime('%Y-%m-%d %H:%M:%S'), "/", stock1['close'][len(stock1['close'])-1], "/", stock2['slow_k'][len(stock1['slow_k'])-1], "/", stock1['slow_k'][len(stock1['slow_k'])-1], stock2['macd'][len(stock2['macd']) - 1], "/", stock1['macd'][len(stock1['macd']) - 1])
print(ticker, "/", datetime.now().strftime('%Y-%m-%d %H:%M:%S'), "/", stock1['close'][len(stock1['close'])-1], "/", "{:.2f}".format(stock2['slow_k'][len(stock1['slow_k'])-1]), "/", "{:.2f}".format(stock1['slow_k'][len(stock1['slow_k'])-1]), "/", "{:.2f}".format(stock2['macd'][len(stock2['macd']) - 1]), "/", "{:.2f}".format(stock1['macd'][len(stock1['macd']) - 1]))
# 그래프를 그린다.
if len(stock1.index) > 10:
@@ -644,7 +644,7 @@ class Bithumb_minute(HTS):
# order: ('bid', 'BTC', 'C0101000000322993432', 'KRW')
if len(stock1['close']) > 0:
print(ticker, "/", datetime.now().strftime('%Y-%m-%d %H:%M:%S'), "/", stock1['close'][len(stock1['close']) - 1], "/ BUY / ", stock2['slow_k'][len(stock2['slow_k']) - 1], "/", stock1['slow_k'][len(stock1['slow_k']) - 1], stock2['macd'][len(stock2['macd']) - 1], "/", stock1['macd'][len(stock1['macd']) - 1], "/", bsLine['buy'][len(bsLine['buy']) - 1], "/", count)
print(ticker, "/", datetime.now().strftime('%Y-%m-%d %H:%M:%S'), "/", stock1['close'][len(stock1['close'])-1], "/", "{:.2f}".format(stock2['slow_k'][len(stock1['slow_k'])-1]), "/", "{:.2f}".format(stock1['slow_k'][len(stock1['slow_k'])-1]), "/", "{:.2f}".format(stock2['macd'][len(stock2['macd']) - 1]), "/", "{:.2f}".format(stock1['macd'][len(stock1['macd']) - 1]), "/", bsLine['buy'][len(bsLine['buy']) - 1], "/", count)
value = {"type": "BUY", "order0": order[0], "order1": order[1], "order2": order[2], "order3": order[3], "slow_k_30": stock2['slow_k'][len(stock2['slow_k']) - 1], "slow_k_5": stock1['slow_k'][len(stock1['slow_k']) - 1], "price": bsLine['buy'][len(bsLine['buy']) - 1], "count": count}
datetime_value = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
value_df = pd.DataFrame(value, index=[datetime_value])
@@ -683,7 +683,7 @@ class Bithumb_minute(HTS):
self.slackBot.post_to_slack(ticker, self.stock_code[ticker], "SELL", bsLine['sell'][len(bsLine['sell']) - 1], count)
if len(order) > 2 and len(stock1['close'])>0:
print(ticker, "/", datetime.now().strftime('%Y-%m-%d %H:%M:%S'), "/", stock1['close'][len(stock1['close']) - 1], "/ SELL / ", stock2['slow_k'][len(stock2['slow_k']) - 1], "/", stock1['slow_k'][len(stock1['slow_k']) - 1], stock2['macd'][len(stock2['macd']) - 1], "/", stock1['macd'][len(stock1['macd']) - 1], "/", bsLine['sell'][len(bsLine['sell']) - 1], "/", count)
print(ticker, "/", datetime.now().strftime('%Y-%m-%d %H:%M:%S'), "/", stock1['close'][len(stock1['close'])-1], "/", "{:.2f}".format(stock2['slow_k'][len(stock1['slow_k'])-1]), "/", "{:.2f}".format(stock1['slow_k'][len(stock1['slow_k'])-1]), "/", "{:.2f}".format(stock2['macd'][len(stock2['macd']) - 1]), "/", "{:.2f}".format(stock1['macd'][len(stock1['macd']) - 1]), "/", bsLine['sell'][len(bsLine['sell']) - 1], "/", count)
value = {"type": "SELL","order0": order[0], "order1": order[1], "order2": order[2], "order3": order[3], "slow_k_30": stock2['slow_k'][len(stock2['slow_k']) - 1], "slow_k_5": stock1['slow_k'][len(stock1['slow_k']) - 1], "price": bsLine['sell'][len(bsLine['sell']) - 1], "count": count}
datetime_value = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
value_df = pd.DataFrame(value, index=[datetime_value])