Hey Guys,
I was thinking about open sourcing my trading bot too. Actually I already wrote quite a few.
I have attached you the source of a promising raw model that actually works. You can fine tune its variables (login/pw for MtGox) in the header of this code. Below that you dont have to change anything at all. It was written in PHP and you can just launch it from console. (just type "php ./ob.php" in the same path as the script resides on your linux shell)
What it does is the following:
It reads the market depth at mtgox and weights open bids/asks by their amount and distance to current market price (The closer they are to the market price the less likely they will be changed shortly - why? Because the person having placed those orders is at a high risk of getting filled, so its unlikely that its actually bogus order). After weighting the open orders it decides if there is much higher supply than demand (or vice versa), opens a position and holds it until market conditions have changed. So far so good.
Now for the bad part:
The fees at Mt. Gox are too high for very short term trading strategies like "scalping". The fee structure of 0.3% per trade sounds fair but what would be more attractive is a fee that is charged on actual profits. This would enable us to use many short term trading strategies that actually just dont work yet. In real trading you can make a fortune of a strategy that beats the market by just 1%. You don't need to have a high "edge" as many people commonly believe. The problem is this: MtGox eats 0.6% of each buy and sell (= round) which makes the odds much worse for us. In professional trading you normally have a broker with a more attractive fee structure OR you focus on long term trading, what is much harder in bitcoin. Why? Because a reliable history of quotes for professional time series analysis does not exist and conducting a long term prognosis for the whole bitcoin project is very hard at present. Since I dont have a 0% account I cannot investigate more on the short term possiblities.
If anyone is willing to let me test my more advanced scalping strategies on his 0% account I would be willing to share any profits with this person.
If you liked my code and want me to release more please consider a donation:
14o557CreqAimfskDyMwKZMfe2U6Pi3i9q
Download version 0.1:
http://www.megaupload.com/?d=EMI6H946Notice: The script is designed to be run from the console of a *NIX system, it will output its status messages while working. It cannot simply be uploaded to a webhost running php and opened from a web browser. You have to use the console (ssh login) to start the script or run it from a local *NIX box.
Please let me know your results,
Thanks