a little change
This commit is contained in:
parent
c6edebe674
commit
eb07932a3c
|
|
@ -64,7 +64,7 @@ class MarketData:
|
|||
candles_pd = candles_pd[['symbol', 'bar', 'timestamp', 'date_time', 'open', 'high', 'low', 'close', 'volume', 'volCcy', 'volCCyQuote', 'create_time']]
|
||||
candles_pd.sort_values('timestamp', inplace=True)
|
||||
candles_pd.reset_index(drop=True, inplace=True)
|
||||
|
||||
|
||||
return candles_pd
|
||||
else:
|
||||
logging.warning(f"未获取到{symbol}, {bar} 最新数据,请稍后再试")
|
||||
|
|
@ -237,7 +237,7 @@ class MarketData:
|
|||
count += 1
|
||||
if count > 3:
|
||||
break
|
||||
time.sleep(10)
|
||||
time.sleep(5)
|
||||
return response
|
||||
|
||||
def get_data_from_db(self, symbol, bar, db_url):
|
||||
|
|
|
|||
|
|
@ -285,6 +285,7 @@ def get_long_short_over_buy_sell(
|
|||
result = {}
|
||||
symbol = row["symbol"]
|
||||
bar = row["bar"]
|
||||
date_time = row["date_time"]
|
||||
ma_long_short = str(row["ma_long_short"])
|
||||
macd_signal = str(row["macd_signal"])
|
||||
macd_divergence = str(row["macd_divergence"])
|
||||
|
|
@ -294,7 +295,7 @@ def get_long_short_over_buy_sell(
|
|||
boll_signal = str(row["boll_signal"])
|
||||
boll_pattern = str(row["boll_pattern"])
|
||||
contents = []
|
||||
contents.append(f"### {symbol} {bar} 对比形态")
|
||||
contents.append(f"### {symbol} {bar} 对比形态 {date_time}")
|
||||
if ma_long_short in ["多", "空"]:
|
||||
contents.append(f"均线形态: {ma_long_short}")
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue