Now in the spirit of prof7bit's generosity, giving away the sources of the goxtool bot I'm personally running, have fun:
https://gist.github.com/pira/8030590The bot is for his amazing goxtool:
http://prof7bit.github.com/goxtool/Bot install is as any other bot, copy it in goxtool dir, run with --strategy=_ranger.py
IMPORTANT: you need to set RANGE_MIN and RANGE_MAX in the bot to set trading corridor. Minimum price is where the bot would be all-in BTC, maximum price is where the bot will be all-in-FIAT. You must understand, that everything you have on the linked gox account would be traded. So, for example, if you set price corridor 300-900 and the price goes to 900, the bot would have sold everything and would have set buy orders waiting for retraction. My main goals for this bot were: ease of use (two buttons), stability, and api lag resilience.
To start the bot, press 'p' in goxtool. To stop and remove all orders, press 'c'. If the bot has hit one of the range boundaries, hit 'p' to resume setting orders, too (but you might want to adjust the bounds first). Initially, it creates 6 orders around the current price. Every step of the grid is ~2.5% but you can change that to your liking. After some time, there will be more orders as it follows the price around. This is expected and helps catch gox spikes when API lags. If you ever adjust the trading corridor, you need to cancel your orders before reloading the bot - this is important, as the order price levels depend on the RANGE_MIN value. Bot uses all your fiat and evenly spreads that to calculate buy amounts, and the same for BTC - every sell order would yield the same amount of usd. Bot has been tested for a while now, and performs well even under very volatile conditions working with substantial funds. But the usual disclaimer applies - not responsible for any damages, harm, financial losses, etc, coming from the use of this bot or it's parts, you are on your own.
All the credit for the goxtool and the balancer bot this is based off goes to prof7bit - you really should go and donate to him if you have not done so yet. And if you find my bot useful too during this volatile times, here's my address for donations: 12pEHJd12Lf7KAiqcT35XLgadmJN3zHQu9
I do not accept requests for any coding, but I'll be glad to include your improvements or suggestions in the range trader here.