thx again, i re-pasted the rebalancing bot and now it works, still i cant see what the error in the above code was, anyway it prints out now. I got this code now: """ The portfolio rebalancing bot will buy and sell to maintain a constant asset allocation ratio of exactly 50/50 = fiat/BTC """
import strategy import goxapi
DISTANCE = 7 # percent price distance of next rebalancing orders MARKER = 7 # lowest digit of price to identify bot's own orders COIN = 1E8 # number of satoshi per coin, this is a constant.
def add_marker(price, marker): """encode a marker in the price value to find bot's own orders""" return price / 10 * 10 + marker
def has_marker(price, marker): """return true if the price value has the marker""" return (price % 10) == marker
def mark_own(price): """return the price with our own marker embedded""" return add_marker(price, MARKER)
def is_own(price): """return true if this price has our own marker""" return has_marker(price, MARKER)
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()
could you please point me in the right direction, so i can do some reading, about the "virtual slots"- i suppose the functions in the Strategy Class are those slots, i.e. "slot_history_changed" - one is supposed to use this function to put some code in, when it is "fired" - what i dont get is, the def is only fount in the strategy.py file - how does the goxtool and goxapi fire something into it?? thx!
|
|
|
Hy prof7bit, maybe i am blind, but i left the parts as they were in the rebalancing bot. what i saw now from looking into http://www.rugatu.com/questions/14260/python-trading-bot-configuration-fileis that the rebalancing bot does import strategy and in strategy.py there is a function slot_keypress in the bot of tarzan he doesnt import strategy and defines the class Strategy(goxapi.BaseObject): - but if thats the problem, how does the balancing bot work? thx
|
|
|
thx, so your log shows the message, mine doesnt; there is something wrong with my setup, but i cant figure out what. i.e. this script prints out the messages: http://www.rugatu.com/questions/14260/python-trading-bot-configuration-filemy bot does load - debug message appears: 2013-04-30 15:30:24,177:DEBUG:testbot.Strategy:testbot.Strategy unloaded and keystroke is registered, but the self.debug message doesnt print. If I use it i.e. with an non existent bot file (goxtool.py --strategy=anything.py it does not recognize the key pressed. I am stuck with this
|
|
|
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](https://bitcointalk.org/Smileys/default/wink.gif) plz help! in my strategy module i got (copied most of it of the 50/50-balance boot) 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?
|
|
|
the announcement of the prosecutor only talks about money, not bitcoins, so maybe, bitcoins are not confiscated.
|
|
|
before anyone is sueing btc24 i would recommend to first claim your money at btc 24 lawyer. if they dont react properly you can still file a lawsuit. btc 24 owner simon hausdorf/his lawyer mr röhl do not even know of exactly what is the accusation. they have not received the prosecutors files yet. it is way to early to conclude that a crime really happened. check out this thread first: http://board.btc24-help.com/viewtopic.php?f=3&t=141 Caution! I did not say that for claiming the money Hausdorf has to be sued. check with your german lawyer first! maybe one has to file a claim against the state of germany to get the money - those procedures of "secured funds" differ from country to country.
|
|
|
sealand is an urban myth, just a guy and a platform
Which is not any different than any other government leaders around the world. They aren't actually special either, and are not ontologically different from you and me. Just a guy, and a bunch of weapons to make his word "law." yeah, but as far as i know that sealand guy did follow the british insolvency proceedings when his "sealand" was off funds..
|
|
|
sealand is an urban myth, just a guy and a platform
|
|
|
Hy, I dont get the maths, please help ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) According to https://www.bitstamp.net/fee_schedule/for trades <$500 fee should be 0.5% I currently made some trades <5$ and always got a fee of 0.03! 5/100/2=0.025 Ok, if they only use 2 digits behind comma, it makes sense - its 0.03 So trades from 5 to 9 $ could have a fee of 0.03. but my trades where from 4.39$ to 4.53$ 4.5/100/2=0.0225 Rounded thats 0,02. Not 0.03. thats a difference of 50%.... Is this some using of float....? (little joke). How to calc the fee? Second, do I get it right: when selling they substract 0.05% from the income - when buying you buy order money minus 0.05% ? I saw the limit order mask only accepts two digits behind comma for $ amounts. As for a trade once executed, how many digits are computed? thx
|
|
|
Once a address is added the only way to change it is to retype it and then for you to enter your pin to confirm. Leave it with me i will keep looking and shoot you an email when i can find out more...
Hy, Thanks, yes, I stick with you and e-mail on that subject. Only thing to the public: Does anyone know whom the adress LbDQ1nZZYiZ4snMRguUKMSm5nu9qn7ZP belongs to? Maybe my account was hacked?
|
|
|
hy, mailed to support today, but no answer yet. maybe one of you can help me - i joined the pool some days ago and got the first automatic payout, but i didnt receive it, so i checked with the account settings, and the following adress is stored as payout adress:
LbDQ1nZZYiZ4snMRguUKMSm5nu9qn7ZPz9
thing is - i dont have that adress! call me completely dumb, but as i remember i put my real adress in the settings after registering.. what could have happened? does anyone know whom the adress belongs to? i use litecoin-win 0.6.3c beta
thx!
|
|
|
hy i keep sending verification pdf´s and everytime you answer: the adress you gave us doesnt match the adress on the pdf you sent. BUT i cant find any form to correct the adress is gave you. plz help gtz
|
|
|
yeah of course, but theres a difference between discussing the fact that a site went offline, if api keys where misused, if the admin is trading himself by setting limits he knows of before they are published, if innodb or myisam was used etc etc and that whining and aggravating and instantly threatening everybody. no one knows if anything is lost at bitcoin-24, we will see. theres no point in getting pissed at the moment, besides beeing an asshole ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
Be sure i checked that number before, i don't wanna have hundreds of ppl calling him, keeping him away from work if he tries to fix the engine ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) . bla bla, build your own exchange, but be sure i sue your ass off if it lags more then 0.0001 ! you knew what you did when you registered with bitcoin-24. if something is fishy its 100% your fault, this is not your protected little consumer world, this is the bitcoin universe. never invest money you cant afford to loose, never (real wordl, internet or anywhere). stay cool or stay away.
|
|
|
Seems like the next big pile of shit is gonna hit the fan in 20 minutes ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2F5JK38a0.jpg&t=663&c=0g0CEeWMTDaq7g) Edited names, domains and sums, but be sure they are on the original. Might edit few words tho. And there are attorneys and judges on stand-by duty this weekend... And btw, if someone will give Simon a call, look up his number at www.hotfrog.de/Firmen/Simon-Hausdorf-Webdesignyou are an a*****e
|
|
|
|