log total profit in percentages also

This commit is contained in:
Janne Sinivirta 2018-01-14 13:10:25 +02:00
parent 92241baade
commit f1e176d35c

View File

@ -191,10 +191,11 @@ def optimizer(params):
def format_results(results: DataFrame):
return ('{:6d} trades. Avg profit {: 5.2f}%. '
'Total profit {: 11.8f} BTC. Avg duration {:5.1f} mins.').format(
'Total profit {: 11.8f} BTC ({:.4f}Σ%). Avg duration {:5.1f} mins.').format(
len(results.index),
results.profit_percent.mean() * 100.0,
results.profit_BTC.sum(),
results.profit_percent.sum(),
results.duration.mean() * 5,
)