Aido's build did not deadlock on me, but did fail when my connection dropped.
hhmmmmmm, interesting. I hadn't pushed the fix for the deadlock issue to github while I was testing it. Maybe a rogue 'fixed' jar sneaked into an earlier commit. Anyway, I have now pushed the latest and greatest version to github so feel free to test and comment.
https://github.com/aido/IsisATP.gitErrr, I can't seem to import this project into Eclipse. Could you give a rough outline of what it would take?
I don't use Eclipse. Did I mention that I'm not a developer?
I tend to do things the hard way and use a plain old text editor and command line to build. It seems I like to make life more difficult for myself. However, it does give me a bit more flexibility and I know what's going on under the hood so to speak. That is why I created the
build_IsisATP.sh Bash file.
If I were to install Eclipse I fear it may give me delusions of coding competence.
Eclipse config files (a
.settings directory and
.project and
pom.xml files) may have gotten lost when I cloned Isis and reorganised or deleted some files.
I have now added manually edited
.project and
pom.xml files and
will push have pushed them to github
as soon as I finish typing this post. The main difference in the
pom.xml file from the Isis original is the dependency change from XChange 1.1.0 to 1.2.0.
Hopefully these files will work when importing to Eclipse.
About the latest version. While testing it I noticed that the arbitrage functionality sold all the
from currency for
BTC then sold ALL the
BTC for the
to currency. Resulting in 0
from currency balance, 0
BTC balance and everything in
to currency. I don't like this. I tried to tweak the algorithm, but with little success. What I think would be better is to just sell the
from currency and buy the equivalent amount in
to currency. (I hope my explanation makes sense!). I tried this but the result was still the same; ALL
BTC dumped into
to currency.
So, suggestions on how to fix the arbitrage algorithm are most welcome. You can see what I was trying to do by looking at the following code in
ArbitrageEngine.java in the latest commit:
BigMoney balance = AccountManager.getInstance().getBalance(fromCur);
// Following calculation sells fromCur balance and dumps ALL BTC into toCur resulting in 0 fromCur and 0 BTC
// BigMoney qty = balance.multipliedBy(AccountManager.getInstance().getLastTick(fromCur).getAsk().getAmount());
// Following calculation sells fromCur balance and buys equivalent amount of toCur resulting in 0 fromCur and leaving pre-existing BTC balance
BigMoney qty = balance.multipliedBy(AccountManager.getInstance().getLastTick(toCur).getBid().getAmount()).dividedBy(AccountManager.getInstance().getLastTick(fromCur).getAsk().getAmount(),RoundingMode.HALF_EVEN);
I also plan to add a command line argument to enable/disable arbitrage. Something like
--arbitrage=true or
--arbitrage=falseAfter that then maybe cleaning up the log output to prettify everything.
Now, before people start testing the lastest version I pushed to github, I feel the need to re-iterate I am not a java developer and I accept no responsibilty if any of the changes I made to IsisATP causes you to lose your entire balance. Test with small amounts and
USE AT YOUR OWN RISK!!!