Post
Topic
Board Trading Discussion
Re: ncurses based MtGox live monitor and trading-bot-framework
by
prof7bit
on 01/05/2013, 15:16:44 UTC
hy
i started to look into goxbot and i must admit, i dont get anything, but anyway i will reach the goal of my own little bot. Wink plz help!

in my strategy module i got (copied most of it of the 50/50-balance boot)

Code:
import strategy
import goxapi


class Strategy(strategy.Strategy):

    """a protfolio rebalancing bot"""
    def __init__(self, gox):
        strategy.Strategy.__init__(self, gox)
        self.temp_halt = False


    def slot_before_unload(self, _sender, _data):
        pass

    def slot_keypress(self, gox, (key)):
if key == ord("b"):
    self.debug("canceling all rebalancing orders")

This can't work. Please fix the formatting and indentations. And set your editor to 4 spaces, no tabs (recommended style, used by most others too) and dont ever mix tabs and spaces. You should first make yourself comfortable with some essential concepts of the Python programming language with simpler examples and simple isolated standalone programs, follow some tutorials. You should not attempt to ride a motorbike until you can safely ride a bicycle. This will avoid many frustrations.