new buy strategy

This commit is contained in:
Janne Sinivirta 2017-11-18 08:45:57 +02:00
parent df9902d6a4
commit ec75586bdd

View File

@ -67,11 +67,10 @@ def populate_buy_trend(dataframe: DataFrame) -> DataFrame:
:return: DataFrame with buy column :return: DataFrame with buy column
""" """
dataframe.loc[ dataframe.loc[
(dataframe['close'] < dataframe['sma']) &
(dataframe['tema'] <= dataframe['blower']) & (dataframe['tema'] <= dataframe['blower']) &
(dataframe['mfi'] < 25) & (dataframe['rsi'] < 37) &
(dataframe['fastd'] < 25) & (dataframe['fastd'] < 48) &
(dataframe['adx'] > 30), (dataframe['adx'] > 31),
'buy'] = 1 'buy'] = 1
return dataframe return dataframe