添加一些显示数据
This commit is contained in:
@@ -104,12 +104,13 @@ class ChanLun_EMA52(IStrategy):
|
||||
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
|
||||
if self.last_time + timedelta(minutes=1) < datetime.now():
|
||||
self.last_time = datetime.now()
|
||||
logger.info("init_dataframes----------------------------")
|
||||
last_price = dataframe.iloc[-1]['close']
|
||||
date = dataframe.iloc[-1]['date']
|
||||
tf_ema52_list = self.chan.check_price_ema52(last_price)
|
||||
self.init_dataframes(dataframe)
|
||||
logger.info("Price_ema52_list: " + str(tf_ema52_list))
|
||||
self.last_time = datetime.now()
|
||||
logger.info("Date: " + date.strftime('%Y-%m-%d %H:%M:%S') + " Price: " + str(last_price) + " EMA52_list: " + str(tf_ema52_list))
|
||||
return dataframe
|
||||
def init_dataframes(self, dataframe_1m):
|
||||
dataframe_15m = self.dp.get_pair_dataframe(pair=self.pair, timeframe='15m')
|
||||
|
||||
Reference in New Issue
Block a user