From 8e2f28955ee04d74f85fdc2facefdbe119acfdf1 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 7 Jul 2024 10:05:17 +0200 Subject: [PATCH] feat: rich table for recursive analysis --- freqtrade/optimize/analysis/recursive_helpers.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/freqtrade/optimize/analysis/recursive_helpers.py b/freqtrade/optimize/analysis/recursive_helpers.py index 90ac8ed1d..be596fa68 100644 --- a/freqtrade/optimize/analysis/recursive_helpers.py +++ b/freqtrade/optimize/analysis/recursive_helpers.py @@ -7,6 +7,7 @@ from freqtrade.constants import Config from freqtrade.exceptions import OperationalException from freqtrade.optimize.analysis.recursive import RecursiveAnalysis from freqtrade.resolvers import StrategyResolver +from freqtrade.util import print_rich_table logger = logging.getLogger(__name__) @@ -16,9 +17,9 @@ class RecursiveAnalysisSubFunctions: @staticmethod def text_table_recursive_analysis_instances(recursive_instances: List[RecursiveAnalysis]): startups = recursive_instances[0]._startup_candle - headers = ["indicators"] + headers = ["Indicators"] for candle in startups: - headers.append(candle) + headers.append(str(candle)) data = [] for inst in recursive_instances: @@ -30,10 +31,8 @@ class RecursiveAnalysisSubFunctions: data.append(temp_data) if len(data) > 0: - from tabulate import tabulate + print_rich_table(data, headers, summary="Recursive Analysis") - table = tabulate(data, headers=headers, tablefmt="orgtbl") - print(table) return data return data