feat: display min/max balance
This commit is contained in:
@@ -288,6 +288,24 @@ def text_table_add_metrics(strat_results: dict) -> None:
|
|||||||
else []
|
else []
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if wallet_stats := strat_results.get("wallet_stats"):
|
||||||
|
wallet_metrics = (
|
||||||
|
(
|
||||||
|
"Min/Max balance realized",
|
||||||
|
f"{fmt_coin(strat_results['csum_min'], stake)} / "
|
||||||
|
f"{fmt_coin(strat_results['csum_max'], stake)}",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"Min/Max balance unrealized",
|
||||||
|
f"{fmt_coin(wallet_stats['low_balance'], stake)} / "
|
||||||
|
f"{fmt_coin(wallet_stats['high_balance'], stake)}",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"Min/Max balance dates",
|
||||||
|
f"{wallet_stats['low_date']} / {wallet_stats['high_date']}",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
# Newly added fields should be ignored if they are missing in strat_results. hyperopt-show
|
# Newly added fields should be ignored if they are missing in strat_results. hyperopt-show
|
||||||
# command stores these results and newer version of freqtrade must be able to handle old
|
# command stores these results and newer version of freqtrade must be able to handle old
|
||||||
# results with missing new fields.
|
# results with missing new fields.
|
||||||
@@ -408,8 +426,7 @@ def text_table_add_metrics(strat_results: dict) -> None:
|
|||||||
),
|
),
|
||||||
*entry_adjustment_metrics,
|
*entry_adjustment_metrics,
|
||||||
("", ""), # Empty line to improve readability
|
("", ""), # Empty line to improve readability
|
||||||
("Min balance", fmt_coin(strat_results["csum_min"], stake)),
|
*wallet_metrics,
|
||||||
("Max balance", fmt_coin(strat_results["csum_max"], stake)),
|
|
||||||
*drawdown_metrics,
|
*drawdown_metrics,
|
||||||
("Market change", f"{strat_results['market_change']:.2%}"),
|
("Market change", f"{strat_results['market_change']:.2%}"),
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user