mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-03-03 20:33:23 +00:00
Update samples in the documentation
This commit is contained in:
@@ -311,7 +311,7 @@ After:
|
||||
|
||||
``` python hl_lines="5 7"
|
||||
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
|
||||
current_rate: float, current_profit: float, **kwargs) -> float:
|
||||
current_rate: float, current_profit: float, after_fill: bool, **kwargs) -> float:
|
||||
# once the profit has risen above 10%, keep the stoploss at 7% above the open price
|
||||
if current_profit > 0.10:
|
||||
return stoploss_from_open(0.07, current_profit, is_short=trade.is_short)
|
||||
|
||||
Reference in New Issue
Block a user