Skip to content

Commit 8225211

Browse files
committed
docs: improve location of "many position adjustment" warning
1 parent 6f307e1 commit 8225211

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/strategy-callbacks.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,11 @@ The combined stake currently allocated to the position is held in `trade.stake_a
774774

775775
Same thing also can happen with partial exit. So be sure to have a strict logic and/or check for the last filled order.
776776

777+
!!! Warning "Performance with many position adjustments"
778+
Position adjustments can be a good approach to increase a strategy's output - but it can also have drawbacks if using this feature extensively.
779+
Each of the orders will be attached to the trade object for the duration of the trade - hence increasing memory usage.
780+
Trades with long duration and 10s or even 100ds of position adjustments are therefore not recommended, and should be closed at regular intervals to not affect performance.
781+
777782
!!! Warning "Backtesting"
778783
During backtesting this callback is called for each candle in `timeframe` or `timeframe_detail`, so run-time performance will be affected.
779784
This can also cause deviating results between live and backtesting, since backtesting can adjust the trade only once per candle, whereas live could adjust the trade multiple times per candle.
@@ -810,11 +815,6 @@ Back to the example above, since current rate is 200, the current USDT value of
810815

811816
While `/stopentry` command stops the bot from entering new trades, the position adjustment feature will continue buying new orders on existing trades.
812817

813-
!!! Warning "Performance with many position adjustments"
814-
Position adjustments can be a good approach to increase a strategy's output - but it can also have drawbacks if using this feature extensively.
815-
Each of the orders will be attached to the trade object for the duration of the trade - hence increasing memory usage.
816-
Trades with long duration and 10s or even 100ds of position adjustments are therefore not recommended, and should be closed at regular intervals to not affect performance.
817-
818818
``` python
819819
# Default imports
820820

0 commit comments

Comments
 (0)