mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-20 14:00:38 +00:00
docs: improved adjust_trade_position sample
This commit is contained in:
@@ -876,6 +876,9 @@ class DigDeeperStrategy(IStrategy):
|
||||
Return None for no action.
|
||||
Optionally, return a tuple with a 2nd element with an order reason
|
||||
"""
|
||||
if trade.has_open_orders:
|
||||
# Only act if no orders are open
|
||||
return
|
||||
|
||||
if current_profit > 0.05 and trade.nr_of_successful_exits == 0:
|
||||
# Take half of the profit at +5%
|
||||
|
||||
Reference in New Issue
Block a user