Update v3 strategy interface
This commit is contained in:
parent
746d046f1a
commit
f7b0933203
@ -185,9 +185,12 @@ class StrategyTestV3(IStrategy):
|
|||||||
|
|
||||||
return 3.0
|
return 3.0
|
||||||
|
|
||||||
def adjust_trade_position(self, trade: Trade, current_time: datetime, current_rate: float,
|
def adjust_trade_position(self, trade: Trade, current_time: datetime,
|
||||||
current_profit: float,
|
current_rate: float, current_profit: float,
|
||||||
min_stake: Optional[float], max_stake: float, **kwargs):
|
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:
|
if current_profit < -0.0075:
|
||||||
orders = trade.select_filled_orders(trade.entry_side)
|
orders = trade.select_filled_orders(trade.entry_side)
|
||||||
|
@ -612,7 +612,7 @@ def test_calc_open_close_trade_price(
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("init_persistence")
|
@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(
|
trade = Trade(
|
||||||
pair='ADA/USDT',
|
pair='ADA/USDT',
|
||||||
stake_amount=60.0,
|
stake_amount=60.0,
|
||||||
|
Loading…
Reference in New Issue
Block a user