some changes to the average stat module, use '/aux clear average' in case of problems

This commit is contained in:
Manuel Simon Hirsig
2016-01-18 08:22:02 +01:00
parent 00e9537ce2
commit de6ff66e51
4 changed files with 118 additions and 106 deletions
+14 -11
View File
@@ -1,4 +1,4 @@
AuxVersion = '2.2.6'
AuxVersion = '2.2.7'
AuxAuthors = 'shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)'
local lastRightClickAction = GetTime()
@@ -36,7 +36,7 @@ function Aux_OnLoad()
local item_id, suffix_id = EnhTooltip.BreakLink(link)
local item_key = (item_id or 0)..':'..(suffix_id or 0)
local auction_count, seen_days, daily_average, EMA3, EMA7, EMA14 = Aux.stat_average.get_price_data(item_key)
local auction_count, seen_days, AVG_TDA, MIN_TDA, AVG_EMA5, AVG_EMA30, MIN_EMA5, MIN_EMA30 = Aux.stat_average.get_price_data(item_key)
if auction_count == 0 then
EnhTooltip.AddLine('Never seen at auction', nil, true)
@@ -45,7 +45,6 @@ function Aux_OnLoad()
EnhTooltip.AddLine('Seen '..auction_count..' '..Aux_PluralizeIf('time', auction_count)..' at auction', nil, true)
EnhTooltip.LineColor(0.5, 0.8, 0.1)
local median = Aux.stat_histogram.get_price_data(item_key)
if count == 1 then
EnhTooltip.AddLine('Median: '..Aux.util.money_string(median), nil, true)
@@ -54,14 +53,18 @@ function Aux_OnLoad()
end
EnhTooltip.LineColor(0.1,0.8,0.5)
-- EnhTooltip.AddLine('AVG TDA: '..(daily_average > 0 and Aux.util.money_string(daily_average) or RED_FONT_COLOR_CODE..'n/a'..FONT_COLOR_CODE_CLOSE), nil, true)
-- EnhTooltip.LineColor(0.1,0.8,0.5)
-- EnhTooltip.AddLine('EMA3: '..(EMA3 > 0 and Aux.util.money_string(EMA3) or RED_FONT_COLOR_CODE..'n/a'..FONT_COLOR_CODE_CLOSE), nil, true)
-- EnhTooltip.LineColor(0.1,0.8,0.5)
-- EnhTooltip.AddLine('EMA7: '..(EMA7 > 0 and Aux.util.money_string(EMA7) or RED_FONT_COLOR_CODE..'n/a'..FONT_COLOR_CODE_CLOSE), nil, true)
-- EnhTooltip.LineColor(0.1,0.8,0.5)
-- EnhTooltip.AddLine('EMA14: '..(EMA14 > 0 and Aux.util.money_string(EMA14) or RED_FONT_COLOR_CODE..'n/a'..FONT_COLOR_CODE_CLOSE), nil, true)
-- EnhTooltip.LineColor(0.1,0.8,0.5)
-- EnhTooltip.AddLine('AVG TDA: '..(AVG_TDA > 0 and Aux.util.money_string(AVG_TDA) or RED_FONT_COLOR_CODE..'n/a'..FONT_COLOR_CODE_CLOSE), nil, true)
-- EnhTooltip.LineColor(0.1,0.8,0.5)
-- EnhTooltip.AddLine('AVG EMA5: '..(AVG_EMA5 > 0 and Aux.util.money_string(AVG_EMA5) or RED_FONT_COLOR_CODE..'n/a'..FONT_COLOR_CODE_CLOSE), nil, true)
-- EnhTooltip.LineColor(0.1,0.8,0.5)
-- EnhTooltip.AddLine('AVG EMA30: '..(AVG_EMA30 > 0 and Aux.util.money_string(AVG_EMA30) or RED_FONT_COLOR_CODE..'n/a'..FONT_COLOR_CODE_CLOSE), nil, true)
-- EnhTooltip.LineColor(0.1,0.8,0.5)
-- EnhTooltip.AddLine('MIN TDA: '..(MIN_TDA > 0 and Aux.util.money_string(MIN_TDA) or RED_FONT_COLOR_CODE..'n/a'..FONT_COLOR_CODE_CLOSE), nil, true)
-- EnhTooltip.LineColor(0.1,0.8,0.5)
-- EnhTooltip.AddLine('MIN EMA5: '..(MIN_EMA5 > 0 and Aux.util.money_string(MIN_EMA5) or RED_FONT_COLOR_CODE..'n/a'..FONT_COLOR_CODE_CLOSE), nil, true)
-- EnhTooltip.LineColor(0.1,0.8,0.5)
-- EnhTooltip.AddLine('MIN EMA30: '..(MIN_EMA30 > 0 and Aux.util.money_string(MIN_EMA30) or RED_FONT_COLOR_CODE..'n/a'..FONT_COLOR_CODE_CLOSE), nil, true)
-- EnhTooltip.LineColor(0.1,0.8,0.5)
end
end)
end