final colorization schema

colorization schema-2: red, green, bright/dim

colorization schema-3: red, green, bright only green bests

colorization schema-4: no red, green for profit, bright for bests
This commit is contained in:
hroff-1902 2019-08-10 21:59:44 +03:00
parent ae39f6fba5
commit 8f92912852

View File

@ -163,11 +163,9 @@ class Hyperopt(Backtesting):
# Colorize output
if self.config.get('print_colorized', False):
if results['total_profit'] > 0:
log_str = Style.BRIGHT + log_str
if results['loss'] >= MAX_LOSS:
log_str = Fore.RED + log_str
elif is_best_loss:
log_str = Fore.GREEN + log_str
if print_all and is_best_loss:
log_str = Style.BRIGHT + log_str
if print_all:
print(log_str)
else: