mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
chore: fix minor gotcha
This commit is contained in:
parent
57139295b5
commit
98c8521057
|
@ -121,7 +121,7 @@ def protections(self):
|
|||
|
||||
#### Cooldown Period
|
||||
|
||||
`CooldownPeriod` locks a pair for `stop_duration` in minutes (or in candles when using `stop_duration_candles`, or until the set time when using `unlock_at`) after selling, avoiding a re-entry for this pair for `stop_duration` minutes.
|
||||
`CooldownPeriod` locks a pair for `stop_duration` in minutes (or in candles when using `stop_duration_candles`, or until the set time when using `unlock_at`) after exiting, avoiding a re-entry for this pair for `stop_duration` minutes.
|
||||
|
||||
The below example will stop trading a pair for 2 candles after closing a trade, allowing this pair to "cool down".
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class CooldownPeriod(IProtection):
|
|||
"""
|
||||
Get last trade for this pair
|
||||
"""
|
||||
look_back_until = date_now - timedelta(minutes=self._stop_duration)
|
||||
look_back_until = date_now - timedelta(minutes=self._lookback_period)
|
||||
# filters = [
|
||||
# Trade.is_open.is_(False),
|
||||
# Trade.close_date > look_back_until,
|
||||
|
|
Loading…
Reference in New Issue
Block a user