From 786e0f96d240f373b33bf618911b844f108be739 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Fri, 18 Mar 2016 00:34:14 +0100 Subject: [PATCH] changed unreliability indicator --- history.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/history.lua b/history.lua index e19b4d5..f09c03f 100644 --- a/history.lua +++ b/history.lua @@ -98,7 +98,7 @@ function public.value(item_key) value = private.weighted_median(weighted_values) -- not seen in the last week or not ignoring at least two high and low outliers - unreliable = item_record.data_points[1].time < time() - 60 * 60 * 24 * 7 or weighted_values[1].weight + (weighted_values[2] and weighted_values[2].weight or 0) >= 0.5 + unreliable = item_record.data_points[1].time < time() - 60 * 60 * 24 * 7 or not weighted_values[2] or weighted_values[1].weight + weighted_values[2].weight >= 0.5 else value = private.market_value(item_record) unreliable = true