Verified:

Tigress Game profile

Member
562

Jul 1st 2012, 6:45:14

Can we get a link showing how big an order is on an ask price?

For those selling they may be willing to fill an order, but would prefer not to send all their goods at the lower price.

or provide a report showing the various asking prices and quantities willing to buy next to each one.
Happy Hunting

Tigress

qzjul Game profile

Administrator
Game Development
10,263

Jul 1st 2012, 19:20:08

Problem is you can set orders that are way bigger than what you can afford.
Finally did the signature thing.

Tigress Game profile

Member
562

Jul 1st 2012, 20:45:02

is there a way of adjusting the ask quantity based on a summarized cash on hand of n countries requesting?

Example: (i don't know the schema therefore... psuedo)

select askprice, sum(cashonhand), (sum(cashonhand) / askprice ) as qtyAsked

from countrymarket

where activecountry = 1

Group by askprice, sum(cashonhand), (sum(cashonhand) / askprice )
Happy Hunting

Tigress

Marshal Game profile

Member
32,589

Jul 1st 2012, 21:30:23

not atm.
Patience: Yep, I'm with ELK and Marshal.

ELKronos: Patty is more hairy.

Gallery: K at least I am to my expectations now.

LadyGrizz boobies is fine

NOW3P: Morwen is a much harsher mistress than boredom....

qzjul Game profile

Administrator
Game Development
10,263

Jul 2nd 2012, 0:25:15

mmm cash on hand is not stored in the market tables...

of course anything is possible, but it would probably be a prohibitively expensive query to do, especially an average of once per second
Finally did the signature thing.

Tigress Game profile

Member
562

Jul 2nd 2012, 3:04:06

hmmm... make it for only one good at a time, and only run the query on demand

filter to countries that have ask orders for the particular resource and sum cash on hand from country table?

the join can be on country id (assuming ask price and resource is stored with a country id and table containing cash on hand also has a country id) --- where resource = @resource

just thinking out loud I guess

Happy Hunting

Tigress

qzjul Game profile

Administrator
Game Development
10,263

Jul 2nd 2012, 16:31:39

most joins are too slow for our query rates =/ demand for the market *is* around 1/second, especially due to feeds &etc; but even without it's fairly high
Finally did the signature thing.

Tigress Game profile

Member
562

Jul 2nd 2012, 18:12:01

kk, did realize it was that resource intensive...

what about a tracking table that is updated via a trigger that is executed only if a country has an active standing order on the market and their cash on hand changes.

---------------------------------------------------------------------------------------------------
country id | resource | ask price | ask qty | cash on hand | active | buy power
---------------------------------------------------------------------------------------------------

update the ask price, ask qty, cash on hand, active and buy power when those change.

buy power = cash on hand / ask price

Deactivate any standing order when buy power = 0 or when ask qty = 0.

Edited By: Tigress on Jul 2nd 2012, 18:15:07
See Original Post
Happy Hunting

Tigress