Improve documentation on adjust_trade_position and position_adjustment_enable

This commit is contained in:
Reigo Reinmets
2021-12-11 17:14:04 +02:00
parent f97662e816
commit f11a40f144
8 changed files with 149 additions and 7 deletions

View File

@@ -102,6 +102,9 @@ class FreqtradeBot(LoggingMixin):
self._exit_lock = Lock()
LoggingMixin.__init__(self, logger, timeframe_to_seconds(self.strategy.timeframe))
# Is Position Adjustment enabled?
self.position_adjustment = bool(self.config.get('position_adjustment_enable', False))
def notify_status(self, msg: str) -> None:
"""
Public method for users of this class (worker, etc.) to send notifications
@@ -179,7 +182,7 @@ class FreqtradeBot(LoggingMixin):
self.exit_positions(trades)
# Check if we need to adjust our current positions before attempting to buy new trades.
if self.config.get('position_adjustment_enable', False):
if self.position_adjustment:
self.process_open_trade_positions()
# Then looking for buy opportunities