From 283d04a5ad00dd0a7fcdc273c608a68af0380679 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 3 Apr 2022 19:36:32 +0200 Subject: [PATCH] Update docstring wording --- docs/strategy-callbacks.md | 2 +- freqtrade/strategy/interface.py | 4 ++-- freqtrade/templates/subtemplates/strategy_methods_advanced.j2 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/strategy-callbacks.md b/docs/strategy-callbacks.md index dfd29d544..8fbf3dde9 100644 --- a/docs/strategy-callbacks.md +++ b/docs/strategy-callbacks.md @@ -84,7 +84,7 @@ Freqtrade will fall back to the `proposed_stake` value should your code raise an Called for open trade every throttling iteration (roughly every 5 seconds) until a trade is closed. -Allows to define custom sell signals, indicating that specified position should be sold. This is very useful when we need to customize sell conditions for each individual trade, or if you need trade data to make an exit decision. +Allows to define custom exit signals, indicating that specified position should be sold. This is very useful when we need to customize sell conditions for each individual trade, or if you need trade data to make an exit decision. For example you could implement a 1:2 risk-reward ROI with `custom_exit()`. diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 7b250ed9f..30ac4f355 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -396,7 +396,7 @@ class IStrategy(ABC, HyperStrategyMixin): :param current_rate: Rate, calculated based on pricing settings in exit_pricing. :param current_profit: Current profit (as ratio), calculated based on current_rate. :param **kwargs: Ensure to keep this here so updates to this won't break your strategy. - :return: To execute exit, return a string with custom sell reason or True. Otherwise return + :return: To execute exit, return a string with custom exit reason or True. Otherwise return None or False. """ return None @@ -420,7 +420,7 @@ class IStrategy(ABC, HyperStrategyMixin): :param current_rate: Rate, calculated based on pricing settings in exit_pricing. :param current_profit: Current profit (as ratio), calculated based on current_rate. :param **kwargs: Ensure to keep this here so updates to this won't break your strategy. - :return: To execute exit, return a string with custom sell reason or True. Otherwise return + :return: To execute exit, return a string with custom exit reason or True. Otherwise return None or False. """ return self.custom_sell(pair, trade, current_time, current_rate, current_profit, **kwargs) diff --git a/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 b/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 index b2dbb736d..bc41836fb 100644 --- a/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 +++ b/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 @@ -111,7 +111,7 @@ def custom_exit(self, pair: str, trade: 'Trade', current_time: 'datetime', curre :param current_rate: Rate, calculated based on pricing settings in exit_pricing. :param current_profit: Current profit (as ratio), calculated based on current_rate. :param **kwargs: Ensure to keep this here so updates to this won't break your strategy. - :return: To execute sell, return a string with custom sell reason or True. Otherwise return + :return: To execute sell, return a string with custom exit reason or True. Otherwise return None or False. """ return None