From ace70510f38902dd47f2a62484700fd08542207f Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 15 Oct 2019 14:50:51 +0200 Subject: [PATCH] Wording fixes --- docs/strategy-customization.md | 8 ++++---- user_data/strategies/sample_strategy.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/strategy-customization.md b/docs/strategy-customization.md index 39a36c469..40da697e6 100644 --- a/docs/strategy-customization.md +++ b/docs/strategy-customization.md @@ -138,7 +138,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ dataframe.loc[ ( - (qtpylib.crossed_above(dataframe['adx'], 30)) & # Signal: ADX crosses baove 30 + (qtpylib.crossed_above(dataframe['adx'], 30)) & # Signal: ADX crosses above 30 (dataframe['tema'] <= dataframe['bb_middleband']) & # Guard (dataframe['tema'] > dataframe['tema'].shift(1)) & # Guard (dataframe['volume'] > 0) # Make sure Volume is not 0 @@ -149,7 +149,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: ``` !!! Note - Buying requires sellers to buy from - therefore volume needs to be > 0 (`dataframe['volume'] > 0`) to make sure backtesting does not buy/sell in no-activity periods. + Buying requires sellers to buy from - therefore volume needs to be > 0 (`dataframe['volume'] > 0`) to make sure that the does not buy/sell in no-activity periods. ### Sell signal rules @@ -172,9 +172,9 @@ def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame """ dataframe.loc[ ( - (qtpylib.crossed_above(dataframe['adx'], 70)) & # Signal: ADX crosses above 30 + (qtpylib.crossed_above(dataframe['adx'], 70)) & # Signal: ADX crosses above 70 (dataframe['tema'] > dataframe['bb_middleband']) & # Guard - (dataframe['tema'] < dataframe['tema'].shift(1)) & #Guard + (dataframe['tema'] < dataframe['tema'].shift(1)) & # Guard (dataframe['volume'] > 0) # Make sure Volume is not 0 ), 'sell'] = 1 diff --git a/user_data/strategies/sample_strategy.py b/user_data/strategies/sample_strategy.py index 6d544c667..61f4fc15f 100644 --- a/user_data/strategies/sample_strategy.py +++ b/user_data/strategies/sample_strategy.py @@ -294,9 +294,9 @@ class SampleStrategy(IStrategy): """ dataframe.loc[ ( - (qtpylib.crossed_above(dataframe['adx'], 70)) & # Signal: - ADX crosses above 70 - (dataframe['tema'] > dataframe['bb_middleband']) & - (dataframe['tema'] < dataframe['tema'].shift(1)) & # Guard: tema is raising + (qtpylib.crossed_above(dataframe['adx'], 70)) & # Signal: ADX crosses above 70 + (dataframe['tema'] > dataframe['bb_middleband']) & # Guard: tema above BB middle + (dataframe['tema'] < dataframe['tema'].shift(1)) & # Guard: tema is falling (dataframe['volume'] > 0) # Make sure Volume is not 0 ), 'sell'] = 1