chore: update attribute wording to bt_profit

This commit is contained in:
Matthias 2024-08-12 10:38:57 +02:00
parent 2bc9cdafb2
commit 10f0522a6b
3 changed files with 5 additions and 5 deletions

View File

@ -378,7 +378,7 @@ class LocalTrade:
# Copy of trades_open - but indexed by pair
bt_trades_open_pp: Dict[str, List["LocalTrade"]] = defaultdict(list)
bt_open_open_trade_count: int = 0
total_profit: float = 0
bt_total_profit: float = 0
realized_profit: float = 0
id: int = 0
@ -744,7 +744,7 @@ class LocalTrade:
LocalTrade.bt_trades_open = []
LocalTrade.bt_trades_open_pp = defaultdict(list)
LocalTrade.bt_open_open_trade_count = 0
LocalTrade.total_profit = 0
LocalTrade.bt_total_profit = 0
def adjust_min_max_rates(self, current_price: float, current_price_low: float) -> None:
"""
@ -1443,7 +1443,7 @@ class LocalTrade:
LocalTrade.bt_trades_open_pp[trade.pair].remove(trade)
LocalTrade.bt_open_open_trade_count -= 1
LocalTrade.bt_trades.append(trade)
LocalTrade.total_profit += trade.close_profit_abs
LocalTrade.bt_total_profit += trade.close_profit_abs
@staticmethod
def add_bt_trade(trade):

View File

@ -82,7 +82,7 @@ class Wallets:
tot_profit = Trade.get_total_closed_profit()
else:
# Backtest mode
tot_profit = LocalTrade.total_profit
tot_profit = LocalTrade.bt_total_profit
tot_profit += sum(trade.realized_profit for trade in open_trades)
tot_in_trades = sum(trade.stake_amount for trade in open_trades)
used_stake = 0.0

View File

@ -2140,7 +2140,7 @@ def test_Trade_object_idem():
"bt_trades_open",
"bt_trades_open_pp",
"bt_open_open_trade_count",
"total_profit",
"bt_total_profit",
"from_json",
)