Update v3 strategy interface

This commit is contained in:
Matthias 2022-05-27 19:32:19 +02:00
parent 746d046f1a
commit f7b0933203
2 changed files with 7 additions and 4 deletions

View File

@ -185,9 +185,12 @@ class StrategyTestV3(IStrategy):
return 3.0
def adjust_trade_position(self, trade: Trade, current_time: datetime, current_rate: float,
current_profit: float,
min_stake: Optional[float], max_stake: float, **kwargs):
def adjust_trade_position(self, trade: Trade, current_time: datetime,
current_rate: float, current_profit: float,
min_stake: Optional[float], max_stake: float,
current_entry_rate: float, current_exit_rate: float,
current_entry_profit: float, current_exit_profit: float,
**kwargs) -> Optional[float]:
if current_profit < -0.0075:
orders = trade.select_filled_orders(trade.entry_side)

View File

@ -612,7 +612,7 @@ def test_calc_open_close_trade_price(
@pytest.mark.usefixtures("init_persistence")
def test_trade_close(limit_buy_order_usdt, limit_sell_order_usdt, fee):
def test_trade_close(fee):
trade = Trade(
pair='ADA/USDT',
stake_amount=60.0,