feat: rich table for recursive analysis
This commit is contained in:
@@ -7,6 +7,7 @@ from freqtrade.constants import Config
|
|||||||
from freqtrade.exceptions import OperationalException
|
from freqtrade.exceptions import OperationalException
|
||||||
from freqtrade.optimize.analysis.recursive import RecursiveAnalysis
|
from freqtrade.optimize.analysis.recursive import RecursiveAnalysis
|
||||||
from freqtrade.resolvers import StrategyResolver
|
from freqtrade.resolvers import StrategyResolver
|
||||||
|
from freqtrade.util import print_rich_table
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -16,9 +17,9 @@ class RecursiveAnalysisSubFunctions:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def text_table_recursive_analysis_instances(recursive_instances: List[RecursiveAnalysis]):
|
def text_table_recursive_analysis_instances(recursive_instances: List[RecursiveAnalysis]):
|
||||||
startups = recursive_instances[0]._startup_candle
|
startups = recursive_instances[0]._startup_candle
|
||||||
headers = ["indicators"]
|
headers = ["Indicators"]
|
||||||
for candle in startups:
|
for candle in startups:
|
||||||
headers.append(candle)
|
headers.append(str(candle))
|
||||||
|
|
||||||
data = []
|
data = []
|
||||||
for inst in recursive_instances:
|
for inst in recursive_instances:
|
||||||
@@ -30,10 +31,8 @@ class RecursiveAnalysisSubFunctions:
|
|||||||
data.append(temp_data)
|
data.append(temp_data)
|
||||||
|
|
||||||
if len(data) > 0:
|
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
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|||||||
Reference in New Issue
Block a user