Pages:
Author

Topic: ncurses based MtGox live monitor and trading-bot-framework - page 7. (Read 33853 times)

member
Activity: 105
Merit: 10
Sometimes I'm not pragmatic Grin

Do you know how to load list of strategies ?

Do you plan to add notifier (email or push) in your code base ?

Thanks a lot
hero member
Activity: 938
Merit: 500
https://youengine.io/
(if you want that trailing stop strategy will be able to send notifications you must ensure that
email_notifier strategy or pushover_notifier was load)

A simple pragmatic solution: Any notifyer strategy could connect a slot to gox.signal_debug, it could look like this:
Code:
import strategy
import whatever_message_api

RECEIVER = "[email protected]"

class Strategy(strategy.Strategy):
    def __init__(self, gox):
        strategy.Strategy.__init__(self, gox)
        gox.signal_debug.connect(self.slot_debug)

    def slot_debug(self, sender, (msg)):
        if "NOTIFY" in msg:
            whatever_message_api.sendmsg(RECEIVER, msg)
       

and every other strategy that wants to send an important message would then simply do something like this:
Code:
       self.debug("NOTIFY", "foo bar %f happened at %f" % (bla, blub))

The string "NOTIFY" would then be established as some kind of convention, it wouldn't do any harm if no notifier is present (it would just go to the log file like all other messages too) and if an older strategy does not send messages containing "NOTIFY" or notifications for more events are desired then the notification strategy could optionally do some more advanced filtering of debug messages.
member
Activity: 105
Merit: 10
I like this idea...
but a strategy like trailing stop should also have access to other strategies (such as notifiers)

object programming using python is permissive so it shouldn't be a problem

but you will have to use a kind of "dependency graph" between strategies

(if you want that trailing stop strategy will be able to send notifications you must ensure that
email_notifier strategy or pushover_notifier was load)
hero member
Activity: 938
Merit: 500
https://youengine.io/
It will be nice to also add email notifications (and/or push notifications) when trading

Functionality like this could be wrapped into separate strategy modules. Also another strategy module could be made whose only purpose is to load a list of other strategies so that you could for example run the email notifier strategy in parallel with for example a trailing stop strategy.
member
Activity: 105
Merit: 10
It will be nice to also add email notifications (and/or push notifications) when trading

If you are looking for email notifier
I did a Python class for that purpose
https://code.google.com/p/working4arbitrage/source/browse/trunk/src/email_notifier.py

If you are looking for push notifier I found a very useful web service called PushOver
I also did a Python class for that purpose
https://code.google.com/p/working4arbitrage/source/browse/trunk/src/pushover_notifier.py
member
Activity: 65
Merit: 10
Well, shellinabox does not close sessions on browser closes. Had 9.99 load and few hundred goxtools trying to run. I have setup a script to kill processes that continue after a session is lost. Hopefully fixes the problem.

I am adding more GUI elements, options (currency/graph type, etc), personal modifications. prof7bit, are you currently working on any additions?
legendary
Activity: 1792
Merit: 1008
/dev/null
np. I threw in shellinabox too for HTTP display. Though it doesn't respond as well as a real terminal.
http://gox.ruststorm.com/
even more awesome Cheesy
i will use this too!
This is the true power of the unix philosopy "one job one tool", you can just plug a few small existing tools together without needing to change or adapt any them and instantly create something totally new :-)
thats why i love linux (not unix, unix has been a mess too often Tongue) myself so much Smiley
its like LEGO, you build your tools/program and can wrap em with whatever u want!
hero member
Activity: 938
Merit: 500
https://youengine.io/
np. I threw in shellinabox too for HTTP display. Though it doesn't respond as well as a real terminal.
http://gox.ruststorm.com/
even more awesome Cheesy
i will use this too!
This is the true power of the unix philosopy "one job one tool", you can just plug a few small existing tools together without needing to change or adapt any them and instantly create something totally new :-)
legendary
Activity: 1792
Merit: 1008
/dev/null
np. I threw in shellinabox too for HTTP display. Though it doesn't respond as well as a real terminal.
http://gox.ruststorm.com/
even more awesome Cheesy
i will use this too!
hero member
Activity: 560
Merit: 500
I am the one who knocks
np. I threw in shellinabox too for HTTP display. Though it doesn't respond as well as a real terminal.
http://gox.ruststorm.com/

wow, this is a funny idea! I think I should add a configuration option for (or automatic detection of) black&white terminals too to make this look even better :-)
On that note... When connecting to my screen instance from my ipad it isn't immediately clear what the last price was because f no title bar.  Would you be willing to accept a pull request to add this by account balance?
member
Activity: 105
Merit: 10
Thanks prof7bit for your hard work.
I ever see you on a FX forum (sorry I don't remember which one)

It will be very nice if you could add features such as:
- stop loss (sell stop)
- trailing stop
- stepping stop

You should also add support of Python Pandas library
http://pandas.pydata.org/
because some technical analysis indicators have been ported to this lib
https://code.google.com/p/ultra-finance/wiki/pyTaLib

of course making this software available to other markets (Bitcoin-central for
example) will be great !

Kind regards
hero member
Activity: 938
Merit: 500
https://youengine.io/
np. I threw in shellinabox too for HTTP display. Though it doesn't respond as well as a real terminal.
http://gox.ruststorm.com/

wow, this is a funny idea! I think I should add a configuration option for (or automatic detection of) black&white terminals too to make this look even better :-)
member
Activity: 65
Merit: 10
Interesting idea...

Just tested it out and looks cool.  Wish I knew how to script to have it load goxtool and exit the ssh session as you did...

I just setup the script as the user shell.
Add the script location to the shells(/etc/shells), change the user's shell with chsh username, then when prompted, enter the location of goxtool.py(same as what u added in shells). (Debian env here, RH may be little different)

Love this. Plan to do my own custom changes.

Also setup a server for public to check out the script/watch gox. Basically just another ticker; but useful for some people depending on internet restrictions.

gox.ruststorm.com:22
user:goxtool
pass:password
thanks, now i can tell all the win kids they can use goxtool too with putty Tongue
np. I threw in shellinabox too for HTTP display. Though it doesn't respond as well as a real terminal.
http://gox.ruststorm.com/
legendary
Activity: 1792
Merit: 1008
/dev/null
Love this. Plan to do my own custom changes.

Also setup a server for public to check out the script/watch gox. Basically just another ticker; but useful for some people depending on internet restrictions.

gox.ruststorm.com:22
user:goxtool
pass:password
thanks, now i can tell all the win kids they can use goxtool too with putty Tongue
legendary
Activity: 1666
Merit: 1000
Interesting idea...

Just tested it out and looks cool.  Wish I knew how to script to have it load goxtool and exit the ssh session as you did...
member
Activity: 65
Merit: 10
Love this. Plan to do my own custom changes.

Also setup a server for public to check out the script/watch gox. Basically just another ticker; but useful for some people depending on internet restrictions.

gox.ruststorm.com:22
user:goxtool
pass:password
hero member
Activity: 938
Merit: 500
https://youengine.io/
Maybe we could make a separate forum thread where people post their bots and discuss them.
That's a good idea.
I have made a new thread for the _balancer.py now, maybe a separate thread for every separate bot is even better: https://bitcointalksearch.org/topic/goxtool-bot-portfolio-rebalancing-181584
hero member
Activity: 938
Merit: 500
https://youengine.io/
Okay, here are a couple questions,
Q1. Are you interested in bug reports at your github?

yes. I just cannot promise that I will include every new feature but even then its easy on github to maintain a modified fork (there are a few already) and still exchange patches with each other that are important.

Do you think it would be easier to write a new program for testing that imports some strategy.py, or add testing functionality to goxtool?

Not 100% sure. A full blown simulator could load the strategy and implement the same interface and emit the same signals as Gox() does, it could run as multiple processes (maybe even on multiple machines) to test different parameters of the same strategy in parallel, maybe its really a good idea to make such a thiing a completely separate application and not complicate the goxapi too much, since only few people will use it.
newbie
Activity: 56
Merit: 0
Okay, here are a couple questions,
Q1. Are you interested in bug reports at your github?
Q2. Do you mind contributions from others?
Q2. a. Even from individuals who are obviously less capable programmers than yourself? It might require some patience on your part, especially in the beginning.
Q3. I might want to add some features that some may think is really goofy (like play sounds when trades execute),

let's say I make some changes to stragegy.py, and I want to test them. We can consider several testing strategies
  • Test on historical data from mtgox.
    • interesting since goxtool grabs this data when it connects, and because this data is real, and relevant to current mkt conditions
    • bad because it's not a controlled test, and therefore difficult to compare strategies
    • dangerous since we're connected to a live account. Maybe we should make for ourselves different API access for testing vs trading
  • Test on fake data we make ourselves. This could be:
    • Old data we've saved
    • Data collected from other exchanges
    • Fake sample data sets.

There is also various levels of diligence to consider,
  • simply iterate over the data?
  • iterate, and try to account for realistic mkt timings, liquidity, etc.

Do you think it would be easier to write a new program for testing that imports some strategy.py, or add testing functionality to goxtool?
Is that a feature that you might be personally interested in, or would consider adding to the codebase?
hero member
Activity: 938
Merit: 500
https://youengine.io/
Correct me if I am wrong but Mtgox charges a 0.6% fee per trade so it makes little difference whether you make large* or small ones. But, as you say, you do need to ensure that you make approximately >(0.6*2)% profit on trades or you will simply be slowly giving away your account to Mtgox in the form of fees.

* Large being relative here.

Yes, its the price difference between buy and sell, not the trade volume that matters. 2 * 0.6% fee translates into a minimum price difference of 1.2% between buy and sell price to reach the profit zone, if you buy at 100 you need to sell above 101.2 to become profitable, so the samller the distance, the larger (relative) the part that goes to mtgox on every trade.
Pages:
Jump to: