init
This commit is contained in:
@@ -646,15 +646,6 @@ class Bithumb_minute(HTS):
|
||||
order_log_df['datetime'] = order_log_df.index
|
||||
order_log_df.to_csv(order_log_filename, index=False)
|
||||
|
||||
# 한번 매수 후 n분 이후 매수하기 위함
|
||||
indexes2 = buy_history_df.index.tolist()
|
||||
indexes2.append(datetime_value)
|
||||
|
||||
buy_history_df = buy_history_df.append(value_df, ignore_index=True)
|
||||
buy_history_df.index = indexes2
|
||||
buy_history_df['datetime'] = buy_history_df.index
|
||||
buy_history_df.to_csv(order_log_filename, index=False)
|
||||
|
||||
# 파일에 매수 시점 그래프
|
||||
dirName = os.path.join(RESOURCE_PATH, 'analysis', 'bithumb')
|
||||
self.writeFile(dirName, ticker, stock1, bsLine, 'buy')
|
||||
@@ -670,7 +661,7 @@ class Bithumb_minute(HTS):
|
||||
# slackbot에 메시지를 보냄
|
||||
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:
|
||||
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], "/", "{:.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')
|
||||
|
||||
Reference in New Issue
Block a user