From c6256aba35ed03195f24ebc8cf053a0e84577664 Mon Sep 17 00:00:00 2001 From: Reigo Reinmets Date: Sun, 12 Dec 2021 08:32:15 +0200 Subject: [PATCH] Improve documentation. --- docs/configuration.md | 2 +- docs/strategy-callbacks.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 1d695db3e..c982a1d7f 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -589,7 +589,7 @@ freqtrade The `position_adjustment_enable` configuration parameter enables the usage of `adjust_trade_position()` callback in strategy. For performance reasons, it's disabled by default, and freqtrade will show a warning message on startup if enabled. -This can be dangerous with some strategies, so use with care. +Enabling this does nothing unless the strategy also implements `adjust_trade_position()` callback. See [the strategy callbacks](strategy-callbacks.md) for details on usage. diff --git a/docs/strategy-callbacks.md b/docs/strategy-callbacks.md index fcf861145..886fdbc59 100644 --- a/docs/strategy-callbacks.md +++ b/docs/strategy-callbacks.md @@ -573,12 +573,17 @@ class AwesomeStrategy(IStrategy): ### Adjust trade position `adjust_trade_position()` can be used to perform additional orders to manage risk with DCA (Dollar Cost Averaging). +The strategy is expected to return a stake_amount if and when an additional buy order should be made (position is increased). +If there is not enough funds in the wallet then nothing will happen. + +Note: Current implementation does not support decreasing position size with partial sales! !!! Tip: The `position_adjustment_enable` configuration parameter must be enabled to use adjust_trade_position callback in strategy. !!! Warning: Additional orders also mean additional fees. !!! Warning: Stoploss is still calculated from the initial opening price, not averaged price. + So if you do 3 additional buys at -7% and have a stoploss at -10% then you will most likely trigger stoploss while the UI will be showing you an average profit of -3%. ``` python from freqtrade.persistence import Trade