chore: fix minor gotcha
This commit is contained in:
@@ -121,7 +121,7 @@ def protections(self):
|
|||||||
|
|
||||||
#### Cooldown Period
|
#### 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".
|
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
|
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 = [
|
# filters = [
|
||||||
# Trade.is_open.is_(False),
|
# Trade.is_open.is_(False),
|
||||||
# Trade.close_date > look_back_until,
|
# Trade.close_date > look_back_until,
|
||||||
|
|||||||
Reference in New Issue
Block a user