From 69491c14303824c247730e9384907517cde441c4 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 3 Apr 2022 19:39:13 +0200 Subject: [PATCH] Update more wording to "exit" --- docs/backtesting.md | 2 +- docs/strategy-callbacks.md | 2 +- freqtrade/enums/exittype.py | 2 +- freqtrade/persistence/models.py | 2 +- freqtrade/rpc/rpc.py | 2 +- freqtrade/rpc/telegram.py | 4 ++-- freqtrade/templates/subtemplates/strategy_methods_advanced.j2 | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/backtesting.md b/docs/backtesting.md index f42221f8c..3a2b1e984 100644 --- a/docs/backtesting.md +++ b/docs/backtesting.md @@ -499,7 +499,7 @@ Since backtesting lacks some detailed information about what happens within a ca - sells are never "below the candle", so a ROI of 2% may result in a sell at 2.4% if low was at 2.4% profit - Forcesells caused by `=-1` ROI entries use low as sell value, unless N falls on the candle open (e.g. `120: -1` for 1h candles) - Stoploss sells happen exactly at stoploss price, even if low was lower, but the loss will be `2 * fees` higher than the stoploss price -- Stoploss is evaluated before ROI within one candle. So you can often see more trades with the `stoploss` sell reason comparing to the results obtained with the same strategy in the Dry Run/Live Trade modes +- Stoploss is evaluated before ROI within one candle. So you can often see more trades with the `stoploss` exit reason comparing to the results obtained with the same strategy in the Dry Run/Live Trade modes - Low happens before high for stoploss, protecting capital first - Trailing stoploss - Trailing Stoploss is only adjusted if it's below the candle's low (otherwise it would be triggered) diff --git a/docs/strategy-callbacks.md b/docs/strategy-callbacks.md index 8fbf3dde9..f265bfe61 100644 --- a/docs/strategy-callbacks.md +++ b/docs/strategy-callbacks.md @@ -393,7 +393,7 @@ class AwesomeStrategy(IStrategy): !!! Warning "Backtesting" Custom prices are supported in backtesting (starting with 2021.12), and orders will fill if the price falls within the candle's low/high range. Orders that don't fill immediately are subject to regular timeout handling, which happens once per (detail) candle. - `custom_exit_price()` is only called for sells of type Sell_signal and Custom sell. All other sell-types will use regular backtesting prices. + `custom_exit_price()` is only called for sells of type Sell_signal and Custom exit. All other exit-types will use regular backtesting prices. ## Custom order timeout rules diff --git a/freqtrade/enums/exittype.py b/freqtrade/enums/exittype.py index 36d2a4f9e..7610b8c94 100644 --- a/freqtrade/enums/exittype.py +++ b/freqtrade/enums/exittype.py @@ -3,7 +3,7 @@ from enum import Enum class ExitType(Enum): """ - Enum to distinguish between sell reasons + Enum to distinguish between exit reasons """ ROI = "roi" STOP_LOSS = "stop_loss" diff --git a/freqtrade/persistence/models.py b/freqtrade/persistence/models.py index 9eaf81c23..0968f1e97 100644 --- a/freqtrade/persistence/models.py +++ b/freqtrade/persistence/models.py @@ -1291,7 +1291,7 @@ class Trade(_DECL_BASE, LocalTrade): @staticmethod def get_exit_reason_performance(pair: Optional[str]) -> List[Dict[str, Any]]: """ - Returns List of dicts containing all Trades, based on sell reason performance + Returns List of dicts containing all Trades, based on exit reason performance Can either be average for all pairs or a specific pair provided NOTE: Not supported in Backtesting. """ diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 7b34354c3..6c740d764 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -850,7 +850,7 @@ class RPC: def _rpc_exit_reason_performance(self, pair: Optional[str]) -> List[Dict[str, Any]]: """ - Handler for sell reason performance. + Handler for exit reason performance. Shows a performance statistic from finished trades """ return Trade.get_exit_reason_performance(pair) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index dd2c33ee4..324255235 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -1408,8 +1408,8 @@ class Telegram(RPCHandler): " `pending buy orders are marked with an asterisk (*)`\n" " `pending sell orders are marked with a double asterisk (**)`\n" "*/buys :* `Shows the enter_tag performance`\n" - "*/sells :* `Shows the sell reason performance`\n" - "*/mix_tags :* `Shows combined buy tag + sell reason performance`\n" + "*/sells :* `Shows the exit reason performance`\n" + "*/mix_tags :* `Shows combined entry tag + exit reason performance`\n" "*/trades [limit]:* `Lists last closed trades (limited to 10 by default)`\n" "*/profit []:* `Lists cumulative profit from all finished trades, " "over the last n days`\n" diff --git a/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 b/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 index bc41836fb..9aff7ee2a 100644 --- a/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 +++ b/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 @@ -95,7 +95,7 @@ def custom_stoploss(self, pair: str, trade: 'Trade', current_time: 'datetime', def custom_exit(self, pair: str, trade: 'Trade', current_time: 'datetime', current_rate: float, current_profit: float, **kwargs) -> 'Optional[Union[str, bool]]': """ - Custom sell signal logic indicating that specified position should be sold. Returning a + Custom exit signal logic indicating that specified position should be sold. Returning a string or True from this method is equal to setting sell signal on a candle at specified time. This method is not called when sell signal is set. @@ -103,7 +103,7 @@ def custom_exit(self, pair: str, trade: 'Trade', current_time: 'datetime', curre example you could implement a sell relative to the candle when the trade was opened, or a custom 1:2 risk-reward ROI. - Custom sell reason max length is 64. Exceeding characters will be removed. + Custom exit reason max length is 64. Exceeding characters will be removed. :param pair: Pair that's currently analyzed :param trade: trade object.