Merge pull request #114 from gcarq/new_algo

New buy strategy
This commit is contained in:
Samuel Husso 2017-11-18 13:09:40 +02:00 committed by GitHub
commit a3da2911e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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