On 19 November 2026 at 09:31:50 Asia/Shanghai, the official Freqtrade Strategy Callbacks page (HTTP 200) documented adjust_trade_position, enabled by position_adjustment_enable. A positive returned stake always increases the position and a negative value always decreases it, for both long and short; a two-element tuple can attach a tag; leverage cannot be modified here and the returned stake is assumed to be before leverage; trade.stake_amount updates on every additional entry and partial exit through this callback. On dry and live runs the function is called every throttle_process_secs (default 5s). During backtesting it is called for each candle in timeframe or timeframe_detail, which official docs warn can cause deviating results because backtesting can adjust only once per candle. The official page does not walk through a trade-log plus order-history example. No performance claims.
Documentation review. AI-assisted drafting. Educational information; no individual financial advice.
Official adjust_trade_position: what the callback is for
The official Strategy Callbacks page, re-read at 09:31:50 Asia/Shanghai on 19 November 2026 (HTTP 200), documents Adjust trade position as a callback you enable with the strategy property position_adjustment_enable. Official wording says it is disabled by default for performance reasons, and that Freqtrade will show a warning message on startup if it is enabled. The callback "can be used to perform additional orders, for example to manage risk with DCA (Dollar Cost Averaging) or to increase or decrease positions."
Official docs also say that additional orders result in additional fees, and that those orders do not count towards max_open_trades. The callback is called when there is an open order waiting for execution, and it "will cancel the existing open order to place a new order if the amount, price or direction is different." Partially filled orders will also be canceled and replaced with the new amount returned by the callback. Official docs warn that adjust_trade_position() is called very frequently for the duration of a trade, so the implementation must be kept as performant as possible.
This article is an official-callback readout of partial entries and exits, including optional tags, against that contract. It also records the official warning that dry/live call frequency can deviate from backtesting. It is a different question from FreqAI model expiry and do_predict == 2. It is not a worked trade-log plus order-history example, and it does not invent a side-by-side live versus backtest deviation.
How official docs tell you to read an increase, a decrease, and a tag
Official wording on the sign of the returned stake is unambiguous:
> Position adjustments will always be applied in the direction of the trade, so a positive value will always increase your position (negative values will decrease your position), no matter if it's a long or short trade.
You can attach a tag by returning a two-element tuple: the adjustment amount, then the tag. The official example is return 250, "increase_favorable_conditions".
Two official limits sit next to that contract. "Modifications to leverage are not possible, and the stake-amount returned is assumed to be before applying leverage." And "The combined stake currently allocated to the position is held in trade.stake_amount. Therefore trade.stake_amount will always be updated on every additional entry and partial exit made through adjust_trade_position()."
When you later read a trade log, official docs therefore tell you to expect:
- A positive returned stake as an additional entry (buy for a long, sell for a short).
- A negative returned stake as a partial exit, or a full exit if you return
-trade.stake_amount. - An optional second tuple element as the order tag, when the strategy returned one.
- An updated
trade.stake_amountafter each additional entry or partial exit made through this callback. - No leverage change from this callback.
The official Increase position section says the strategy is expected to return a positive stake_amount in stake currency, between min_stake and max_stake. If the return value is above max_stake because there are not enough funds, "the signal will be ignored." max_entry_position_adjustment limits the number of additional entries per trade on top of the first entry; the official default is -1, meaning no limit. Additional entries are ignored once that maximum is reached, "but the callback is called anyway looking for partial exits."
The official Decrease position section says the strategy is expected to return a negative stake_amount for a partial exit. Returning a value that would make remaining stake_amount negative causes the bot to ignore the signal. The official formula for the asset amount of a partial exit is:
> amount to be exited partially = negative_stake_amount * trade.amount / trade.stake_amount
Official docs say this formula does not care about current profit or loss. It only cares about trade.amount and trade.stake_amount, "which aren't affected by the price movement at all." The same section then walks through an official numerical example on a fictional pair, including a case where returning a current-value slice instead of a stake-amount slice is ignored, and a case that converts a desired current-value exit back into the official negative stake. This article does not invent a second worked example. If you need those numbers, read them on the live official page.
Official stoploss wording in this section also matters when you read a log: "Stoploss is still calculated from the initial opening price, not averaged price." Regular stoploss rules still apply (cannot move down). And while a /stopentry command stops the bot from entering new trades, "the position adjustment feature will continue buying new orders on existing trades."
Why official docs warn that live can deviate from a backtest
Under a Loose Logic heading, official docs say that on dry and live runs this function is called every throttle_process_secs (default 5s). If the logic is loose, for example "increase position if RSI of the last candle is below 30," the bot will "do extra re-entry every 5 secs until it either runs out of money, hits the max_position_adjustment limit, or a new candle with RSI above 30 arrives." Official wording says the same thing can happen with a partial exit. The official remedy is to "have a strict logic and/or check for the last filled order and if an order is already open."
Under Backtesting, official docs say the callback is called for each candle in timeframe or timeframe_detail, so run-time performance will be affected. Then comes the official deviation warning:
> 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.
That is the official reason a dry or live trade log can disagree with a backtest of the same strategy. Backtesting has at most one adjustment opportunity per candle (or per timeframe_detail candle). Dry and live can call the callback every five seconds by default, which can be several times inside one candle. Official docs do not walk through a side-by-side of one live log and one backtest log, and this article does not invent that comparison.
A nearby official performance note says each adjustment order is attached to the trade object for the duration of the trade, which increases memory usage. Official docs do not recommend trades with long duration and tens or hundreds of position adjustments, and they say such trades should be closed at regular intervals so that performance is not affected. That is a runtime warning, not a profit claim.
A short official-callback checklist
- Enable
position_adjustment_enableonly if you intend to useadjust_trade_position(). Official docs say it is off by default and that startup will warn when it is on. - Read returned stake by sign: positive always increases the position, negative always decreases it, for both long and short. The returned amount is assumed to be before leverage.
- If the strategy returns a two-element tuple, read the second element as the official tag.
- After each additional entry or partial exit made through this callback, expect
trade.stake_amountto have been updated. Use officialtrade.amountandtrade.stake_amountin the official partial-exit formula, not the mark-to-market value, unless you have first converted back the way the official decrease-position example does. - On dry and live runs, assume the callback can fire every
throttle_process_secs(official default 5s). Check the last filled order and whether an order is already open, as official docs recommend, if you do not want repeated entries or exits inside one candle. - During backtesting, assume one call per candle in
timeframeortimeframe_detail. Official docs warn that this can cause results to deviate from live. Do not treat a backtest log as a replay of dry or live call frequency. - Re-read the live callback page on the day you rely on the wording. This checklist is dated to the 19 November 2026 fetch.
For nearby dry-run versus backtest context on this site, see dry-run versus backtest fills, how to evaluate a trading bot, the backtest statistics tool, TradingAgents Strategy Lab dry-run versus backtest, and recursive analysis and startup candle count. Those pages are about fills, evaluation, and warmup. They are not a substitute for the official adjust_trade_position contract above.
What was not observed
No dry-run, live, or backtest process was started on 19 November 2026, and no trade log or order history was collected. The readout is of official wording on the dated fetch above. The official page does not walk through a trade-log plus order-history example or a side-by-side live versus backtest deviation, and this article does not invent either. This article makes no performance claims.
TradeBotBench carries exchange affiliate links elsewhere; this post contains none.
Sources & method
What this article adds
A dated official-callback readout, as the Strategy Callbacks Adjust trade position section stood on 19 November 2026 at 09:31:50 Asia/Shanghai: official sign of the returned stake, optional tags, leverage limits, trade.stake_amount updates, the official partial-exit formula, the dry/live throttle warning, and the official backtesting warning that live can deviate because backtesting adjusts only once per candle. Official silences stay silences: no invented trade-log plus order-history walkthrough and no invented side-by-side deviation. No performance claims.
How it was prepared
The official Strategy Callbacks HTML page was fetched with curl on 19 November 2026 at 09:31:50 Asia/Shanghai (HTTP 200). Quoted wording is from the live Adjust trade position section on that page, including the official Increase position, Decrease position, Loose Logic, and Backtesting notes. No dry-run, live, or backtest process was started, and no trade log was collected. Demand remains unmeasured / HYPOTHESIS. No performance claims.
- Freqtrade docs: Strategy Callbacks (Adjust trade position) Checked 2026-11-19
All callback-contract, tag, leverage, stake_amount, partial-exit formula, throttle_process_secs, max_entry_position_adjustment, and live-versus-backtest claims come from the official Strategy Callbacks page fetched 19 November 2026. The official numerical decrease-position example is pointed to on that page and is not replaced with a second invented example.
For corrections, contact the publisher. Editorial policy · Affiliate disclosure