some more history changes, now using the market value in the post panel when no auctions found
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
AuxVersion = '2.2.19'
|
||||
AuxVersion = '2.2.20'
|
||||
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, day_count, TDA, EMA7, trend, correlation = Aux.history.price_data(item_key)
|
||||
local auction_count, day_count, TDA, EMA7 = Aux.history.price_data(item_key)
|
||||
|
||||
if auction_count == 0 then
|
||||
EnhTooltip.AddLine('Never seen at auction', nil, true)
|
||||
@@ -46,31 +46,15 @@ function Aux_OnLoad()
|
||||
EnhTooltip.LineColor(0.5, 0.8, 0.1)
|
||||
|
||||
local market_value = Aux.history.market_value(item_key)
|
||||
local trend_percentage = ceil((1 - trend) * 100)
|
||||
local market_value_line
|
||||
if count == 1 then
|
||||
market_value_line = 'Market Value: '..Aux.util.money_string(market_value)
|
||||
else
|
||||
market_value_line = 'Market Value: '..Aux.util.money_string(market_value * count)..' / '..Aux.util.money_string(market_value)
|
||||
if correlation < 0.8 then -- unreliable
|
||||
market_value_line = market_value_line..' (?)'
|
||||
elseif trend_percentage > 0 then
|
||||
market_value_line = market_value_line..' (+'..trend_percentage..'%)'
|
||||
elseif trend_percentage < 0 then
|
||||
market_value_line = market_value_line..' ('..trend_percentage..'%)'
|
||||
end
|
||||
end
|
||||
|
||||
EnhTooltip.AddLine(market_value_line, nil, true)
|
||||
EnhTooltip.LineColor(0.1,0.8,0.5)
|
||||
|
||||
-- EnhTooltip.AddLine('TDA: '..(TDA > 0 and Aux.util.money_string(TDA) 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('Trend: '..trend_percentage..'%', nil, true)
|
||||
-- EnhTooltip.LineColor(0.1,0.8,0.5)
|
||||
-- EnhTooltip.AddLine('SD: '..sqrt(variance), nil, true)
|
||||
-- EnhTooltip.LineColor(0.1,0.8,0.5)
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -265,8 +249,8 @@ function Aux.on_tab_click(index)
|
||||
end)
|
||||
end
|
||||
|
||||
function Aux_Round(v)
|
||||
return math.floor(v + 0.5)
|
||||
function Aux.round(v)
|
||||
return floor(v + 0.5)
|
||||
end
|
||||
|
||||
function Aux.price_level_color(pct)
|
||||
|
||||
Reference in New Issue
Block a user