From d7976bd4fd39cde5be62a53cf16673c285897cec Mon Sep 17 00:00:00 2001 From: Mike Bryant Date: Mon, 6 Apr 2020 14:57:04 +0100 Subject: [PATCH] fix: Predict higher prices in second day of spike if we know --- js/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/scripts.js b/js/scripts.js index f9232c6..6e52f4d 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -455,7 +455,7 @@ function* generate_pattern_3_with_peak(given_prices, peak_start) { // TODO this could be made more accurate, I've not bothered with forward/backward calculating of the rate each side of the peak value for (var i = peak_start+2; i < peak_start+5; i++) { if (i == peak_start+3) { - min_pred = Math.floor(1.4 * buy_price); + min_pred = predicted_prices[peak_start+2].min; max_pred = Math.ceil(2.0 * buy_price); } else { min_pred = Math.floor(1.4 * buy_price) - 1;