|
|
|
@ -285,7 +285,8 @@ const calculateOutput = function (data, first_buy, previous_pattern) {
|
|
|
|
|
let buy_price = parseInt(buy_input.val());
|
|
|
|
|
previous_pattern_number = ""
|
|
|
|
|
for (let poss of analyzed_possibilities) {
|
|
|
|
|
var out_line = "<tr><td class='table-pattern'>" + poss.pattern_description + "</td>"
|
|
|
|
|
var out_line = "<tr><td class='table-pattern'>" + poss.pattern_description + "</td>";
|
|
|
|
|
const style_price = buy_price || poss.prices[0].min;
|
|
|
|
|
if (previous_pattern_number != poss.pattern_number) {
|
|
|
|
|
previous_pattern_number = poss.pattern_number
|
|
|
|
|
pattern_count = analyzed_possibilities
|
|
|
|
@ -295,7 +296,7 @@ const calculateOutput = function (data, first_buy, previous_pattern) {
|
|
|
|
|
}
|
|
|
|
|
out_line += `<td>${displayPercentage(poss.probability)}</td>`;
|
|
|
|
|
for (let day of poss.prices.slice(2)) {
|
|
|
|
|
let price_class = getPriceClass(buy_price, day.max);
|
|
|
|
|
let price_class = getPriceClass(style_price, day.max);
|
|
|
|
|
if (day.min !== day.max) {
|
|
|
|
|
out_line += `<td class='${price_class}'>${day.min} ${i18next.t("output.to")} ${day.max}</td>`;
|
|
|
|
|
} else {
|
|
|
|
@ -303,8 +304,8 @@ const calculateOutput = function (data, first_buy, previous_pattern) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var min_class = getPriceClass(buy_price, poss.weekGuaranteedMinimum);
|
|
|
|
|
var max_class = getPriceClass(buy_price, poss.weekMax);
|
|
|
|
|
var min_class = getPriceClass(style_price, poss.weekGuaranteedMinimum);
|
|
|
|
|
var max_class = getPriceClass(style_price, poss.weekMax);
|
|
|
|
|
out_line += `<td class='${min_class}'>${poss.weekGuaranteedMinimum}</td><td class='${max_class}'>${poss.weekMax}</td></tr>`;
|
|
|
|
|
output_possibilities += out_line
|
|
|
|
|
}
|
|
|
|
|