Bitcoin Forum
November 21, 2017, 06:24:07 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2] 3 »  All
  Print  
Author Topic: Automated Trading Platform - Any Interest?  (Read 3949 times)
zaj
Member
**
Offline Offline

Activity: 103



View Profile
September 14, 2012, 01:00:42 PM
 #21

still need someone?
1511288647
Hero Member
*
Offline Offline

Posts: 1511288647

View Profile Personal Message (Offline)

Ignore
1511288647
Reply with quote  #2

1511288647
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
isis
Full Member
***
Offline Offline

Activity: 154


View Profile
September 14, 2012, 01:18:41 PM
 #22

still need someone?

Ya sure, welcome aboard.

Interested in OpenPay?
https://github.com/openpay
Donate to show your appreciation and support the effort!

1LMDCSAwjhT2Vp1sSf62dybEYW3MYpsoZj

Pyramining Links - Help OpenPay and get a 10% bonus on your funds.
http://pyramining.com/referral/zre9ysgqt
http://pyramining.com/referral/ans9km72g
http://pyramining.com/referral/f3k4xebzp
http://pyramining.com/referral/nc3ag2sdb
zaj
Member
**
Offline Offline

Activity: 103



View Profile
September 14, 2012, 01:23:47 PM
 #23

my local currency is euro but i can still use gox usd. so how do i get started? Smiley
isis
Full Member
***
Offline Offline

Activity: 154


View Profile
September 14, 2012, 01:35:59 PM
 #24

my local currency is euro but i can still use gox usd. so how do i get started? Smiley

There are two ways.
You can wait a day or so and I'll have it localized, which honestly is the best option.

The second option is to open a USD wallet.  To do that, log into mtgox.  Go to settings.  Change the default currency to USD and check the box that says "create a new wallet in that currency", then hit save.  Next trade 1BTC or whatever into that currency so you have a balance.

Interested in OpenPay?
https://github.com/openpay
Donate to show your appreciation and support the effort!

1LMDCSAwjhT2Vp1sSf62dybEYW3MYpsoZj

Pyramining Links - Help OpenPay and get a 10% bonus on your funds.
http://pyramining.com/referral/zre9ysgqt
http://pyramining.com/referral/ans9km72g
http://pyramining.com/referral/f3k4xebzp
http://pyramining.com/referral/nc3ag2sdb
zaj
Member
**
Offline Offline

Activity: 103



View Profile
September 14, 2012, 01:48:53 PM
 #25

il wait a day then Smiley
HDSolar
Sr. Member
****
Offline Offline

Activity: 386



View Profile WWW
September 14, 2012, 02:34:01 PM
 #26

my local currency is euro but i can still use gox usd. so how do i get started? Smiley

There are two ways.
You can wait a day or so and I'll have it localized, which honestly is the best option.

The second option is to open a USD wallet.  To do that, log into mtgox.  Go to settings.  Change the default currency to USD and check the box that says "create a new wallet in that currency", then hit save.  Next trade 1BTC or whatever into that currency so you have a balance.

If your still looking or taking folks to work with this happy to help or get in line to help

Get paid to be social and visit HypeWizard today!  www.hypewiz.com
AR-15 80% at www.uspatriotarmory.com
my Cryptanalys.is profile
isis
Full Member
***
Offline Offline

Activity: 154


View Profile
September 14, 2012, 02:44:53 PM
 #27

So I realized that some trades were failing to execute because they were below the minimum tradeable amount.
This was triggering a flaw in the ordering logic which was the source of some of the more interesting notes in my logs.
I've now added both min and max currency amounts.

Quote
High: Ticker [timestamp=2012-09-14T12:37:52.430Z, last=USD 11.52338, bid=USD 11.52338, ask=USD 11.52572, tradableIdentifier=BTC, volume=2949494761223]
Low: Ticker [timestamp=2012-09-14T12:42:37.605Z, last=USD 11.43251, bid=USD 11.43351, ask=USD 11.5233, tradableIdentifier=BTC, volume=2944701489592]
Current: Ticker [timestamp=2012-09-14T13:30:05.568Z, last=USD 11.51, bid=USD 11.451, ask=USD 11.51, tradableIdentifier=BTC, volume=2959960727343]
VWAP: 11.51947
The market is trending down.


Sep 14, 2012 7:30:47 AM org.open.payment.alliance.isis.atp.TradingAgent evalBid
INFO: Attempting to buy 0.00000000 USD
Sep 14, 2012 7:30:47 AM org.open.payment.alliance.isis.atp.TradingAgent evalBid
INFO: 0.00000000 was less than the configured minimum of 0.01
Increasing order size to 0.01
Sep 14, 2012 7:30:47 AM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: You are in simulation mode, the transaction below did NOT actually occur.
Sep 14, 2012 7:30:47 AM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Successfully bought 0.01 at current market price.

So it looks like that part is resolved.  Now for the interesting part.

In my code the algorithm is using max only as a ceiling constraint and it's calculating how much to trade using your balance as the starting point.

When I ran my simulations on the hadoop cluster max was used in the same place in the algorithm as we're using the balance now.

Both situations will always produce a trade between 0 and Max.  The difference being, if you have a substantial balance you'll be trading Max much more often, where as the optimal algorithm identified by my simulations had Max being traded rarely if ever.

I'd like to test both and see which is more performant.  I have a hunch that this "mistake" is primarily why I'm seeing such high profit/loss.

I'll add an option to the setup interview to let you pick one or the other but I need you to pick, understand the risks and roll with it for the entire month.  Keep in mind that the difference is in how much is risked per trade, the decision on whether or not it's time to trade at all is a different step.

So let's walk through it a moment.

With the ATP, trading occurs in two steps.  

First is to determine "are market conditions favoring, buy, sell or hold right now?"
Second is to determine "how much do I trade right now?"

Market Conditions means all trades that have actually occurred in the last hour.

These are summed at each tick and a VWAP (Volume Weighted Average Price) (Each trade on the ticker multiplied by each trade's quantity.  Each is then summed and the sum is divided by the total volume)
 
3 indicators called arrows are generated as well, we have a trendArrow, bidArrow and askArrow.

Each arrow can be any one of positive, negative or 0.
If it's 0 that means the market is completely flat, so we have to wait.

If the trendArrow is positive it means that prices for bitcoins are going up relative to your local currency, thus we should look at selling some of ours off.  If the trendArrow is down, then it means prices are going down relative to your local currency and we should look at buying.

Once the trendArrow has been evaluated and we know the market is trading, we want to time our entry and exit into the market to maximize our profit.

We do that by comparing the last trade with the vwap.  

If the trendArrow is up, then we compare the last trade from the ticker with the vwap.  If it's above the vwap then we sell (at market prices).

If the trendArrow is down, then we compare the last trade from the ticker with the vwap.  If it's below the vwap then we buy (again at market prices).

The decision has now been set in stone, we are buying (or selling).  The only question now is how many BTC do we buy or sell?

Here are the two Bid algorithms in question, the Ask is the same algo, but instead of askArrow we use the bidArrow and instead of local currency we use BTC

I'll let you do your own math.

Trading Algorithm 1
Code:
BigDecimal weight = new BigDecimal((askArrow / ticker.size()) * (trendArrow / ticker.size()));
BigDecimal balance = AccountManager.getInstance().getBalance("USD").getAmount();
BigDecimal amountToSpend = balance.multiply(weight).multiply(fee);



Algorithm 2
Code:

BigDecimal weight = new BigDecimal((askArrow / ticker.size()) * (trendArrow / ticker.size()));
BigDecimal amountToSpend = maxLocal.multiply(weight).multiply(fee);




The askArrow (or bidArrow if we're selling), is calculated the same way as the trendArrow but uses the "ask" value from the ticker.
It's purpose is to let us know if people(or bots) placing limit orders are raising or lowering their prices.

Both of these values are multiplied together to give us a weight.

That weight is multiplied against (max or balance) and determines how MUCH we are trading.

That's it for now.  You now know enough (hopefully) to choose your trading algorithm. Let me know what you think!

Interested in OpenPay?
https://github.com/openpay
Donate to show your appreciation and support the effort!

1LMDCSAwjhT2Vp1sSf62dybEYW3MYpsoZj

Pyramining Links - Help OpenPay and get a 10% bonus on your funds.
http://pyramining.com/referral/zre9ysgqt
http://pyramining.com/referral/ans9km72g
http://pyramining.com/referral/f3k4xebzp
http://pyramining.com/referral/nc3ag2sdb
Gomeler
Hero Member
*****
Offline Offline

Activity: 698



View Profile
September 14, 2012, 03:16:16 PM
 #28

Not sure if you saw my PM last night. I'm interested in letting it go wild on my mtgox account.
isis
Full Member
***
Offline Offline

Activity: 154


View Profile
September 14, 2012, 03:43:10 PM
 #29

Not sure if you saw my PM last night. I'm interested in letting it go wild on my mtgox account.

My pm box is so flooded right now its going to tak a long time to go through it all.
Since we have 2 algorithims to test I may want to bring in 20.  Right now we are at 10 with 5 in reserve.

I will do some more math and let you know what I come up with.  Just not sure I can support 20 people right now.

Interested in OpenPay?
https://github.com/openpay
Donate to show your appreciation and support the effort!

1LMDCSAwjhT2Vp1sSf62dybEYW3MYpsoZj

Pyramining Links - Help OpenPay and get a 10% bonus on your funds.
http://pyramining.com/referral/zre9ysgqt
http://pyramining.com/referral/ans9km72g
http://pyramining.com/referral/f3k4xebzp
http://pyramining.com/referral/nc3ag2sdb
drekk
Member
**
Offline Offline

Activity: 70


Who shot who in the what now?


View Profile WWW
September 14, 2012, 06:23:01 PM
 #30

This looks really interesting. I'll keep an eye on you! Wink
I'm not on MtGox, so unfortunately I can't help testing the algorithms.


Keep it up!
drekk


☛ GPG Key / Fingerprint: CDFF 083A 3056 7DD8 B5B9  6687 726C AB05 D6AE 6148
☛ Overly attached BitMinter miner // 4pmlIE9idmlvdXMgdHJvbGwgaXMgb2J2aW91cy4g4pm
squid
Member
**
Offline Offline

Activity: 112


View Profile
September 14, 2012, 07:11:42 PM
 #31

This is interesting. I am in if a spot opens up for further testing.
isis
Full Member
***
Offline Offline

Activity: 154


View Profile
September 14, 2012, 07:15:31 PM
 #32

As of a couple minutes ago my bot crashed.  Evidently it tried to divide by zero during an Ask and I just didn't think to trap for it there.

Since it crashed I'm going to have to calculate my Profit & Loss by hand.

0.00000000BTC  &  51.2989USD

I started this with 2 BTC and 0 USD.
I sold 1 BTC for 10.92 USD

Thus my original 2 BTC were worth $21.84 at the time
Now if I had just held onto my 2 until now the strike price currently being $11.79, I would have had $23.58.

$23.58 - $21.84 = $1.74

$51.29 - $23.58 = $27.71

That's a 145% increase! (assuming I did the math correctly)  
Although now the algorithm has to wait for the market to come back down for me to keep in the game, or I have to find some way to fund my mtgox account with more money Wink







Interested in OpenPay?
https://github.com/openpay
Donate to show your appreciation and support the effort!

1LMDCSAwjhT2Vp1sSf62dybEYW3MYpsoZj

Pyramining Links - Help OpenPay and get a 10% bonus on your funds.
http://pyramining.com/referral/zre9ysgqt
http://pyramining.com/referral/ans9km72g
http://pyramining.com/referral/f3k4xebzp
http://pyramining.com/referral/nc3ag2sdb
zaj
Member
**
Offline Offline

Activity: 103



View Profile
September 14, 2012, 08:18:24 PM
 #33

does the volume matter for a trading bot? since the eu volume is in the single digits at times ... wouldnt it be better to trade on gox usd since its more active?
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1456



View Profile
September 14, 2012, 09:50:44 PM
 #34

I can test it if you'd like. With the money I lost to pirate I don't mind losing 100 BTC more testing your bot. 
Go big or go bust. Fuck it. lol

BCB
CTG
VIP
Legendary
*
Offline Offline

Activity: 1036


BCJ


View Profile
September 14, 2012, 10:12:14 PM
 #35

That's the attitude psy. Bitcoin (any) speculation is not for the faint of heart
isis
Full Member
***
Offline Offline

Activity: 154


View Profile
September 15, 2012, 12:44:55 AM
 #36

I can test it if you'd like. With the money I lost to pirate I don't mind losing 100 BTC more testing your bot. 
Go big or go bust. Fuck it. lol

Ya know it's both funny and sad.  I generated an address back when Pirate was considered at least somewhat legit. 
1M8nRjt4XGVrd7cnwn1V....

First mate anyone?
Wasn't a vanity thing, just sorta happened that way. I'm considering removing it from my wallet.

Back to the topic at hand though.  I've got one more show stopper to track down and then I'm posting jars.

Interested in OpenPay?
https://github.com/openpay
Donate to show your appreciation and support the effort!

1LMDCSAwjhT2Vp1sSf62dybEYW3MYpsoZj

Pyramining Links - Help OpenPay and get a 10% bonus on your funds.
http://pyramining.com/referral/zre9ysgqt
http://pyramining.com/referral/ans9km72g
http://pyramining.com/referral/f3k4xebzp
http://pyramining.com/referral/nc3ag2sdb
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1456



View Profile
September 15, 2012, 12:51:47 AM
 #37

I can test it if you'd like. With the money I lost to pirate I don't mind losing 100 BTC more testing your bot. 
Go big or go bust. Fuck it. lol

Ya know it's both funny and sad.  I generated an address back when Pirate was considered at least somewhat legit. 
1M8nRjt4XGVrd7cnwn1V....

First mate anyone?
Wasn't a vanity thing, just sorta happened that way. I'm considering removing it from my wallet.

Back to the topic at hand though.  I've got one more show stopper to track down and then I'm posting jars.


OK.  Pm me the bot with instructions to set it up if they're needed and I'll let it burn 100 BTC.  Let's hope not lol

isis
Full Member
***
Offline Offline

Activity: 154


View Profile
September 15, 2012, 12:59:14 AM
 #38

I've decided that I don't have the time or resources to commercialize it.
I need to get back to openpay as soon as possible and this bot is turning into a huge time sink.

I don't want to dink around with licensing enforcement, drm and other bs, so I'm going to gpl it and put it up on github.  If it makes you some money please consider donating something to openpay because I'm between contracts right now and really want to see that come to life before I go back to fulltime work
.

Interested in OpenPay?
https://github.com/openpay
Donate to show your appreciation and support the effort!

1LMDCSAwjhT2Vp1sSf62dybEYW3MYpsoZj

Pyramining Links - Help OpenPay and get a 10% bonus on your funds.
http://pyramining.com/referral/zre9ysgqt
http://pyramining.com/referral/ans9km72g
http://pyramining.com/referral/f3k4xebzp
http://pyramining.com/referral/nc3ag2sdb
squid
Member
**
Offline Offline

Activity: 112


View Profile
September 15, 2012, 01:18:48 AM
 #39

I've decided that I don't have the time or resources to commercialize it.
I need to get back to openpay as soon as possible and this bot is turning into a huge time sink.

I don't want to dink around with licensing enforcement, drm and other bs, so I'm going to gpl it and put it up on github.  If it makes you some money please consider donating something to openpay because I'm between contracts right now and really want to see that come to life before I go back to fulltime work
.

You sir are a gentleman and a scholar. Also, it will be fun hacking this thing apart! Cheesy
isis
Full Member
***
Offline Offline

Activity: 154


View Profile
September 15, 2012, 11:18:22 PM
 #40

It's up!
https://github.com/openpay/OpenPay/blob/master/Isis-ATP/bin/isis.jar
If someone would please compile a 32 bit version and get it to me I'll put that one up too.

Please consider donating if you find this application useful especially if it makes you a profit Wink
USE AT YOUR OWN RISK!

DO NOT USE THIS TO TRADE MONEY YOU CANNOT AFFORD TO LOSE!
ALSO THE STOP LOSS FUNCTION HAS BEEN REMOVED UNTIL FURTHER NOTICE, SO BE CAREFUL.

I'll be creating a new thread with information on configuration, setup etc.

Interested in OpenPay?
https://github.com/openpay
Donate to show your appreciation and support the effort!

1LMDCSAwjhT2Vp1sSf62dybEYW3MYpsoZj

Pyramining Links - Help OpenPay and get a 10% bonus on your funds.
http://pyramining.com/referral/zre9ysgqt
http://pyramining.com/referral/ans9km72g
http://pyramining.com/referral/f3k4xebzp
http://pyramining.com/referral/nc3ag2sdb
Pages: « 1 [2] 3 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!