mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
chore: update attribute wording to bt_profit
This commit is contained in:
parent
2bc9cdafb2
commit
10f0522a6b
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user