Post
Topic
Board Trading Discussion
Re: ncurses based MtGox live monitor and trading-bot-framework
by
wilfried
on 01/05/2013, 16:07:34 UTC
Sad i am blind as a fish, cant see it..

i posted:

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")






If key "b" is pressed goxtool displays: someone pressed key b,
But it doesnt display "canceling all rebalancing orders".
so, how to write messages to the log output?


btw: is there an easy way to get rid of the Winconsole output in the main window? I am running tail on the log in a second window, so its just superfluid for me?



what i run now is (snipplet):

Code:
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)):
        """a key has been pressed"""

        if key == ord("c"):
            # cancel existing rebalancing orders and suspend trading
            self.debug("canceling all rebalancing orders")
            self.temp_halt = True
            #self.cancel_orders()

do you mean that self.debug.. is under the "e" of key and above it was under the "y" of key?