From 579e0bc59916410af4e16908e00d7ada2601d309 Mon Sep 17 00:00:00 2001 From: David Brazda Date: Mon, 20 Nov 2023 19:44:05 +0100 Subject: [PATCH] bugfix --- v2realbot/reporting/metricstoolsimage.py | 2 +- v2realbot/static/index.html | 2 +- v2realbot/static/js/utils.js | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/v2realbot/reporting/metricstoolsimage.py b/v2realbot/reporting/metricstoolsimage.py index 228564d..21293e0 100644 --- a/v2realbot/reporting/metricstoolsimage.py +++ b/v2realbot/reporting/metricstoolsimage.py @@ -195,7 +195,7 @@ def generate_trading_report_image(runner_ids: list = None, batch_id: str = None, #Cumulative profit - bud 1 den nebo vice dni if len(runner_ids)== 1: - if cumulative_profits: + if cumulative_profits.size == 0: # Plot 3: Cumulative Profit Over Time with Max Profit Point max_profit_time = exit_times[np.argmax(cumulative_profits)] max_profit = max(cumulative_profits) diff --git a/v2realbot/static/index.html b/v2realbot/static/index.html index 4bc7555..fa363d0 100644 --- a/v2realbot/static/index.html +++ b/v2realbot/static/index.html @@ -308,7 +308,7 @@ - + diff --git a/v2realbot/static/js/utils.js b/v2realbot/static/js/utils.js index 69a82c3..5b98686 100644 --- a/v2realbot/static/js/utils.js +++ b/v2realbot/static/js/utils.js @@ -889,6 +889,10 @@ function set_timestamp(timestamp) { } //KEY shortcuts +Mousetrap.bind('q', function() { + $( "#button_report" ).trigger( "click" ); +}); + Mousetrap.bind('e', function() { $( "#button_edit" ).trigger( "click" ); });