I was revamping how the algorithm works for calculating prices, my goal is to provide you guys with the most efficient, most accurate spot price of Bitcoin possible. Based on the traffic to the webapp, android and RSS feeds, I am guessing I am pretty successful in it.
However this flash crash today had me scratching my head on how to proceed.
Right now it takes Mt.Gox, CampBX, and a few others, averages them by weight and provides a price.
As it stands now it's lopsided towards mt.gox in volume so sometimes it dominates the overall price output, and with the case today with such wild fluctuations coupled with extreme delay in results it made it difficult to keep up with the rapid assault of price points (we had a 10 dollar reported difference between CampBX and Mt.Gox within 3 seconds of each other, and most likely the reason was because Mt.Gox was running so far behind).
I'm looking for advice on how to refine it, is there anyway to get even more accurate and timely pricing.
It's currently something like this (it's an example! hence why i'm using 1 dollar!)
Exchange 1 - 7 BTC traded 1 dollar each
Exchange 2 - 2 BTC traded 90 cents each
Exchange 3 - 1 BTC traded 1.15 each
In the above example it's going to come to $1.03 or something close to that (as I noted if my math is off it's because I am about to pass out typing), which is how it should work.
But today we had this:
Exchange 1 - 7 BTC traded .5 dollar each
Exchange 2 - 2 BTC traded 90 cents each
Exchange 3 - 1 BTC traded 1.15 each
Forcing all sorts of weird results like the average price is now something like $0.68 cents (as I noted if my math is off it's because I am about to pass out typing)
that I had to actively correct in real time (such as turning off factoring Mt.Gox for a bit)
So I am looking for advice on how to correct for this for
http://www.ounce.me Any ideas?