Askit2
|
|
June 19, 2013, 10:23:58 PM |
|
Actually its a bit impressive. Buys and sells add up to 15 BTC. I only ever had .41BTC. I lost .05 BTC leaving me at a loss of .33 repeating % or 0.0033 repeating. MTGoX charges .6% so I lost less then the fee. At least if I look at it as a loss per BTC transacted.
|
|
|
|
Aido (OP)
Sr. Member
Offline
Activity: 248
Merit: 250
1. Collect underpants 2. ? 3. Profit
|
|
June 20, 2013, 12:21:47 AM Last edit: June 20, 2013, 01:11:17 AM by Aido |
|
New commit available in the develop branch: commit 3d17d46dc146cf4aa63ee7ecc3d9a1ce15f876ba
Rough draft of new arbitrage classThis is a very rough and ready draft of the arbitrage code for testing purposes only. I'm not even sure if its going to work. It is in no way ready for the big time yet so please review code and provide feedback. As part of testing, please check if the arbitrage engine is identifying the correct opportunities if there were no fees involved. Ignore the double reporting of the opportunity, I'll fix that somehow. 2013-06-20 11:08:17,258 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - MtGox Arbitrage profit after fee: 99.988 2013-06-20 11:08:17,259 : INFO org.aido.atp.ArbitrageEngine [Thread-20] - Arbitrage Engine has detected an after fee profit opportunity of 9,998.8% on currency pair USD/GBP on MtGox 2013-06-20 11:08:17,260 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - Last ticker Ask price was USD 108.49000 2013-06-20 11:08:17,260 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - BTC/USD is 0.0092174393953360 2013-06-20 11:08:17,261 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - Last ticker Bid price was GBP 68.11000 2013-06-20 11:08:17,261 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - BTC/GBP is 0.0146821318455440 2013-06-20 11:08:17,624 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - MtGox Arbitrage profit after fee: 99.988 2013-06-20 11:08:17,625 : INFO org.aido.atp.ArbitrageEngine [Thread-20] - Arbitrage Engine has detected an after fee profit opportunity of 9,998.8% on currency pair GBP/USD on MtGox 2013-06-20 11:08:17,626 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - Last ticker Ask price was GBP 69.19803 2013-06-20 11:08:17,627 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - BTC/GBP is 0.0144512784540254 2013-06-20 11:08:17,628 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - Last ticker Bid price was USD 107.82735 2013-06-20 11:08:17,628 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - BTC/USD is 0.0092740849144489 2013-06-20 11:08:17,953 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - MtGox Arbitrage buy order is buy BTC 570.8051138161016 for GBP 40000.00000000 2013-06-20 11:08:17,953 : DEBUG org.aido.atp.ArbitrageEngine [Thread-20] - MtGox Arbitrage sell order is sell BTC 570.8051138161016923387558865479373640 for USD 62329.72239238622858760 2013-06-20 11:08:17,955 : INFO org.aido.atp.ArbitrageEngine [Thread-20] - Arbitrage sold GBP 40000.00000000 for BTC 580.00000000 on MtGox 2013-06-20 11:08:17,956 : INFO org.aido.atp.ArbitrageEngine [Thread-20] - Arbitrage bought USD 62333.00000000 for BTC 580.00000000 on MtGox 2013-06-20 11:08:17,957 : INFO org.aido.atp.ArbitrageEngine [Thread-20] - Arbitrage successfully traded GBP 40000.00000 for USD 62329.72239238622858760 on MtGox Although it's reporting the opportunity twice it still just triggers one trade pair i.e. sell the 'from' currency and buy the 'to' currency. By the way, arbitrage is still intraexchange not interexchange
|
Interesting Bash command line, try it : bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
|
|
|
Aido (OP)
Sr. Member
Offline
Activity: 248
Merit: 250
1. Collect underpants 2. ? 3. Profit
|
|
June 20, 2013, 12:34:46 AM |
|
|
Interesting Bash command line, try it : bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
|
|
|
dwolfman
|
|
June 20, 2013, 02:00:46 AM |
|
Yeah, I also noticed that user is posting a lot of posts like that. Seems to be going through and hitting another thread every few seconds. Doesn't make sense to me either.
|
Wanna send coins my way? 1BY2rZduB9j8Exa4158QXPFJoJ2NWU1NGf or just scan the QR code in my avatar. :-)
|
|
|
Nova!
|
|
June 20, 2013, 07:13:17 AM |
|
Arbitrage Engine has detected an after fee profit opportunity of 9,998.8% on currency pair
You need to flip the direction of that calculation. It's actually found a 9% loss in that direction. Looking at the numbers I would say if you flip the calculation around (and fix the numberformat to report it properly. You'll find a about a 9% opportunity in either USD/GBP or GBP/USD frankly I'm not sure which. 10,000% profit should be something we check for in an automated regression test though.
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
Ianwhitbread
Member
Offline
Activity: 101
Merit: 10
|
|
June 20, 2013, 07:40:46 AM |
|
thanks Aido if you want to flip it then I will run( sim Mode ) it for 24 hours and post back the results
thank you
|
|
|
|
Aido (OP)
Sr. Member
Offline
Activity: 248
Merit: 250
1. Collect underpants 2. ? 3. Profit
|
|
June 20, 2013, 08:00:45 AM |
|
OK, I'll flip it on the next release. Schoolboy error but I keep mixing that up.
Don't worry too much about the profit %. I haven't done the calculation for that yet and had hardcoded a very high number to ensure it outputs something even when there is a very small actual profit.
Thanks for the feedback.
|
Interesting Bash command line, try it : bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
|
|
|
Nova!
|
|
June 20, 2013, 03:14:48 PM |
|
Not positive here, but have your checked this to ensure the code is not re-entrant? It seems like it could attempt a trade while another is in progress. This could cause interesting and unexpected behavior.
Good job though, the code looks really good overall.
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
Aido (OP)
Sr. Member
Offline
Activity: 248
Merit: 250
1. Collect underpants 2. ? 3. Profit
|
|
June 20, 2013, 04:27:24 PM |
|
Good point, I think you mentioned previously that the arbitrage manager is not blocking trend trades properly. I'll look into it.
I will also make sure it blocks any other arbitrage trades that may be triggered in another thread. Although this is highly unlikely using the current polling method but it could possibly happen if we use a streaming ticker and we get two ticks in quick succession.
|
Interesting Bash command line, try it : bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
|
|
|
daybyter
Legendary
Offline
Activity: 965
Merit: 1000
|
|
June 20, 2013, 04:33:23 PM |
|
That's why I use a single OrderBook in my code to send orders to exchanges.
|
|
|
|
Nova!
|
|
June 21, 2013, 01:37:20 AM |
|
Java 6 was EOL'd today. Guess we should move the build target to JDK7.
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
Aido (OP)
Sr. Member
Offline
Activity: 248
Merit: 250
1. Collect underpants 2. ? 3. Profit
|
|
June 21, 2013, 07:51:43 AM |
|
Is already Java 7 for AidoATP.
New commit in develop branch btw which cleans up the trade locking mechanism.
Still trying to fix up the Arbitrage code.
|
Interesting Bash command line, try it : bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
|
|
|
Nova!
|
|
June 21, 2013, 09:44:18 AM |
|
Is already Java 7 for AidoATP.
New commit in develop branch btw which cleans up the trade locking mechanism.
Still trying to fix up the Arbitrage code.
I'm excited to see the changes you're making. For a first time Java dev you've got some serious skill. ATPx hasn't seen a commit yet because I'm having trouble testing it out. My MtGox account is empty and BTC-e is too low to trade with. That will likely remain the case until July. However I'm about 80% code complete on it now. 40% if you figure that I'm going to tie in the scripting engine to the intimate parts of the system Still I think the module based approach is better in the long haul for what we're trying to accomplish. Also I'm adding AES encryption to the values stored in preferences API, so that all prefs are stored encrypted. It's a simple enough change you should look at backporting it into AidoATP once it's committed, it adds a nice strong layer of security.
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
Nova!
|
|
June 21, 2013, 12:07:56 PM |
|
I have an implementation of the MtGox streaming sockets API working. I used the weberknecht websocket client and then exposed it's internals to the Java scripting engine. It still needs some work, but I've been able to successfully stream the mtgox ticker as a proof of concept. --open --received message: {"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","channel_name":"depth.BTCUSD","op":"private","origin":"broadcast","private":"depth","depth":{"price":"109.77799","type":1,"type_str":"ask","volume":"0.6571238","price_int":"10977799","volume_int":"65712380","item":"BTC","currency":"USD","now":"1371815700524398","total_volume_int":"65712380"}} --received message: {"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","channel_name":"depth.BTCUSD","op":"private","origin":"broadcast","private":"depth","depth":{"price":"107.58376","type":2,"type_str":"bid","volume":"0.19365289","price_int":"10758376","volume_int":"19365289","item":"BTC","currency":"USD","now":"1371815700722156","total_volume_int":"19365289"}}
At least though, there is no reason to rely on Xchange API
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
Ianwhitbread
Member
Offline
Activity: 101
Merit: 10
|
|
June 21, 2013, 02:21:39 PM |
|
That will make a lot of people happy
Nice to see activity with the atp and atpx
Thank you for keeping us informed
And yes it's pretty amazing what aido is doing!
Well both of you!
Talk soon
|
|
|
|
Aido (OP)
Sr. Member
Offline
Activity: 248
Merit: 250
1. Collect underpants 2. ? 3. Profit
|
|
June 21, 2013, 03:48:36 PM |
|
For a first time Java dev you've got some serious skill.
Thank you. The 'skill' is 99.9% perspiration. Also I'm adding AES encryption to the values stored in preferences API, so that all prefs are stored encrypted. It's a simple enough change you should look at backporting it into AidoATP once it's committed, it adds a nice strong layer of security.
Excellent, it's been on the AidoATP TODO list for a while.
|
Interesting Bash command line, try it : bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
|
|
|
Ianwhitbread
Member
Offline
Activity: 101
Merit: 10
|
|
June 23, 2013, 07:51:46 PM |
|
Mtgox is down again crashed the ATP
can see from the debug that they are now using cloud flare
still does not help us and that fact you can not even do manual trades
looking at the charts I can see China is still moving so is russia
but USD and GBP have not moved for an hour
not one single order
|
|
|
|
Ianwhitbread
Member
Offline
Activity: 101
Merit: 10
|
|
June 23, 2013, 08:02:03 PM |
|
Joined Quantopian Today
Cloned a BitCoin ticker with vwap
Just got to figure out how to add ads to it now
And wait for the ta-lib support
Quite excited to back testing algos
Just got to figure out how to write python code
|
|
|
|
Askit2
|
|
June 24, 2013, 08:59:58 PM |
|
Hey Aido, How do the moving averages get the long average? I have a setting for Short M A tick. I don't see a setting to adjust the long average.
Either way setting Min tick up to 55 with 60M max and 30s poll time has been acting much better. At least it doesn't trade after ticker drop until the length gets long enough.
|
|
|
|
Aido (OP)
Sr. Member
Offline
Activity: 248
Merit: 250
1. Collect underpants 2. ? 3. Profit
|
|
June 24, 2013, 11:52:08 PM |
|
Looking at the code: Integer shortMASize = Integer.valueOf(Application.getInstance().getConfig("ShortMATickSize")); . . . shortSMA = sumShortSMA.dividedBy(Long.valueOf(shortMASize),RoundingMode.HALF_EVEN); longSMA = sumLongSMA.dividedBy(Long.valueOf(tickerSize),RoundingMode.HALF_EVEN); So, short SMA uses the 'ShortMATickSize' value from the config file. Long SMA uses the entire ticker size i.e. derived from MaxTickAge, the maximum ticker age in minutes.
|
Interesting Bash command line, try it : bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
|
|
|
|