From 5d1f87404139c4e8ac62c7b7a7f972080fa451cc Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Thu, 16 Nov 2017 20:16:54 +0200 Subject: [PATCH] switch ix to loc, ix is apparently deprecated --- freqtrade/analyze.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freqtrade/analyze.py b/freqtrade/analyze.py index b1279071e..7008c69bf 100644 --- a/freqtrade/analyze.py +++ b/freqtrade/analyze.py @@ -66,14 +66,14 @@ def populate_buy_trend(dataframe: DataFrame) -> DataFrame: :param dataframe: DataFrame :return: DataFrame with buy column """ - dataframe.ix[ + dataframe.loc[ (dataframe['close'] < dataframe['sma']) & (dataframe['tema'] <= dataframe['blower']) & (dataframe['mfi'] < 25) & (dataframe['fastd'] < 25) & (dataframe['adx'] > 30), 'buy'] = 1 - dataframe.ix[dataframe['buy'] == 1, 'buy_price'] = dataframe['close'] + dataframe.loc[dataframe['buy'] == 1, 'buy_price'] = dataframe['close'] return dataframe @@ -83,10 +83,10 @@ def populate_sell_trend(dataframe: DataFrame) -> DataFrame: :param dataframe: DataFrame :return: DataFrame with buy column """ - dataframe.ix[ + dataframe.loc[ (crossed_above(dataframe['rsi'], 70)), 'sell'] = 1 - dataframe.ix[dataframe['sell'] == 1, 'sell_price'] = dataframe['close'] + dataframe.loc[dataframe['sell'] == 1, 'sell_price'] = dataframe['close'] return dataframe