Update custom_sell to custom_exit

This commit is contained in:
Matthias
2022-03-12 11:15:27 +01:00
parent fe62a71f4c
commit b044dd2c45
6 changed files with 74 additions and 22 deletions

View File

@@ -1,4 +1,9 @@
# The strategy which fails to load due to non-existent dependency
"""
The strategies here are minimal strategies designed to fail loading in certain conditions.
They are not operational, and don't aim to be.
"""
from datetime import datetime
from pandas import DataFrame
@@ -14,3 +19,13 @@ class TestStrategyNoImplements(IStrategy):
class TestStrategyNoImplementSell(TestStrategyNoImplements):
def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
return super().populate_entry_trend(dataframe, metadata)
class TestStrategyImplementCustomSell(TestStrategyNoImplementSell):
def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
return super().populate_exit_trend(dataframe, metadata)
def custom_sell(self, pair: str, trade, current_time: datetime,
current_rate: float, current_profit: float,
**kwargs):
return False