If it's ESOGrinder you talk about marcjordan:
I cannot see any guild related stuff in your code so far, so is the gold shown just the "looted gold" (via EVENT_LOOT_RECEIVED) from a guild sale mail?
Not sure which price the debug print to chat shows there but it must be one of these then:
GetItemLinkValue(iLink,false),
GetPriceMM(iLink),
GetPriceTTC(iLink),
Add more debug messages to the 3 functions and check which one returns what value and you should be able to see where the negative value comes from.
And as your addon tries to user MM and TTC functions your txt file should contain so that these addons load before yours.
Code:
## OptionalDependsOn: MasterMerchant TamrielTradeCenter