Skip to content

Commit

Permalink
Wording fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Oct 15, 2019
1 parent a320d4c commit ace7051
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/strategy-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions user_data/strategies/sample_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame
"""
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
Expand Down

0 comments on commit ace7051

Please sign in to comment.