From 9bd4a84d2a44dd50aaf1c57413d0db8dc65128d2 Mon Sep 17 00:00:00 2001 From: David Brazda Date: Thu, 19 Oct 2023 13:32:37 +0200 Subject: [PATCH] log highlighting and better compare --- v2realbot/controller/services.py | 5 + v2realbot/static/index.html | 37 +- v2realbot/static/js/archivechart.js | 12 +- v2realbot/static/js/archivetables.js | 71 +- v2realbot/static/js/config.js | 2 +- v2realbot/static/js/libs/prism/prism-json.js | 27 + v2realbot/static/js/libs/prism/prism-log.js | 120 + .../js/libs/prism/prism-tomorrow.min.css | 99 + v2realbot/static/js/libs/prism/prism.js | 1946 +++++++++++++++++ v2realbot/static/js/mytables.js | 12 +- v2realbot/static/main.css | 24 +- .../indicators/indicators_hub.py | 2 +- 12 files changed, 2321 insertions(+), 36 deletions(-) create mode 100644 v2realbot/static/js/libs/prism/prism-json.js create mode 100644 v2realbot/static/js/libs/prism/prism-log.js create mode 100644 v2realbot/static/js/libs/prism/prism-tomorrow.min.css create mode 100644 v2realbot/static/js/libs/prism/prism.js diff --git a/v2realbot/controller/services.py b/v2realbot/controller/services.py index af7a249..295ed32 100644 --- a/v2realbot/controller/services.py +++ b/v2realbot/controller/services.py @@ -688,6 +688,11 @@ def populate_metrics_output_directory(strat: StrategyInstance, inter_batch_param res["profit"]["long_losses"] = round(long_losses,2) res["profit"]["short_wins"] = round(short_wins,2) res["profit"]["short_losses"] = round(short_losses,2) + + mpt_string = "PT"+str(max_profit_time.hour)+":"+str(max_profit_time.minute) if max_profit_time is not None else "" + mlt_string ="LT"+str(max_loss_time.hour)+":"+str(max_loss_time.minute) if max_loss_time is not None else "" + ##summary pro rychle zobrazeni P333L-222 PT9:30 PL10:30 + res["profit"]["sum"]="P"+str(int(max_profit))+"L"+str(int(max_loss))+" "+ mpt_string+" " + mlt_string #vlozeni celeho listu res["prescr_trades"]=json.loads(json.dumps(strat.state.vars.prescribedTrades, default=json_serial)) diff --git a/v2realbot/static/index.html b/v2realbot/static/index.html index 9c45630..2454784 100644 --- a/v2realbot/static/index.html +++ b/v2realbot/static/index.html @@ -82,19 +82,34 @@ - + + + + + + + + - + + + + + + // highlightAll(); + --> @@ -236,6 +251,9 @@ + @@ -510,7 +528,7 @@ -