Position Adjustment Made Easy! Freqtrade Dynamic Position Management Guide
This article was produced by the Quantitative Trading Lab at https://www.itrade.icu. Visit for more benefits. In live trading, dynamically adjusting positionsβadding or reducing trades in batchesβis essential for maximizing profits and managing risk. Freqtrade supports dynamic position adjustment and multiple entries, enabling advanced operations like scaling in and out. This guide covers key parameters and practical examples.
β‘ ignore_roi_if_entry_signal β Ignore ROI to Prioritize Entry Signals
ignore_roi_if_entry_signal β Ignore ROI to Prioritize Entry Signalsignore_roi_if_entry_signal determines whether to ignore the minimal_roi take-profit rules when an existing position receives a new entry signal. When enabled, the strategy may extend its holding period even if the ROI is reached. Default is False.
When
True:If a new entry signal appears while holding a position, the ROI take-profit is ignored.
Even if ROI is achieved, the strategy waits for new signals before selling.
Useful for trend-following strategies or staged entries.
When
False:ROI take-profit is strictly enforced.
Even if new entry signals occur, a position is sold when ROI conditions are met.
ignore_roi_if_entry_signal = TrueβοΈ Priority Logic Diagram
graph TD
A[Currently Holding] --> B{ROI Achieved?}
B -->|Yes| C{Exit Signal?}
C -->|Yes| D{exit_profit_only?}
D -->|Yes| E{Is Position Profitable?}
E -->|Yes| F[β
Close Position]
E -->|No| G[β Hold]
D -->|No| F
C -->|No| H{Use ROI Auto Exit?}
H -->|Yes| F
H -->|No| Gπ position_adjustment_enable β Enable Position Adjustment
position_adjustment_enable β Enable Position AdjustmentThis parameter activates custom position adjustment functionality.
Code Example: Adding Positions
Code Example: Reducing Positions
β οΈ Notes:
Must be paired with
adjust_trade_position()function.Supports dynamic scaling during active positions.
Can react to new entry signals for adding/reducing positions.
π max_entry_position_adjustment β Maximum Additions per Trade
max_entry_position_adjustment β Maximum Additions per TradeLimits the maximum number of allowed position adjustments per trade.
Prevents unlimited scaling and excessive risk.
Typical range: 1β5, depending on strategy and risk management.
π οΈ adjust_trade_position() Detailed Example
adjust_trade_position() Detailed ExampleThis function defines the actual logic for adjusting positions, based on current size, market signals, or profit/loss.
β οΈ Notes:
Called automatically by the strategy.
Can combine technical indicators, current profit, and market sentiment for adjustments.
Must return a value between 0 and 1 representing the target position proportion.
β
Summary Table
ignore_roi_if_entry_signal
Ignore ROI rules to prioritize entry
True for multi-entry/adding positions
position_adjustment_enable
Enable dynamic position adjustment
True β requires implementing adjustment function
max_entry_position_adjustment
Max number of allowed adjustments
3 β adjust according to risk management
adjust_trade_position()
Custom position adjustment function
Must implement and return target proportion
Last updated