@@ -178,8 +178,8 @@ class StrategyTestV3(IStrategy):
|
||||
return dataframe
|
||||
|
||||
def leverage(self, pair: str, current_time: datetime, current_rate: float,
|
||||
proposed_leverage: float, max_leverage: float, side: str,
|
||||
**kwargs) -> float:
|
||||
proposed_leverage: float, max_leverage: float, entry_tag: Optional[str],
|
||||
side: str, **kwargs) -> float:
|
||||
# Return 3.0 in all cases.
|
||||
# Bot-logic must make sure it's an allowed leverage and eventually adjust accordingly.
|
||||
|
||||
|
@@ -615,6 +615,7 @@ def test_leverage_callback(default_conf, side) -> None:
|
||||
proposed_leverage=1.0,
|
||||
max_leverage=5.0,
|
||||
side=side,
|
||||
entry_tag=None,
|
||||
) == 1
|
||||
|
||||
default_conf['strategy'] = CURRENT_TEST_STRATEGY
|
||||
@@ -626,6 +627,7 @@ def test_leverage_callback(default_conf, side) -> None:
|
||||
proposed_leverage=1.0,
|
||||
max_leverage=5.0,
|
||||
side=side,
|
||||
entry_tag='entry_tag_test',
|
||||
) == 3
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user