Hi! I thought about a way to describe trading strategies in a well-defined language. Still working on the concept, but here is a simple example, what it could look like: rule "Compare btc-e sma" when ( BTCe.btc<=>usd.ticker.buy * 110% > BTCe.btc<=>usd.sma(6h) ) && ( BTCe.btc.balance() > 1.0 ) then BTCe.btc<=>usd.sell( BTCe.btc.balance() - 1.0) end
The overall structure is taken from drools (that's what I want to translate it to). Most of these expressions follow the scheme <tradesite>.<currency pair>.<method> or <tradesite>.<currency>.<method> which is quite easy to parse because the '<=>' indicates a currency pair in my app. laSeek already contributed the first construct, namely the '%' suffix. Times are always handled as microseconds here, which gives you sometimes numbers, that are not very convenient to read. So I wanted to use suffixes, like 's', 'm' and 'h' (maybe even 'd' for days) to make the numbers more readable. So 1s just translates to 1000000 here. This structure would be simple enough to translate it automatically, which is important to me. My idea so far was to write an Antlr grammar to parse the language, because it has a non.restrictive license and everyone could add his own productions. Is there any interested in such a definition? People willing to collaborate to create one? Ciao, Andreas
|
|
|
Dann musst Du noch aufpassen wegen CE-Zeichen. Auch da gab es in letzten Monaten ne Menge Stress mit Elektronik-Sachen.
|
|
|
It really seems, these 2 project complement each other in some ways. I don't have a good trading code yet, but a gui and a trade site interface to connect to trade sites without any external services.
|
|
|
In other news, I think it might be a good idea to actually set up a forum for serious development talks and discussion instead of using this single thread. I have the resources to set one up right now.
Would non-isis users be allowed to join such a forum? I'm interested in a working trade algo, too.
|
|
|
Yeah, I implemented this more or less the same way in my ChartAnalyzer class. But I meant the actual trading algo. I'm working with rule sets at moment to separate the trading code from the actual trade app. Would be cool to end up with a domain specific language to describe the actual trading.
|
|
|
I wonder, if there's a way to describe a trading strategy in a system independent, more descriptive, way...
|
|
|
Take a look at the btc-e.com website. I like their GUI a lot, so I tried to copy it in my app:
|
|
|
Ich bastle an einem Java API für exchanges. Ist aber vermutlich nicht genau, was Du suchst...
|
|
|
I once started a data model for an ltc exchange, but it seems there's not much interested in such an exchange...
|
|
|
@rabbit: it seems, noone is using bitparking or vircurex? Maybe users are content with btc-e alone?
|
|
|
Hi! You code is only stored local, you haven't used github or anything like that?
As you stated, 100 plus classes would take me a long time to understand. And as a java novice I may not ever understand it. I think I'll concentrate on understanding how IsisATP does its thing first before biting off more than I can chew.
Since I'm the only developer, I don't use svn or git yet. Just drop me a PM, if you want to check the sources, and I'll upload it on one of my servers and give you temporary URL to download it. But, as I said, it's quite rough yet and work in progress. I'm still struggling with some method to get the automatic trading going, so I guess I'm behind the Isis-project. Ciao, Andreas
|
|
|
I was told, that it's 'technical trading'. But I don't speak english, so I just accepted the term. Btw: sorry for my late reply on your query for my sources, but I just overlooked that line in your response. Or did you edit it? As I said: I can give you the sources, but it's > 100 classes and with the required jars an 8.8 MB zip file. And it's far from being complete. I'm still working on the trading interface and only the gox and btc-e implementation are halfway complete.
|
|
|
Care to share?
I can show you my sources, but I guess it'll take you too much time to study them?
|
|
|
A graph would be nice, but the site just lacks the trades....my app would draw a graph, if there were data to use...
|
|
|
That's good and necessary.... I use factor 100000000 for the price and the amount. However, if you start calculating with those amount and do (amount * price) / 100000000 you have a problem with longs. I use an ugly hack and cast temporarily to double, but I guess I'll use some BigDecimal-like format in the future. Just a lot of places, where I have to modify my code...
|
|
|
I use log4j in my app. It should fill your requirements.
|
|
|
|