mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
fix flake8, set trade object param as Optional
This commit is contained in:
parent
d26869ea0a
commit
91c710408a
|
@ -395,7 +395,7 @@ class IStrategy(ABC, HyperStrategyMixin):
|
||||||
"""
|
"""
|
||||||
return self.stoploss
|
return self.stoploss
|
||||||
|
|
||||||
def custom_entry_price(self, pair: str, trade: Trade, current_time: datetime,
|
def custom_entry_price(self, pair: str, trade: Optional[Trade], current_time: datetime,
|
||||||
proposed_rate: float,
|
proposed_rate: float,
|
||||||
entry_tag: Optional[str], side: str, **kwargs) -> float:
|
entry_tag: Optional[str], side: str, **kwargs) -> float:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -33,7 +33,8 @@ class StrategyTestV3CustomEntryPrice(StrategyTestV3):
|
||||||
def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||||
return dataframe
|
return dataframe
|
||||||
|
|
||||||
def custom_entry_price(self, pair: str, trade: 'Trade', current_time: datetime, proposed_rate: float,
|
def custom_entry_price(self, pair: str, trade: Trade, current_time: datetime,
|
||||||
|
proposed_rate: float,
|
||||||
entry_tag: Optional[str], side: str, **kwargs) -> float:
|
entry_tag: Optional[str], side: str, **kwargs) -> float:
|
||||||
|
|
||||||
return self.new_entry_price
|
return self.new_entry_price
|
||||||
|
|
Loading…
Reference in New Issue
Block a user