Bitcoin Forum
November 01, 2024, 04:57:44 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 »
  Print  
Author Topic: Gekko - a javascript trading bot and backtesting platform  (Read 147872 times)
Thom
Member
**
Offline Offline

Activity: 112
Merit: 10


Be kind man, don't be mankind


View Profile WWW
January 27, 2014, 03:54:57 PM
Last edit: January 27, 2014, 04:13:09 PM by Thom
 #361

I'm not sure, but does Gekko simulation take transaction fees into account? That might be the reason for your discrepancy. I also find it surprising you trade succesfully at cex. I thought that market only had one direction... down...

No tx fees @ cex. It's an overall downslope trend there fersure as GHS gets cheaper outside of cex, but there are enough ups in their graph to make it worthwhile for gekko. Any motion, up or down, is technically a gain with a bot watching things. Plus the mining.

http://bitcoinwisdom.com/markets/cexio/ghsbtc

mmm, ups and downs.

Edit: in fact gekko is doing well on cex to the point where it's now visible in my cex hashing speed graph.
(each blip is an hour's average, so the low peaks don't mean losses, just mucho activity. The high peaks are the important bit.)


It's short for Thomassina ⚥ • BTC veteran, Bitcointalk neophyte • BTC1THoM4cn8hHTyE637DEPMCLcerZe1mL1X • Cex.IO Cloud Mining - don't risk preorders, mine & trade now!
༺ ☤ Curecoin - Fold Proteins, Earn Coins! ☤   CURE: B8cjEuGKH3qofsxGGEVYdTwUrpfCTxQP7u ༻
San1ty
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


View Profile
January 27, 2014, 04:10:19 PM
 #362

Looks nice indeed! Interesting!

Found my posts helpful? Consider buying me a beer :-)!:
BTC - 1San1tyUGhfWRNPYBF4b6Vaurq5SjFYWk NXT - 17063113680221230777
whydifficult (OP)
Sr. Member
****
Offline Offline

Activity: 287
Merit: 250



View Profile WWW
January 27, 2014, 04:20:17 PM
 #363

I'm not sure, but does Gekko simulation take transaction fees into account? That might be the reason for your discrepancy. I also find it surprising you trade succesfully at cex. I thought that market only had one direction... down...

Yes, Gekko also takes fees into account. Though CEX.io doesn't have any trading fees. The different either comes from a calculation bug (I'm skeptical about this) or fees + slippage.

Currently the simulator assumes it's able to buy/sell at current market price (which is last trade price, does not look at the book) - fees - slippage. If the spread is large and the trade was on the other side of the book this is far removed from reality if slippage is not set accordingly (don't trust the defaults as this is way to market specific). The reason it doesn't look at the book now is because the system is agnostic to any live market: if you feed it a stream of trades it is able to simulate new trades according to the configured trading method. Eg. this also works for backtesting as is. I want to move to a system where we also save a historical ticker data.

Note that only having ticker data does not prevent not being accurately able to calculate slippage, just the part up to the spread (difference between last price and best ask in case of long), but if you are a whale slippage will eat in your profits hard after the top ask (which is the only information the ticker provides).

Gekko a nodejs bitcoin trading bot!
Realtime Bitcoin Globe - visualizing all transactions and blocks
Tip jar (BTC): 1KyQdQ9ctjCrGjGRCWSBhPKcj5omy4gv5S
Thom
Member
**
Offline Offline

Activity: 112
Merit: 10


Be kind man, don't be mankind


View Profile WWW
January 27, 2014, 04:32:03 PM
 #364

if you are a whale slippage will eat in your profits hard after the top ask

It's not hard to be a semi-whale at cex, because when it flatlines, it reeeeeally flatlines, and you can see your own trades shunt the candles with well under 1BTC.

Also hey @whydifficult I was figlet-ing some big ASCII text for something unrelated and I thought maybe you'd like a splashier splashscreen?

Code:
.d888888 .d8888b. 88  .dP 88  .dP .d8888b.
88'  '88 88ooood8 88888"  88888"  88'  '88
'8888P88 '8boood' 88  '8b.88  '8b.'88888P'
     .88
 d8888P   I'm gonna make you rich, Bud Fox.

It's short for Thomassina ⚥ • BTC veteran, Bitcointalk neophyte • BTC1THoM4cn8hHTyE637DEPMCLcerZe1mL1X • Cex.IO Cloud Mining - don't risk preorders, mine & trade now!
༺ ☤ Curecoin - Fold Proteins, Earn Coins! ☤   CURE: B8cjEuGKH3qofsxGGEVYdTwUrpfCTxQP7u ༻
San1ty
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


View Profile
January 27, 2014, 05:01:15 PM
 #365

I love that splash screen!

Found my posts helpful? Consider buying me a beer :-)!:
BTC - 1San1tyUGhfWRNPYBF4b6Vaurq5SjFYWk NXT - 17063113680221230777
tkon3
Hero Member
*****
Offline Offline

Activity: 824
Merit: 1000



View Profile
January 27, 2014, 06:26:54 PM
 #366

Hi
I recently installed the latest version your bot using the windows guide but i have troubles when i want to use kraken, i get a "Cannot find module 'kraken-api' "
But at least the bots works for other platform like MtGox where it can connect. So i guess its just a problem with kraken
Im using node v0.10.25.
If someone can give me an advice ? Thanks
Stingery64
Newbie
*
Offline Offline

Activity: 59
Merit: 0


View Profile
January 27, 2014, 08:45:39 PM
 #367

okey i success to make it run on my computer finnally...
this bot is not really as "intuitive" to make it run as others like butter bot,

any way, is the tutorial data updated? because i use LTC asset and i get an error as its not supported at btc-e...

i am also trying to find the code:

config.tradingAdvisor = {
  enabled: true,
  method: 'DEMA',
  candleSize: 5,
  historySize: 20
}


as i read in the tutorial and it does not exist at config.js...
whydifficult (OP)
Sr. Member
****
Offline Offline

Activity: 287
Merit: 250



View Profile WWW
January 28, 2014, 09:52:52 PM
 #368

Also hey @whydifficult I was figlet-ing some big ASCII text for something unrelated and I thought maybe you'd like a splashier splashscreen?

Code:
.d888888 .d8888b. 88  .dP 88  .dP .d8888b.
88'  '88 88ooood8 88888"  88888"  88'  '88
'8888P88 '8boood' 88  '8b.88  '8b.'88888P'
     .88
 d8888P   I'm gonna make you rich, Bud Fox.

This looks awesome! Will look into this thanks Smiley

Hi
I recently installed the latest version your bot using the windows guide but i have troubles when i want to use kraken, i get a "Cannot find module 'kraken-api' "
But at least the bots works for other platform like MtGox where it can connect. So i guess its just a problem with kraken
Im using node v0.10.25.
If someone can give me an advice ? Thanks

Every time you pull the latest version of gekko you need to run:

Code:
npm update

okey i success to make it run on my computer finnally...
this bot is not really as "intuitive" to make it run as others like butter bot,

any way, is the tutorial data updated? because i use LTC asset and i get an error as its not supported at btc-e...

i am also trying to find the code:

config.tradingAdvisor = {
  enabled: true,
  method: 'DEMA',
  candleSize: 5,
  historySize: 20
}


as i read in the tutorial and it does not exist at config.js...

So altcoin support is only available in the latest unstable build: we changed a lot of things in Gekko and don't know for 100% everything works. You can find the latest version here:

https://github.com/askmike/gekko/tree/localDB

You can only download this unstable nightly build through git. First download git than:

Code:
git clone -b localDB --single-branch git://github.com/askmike/gekko

(As soon as this version is stable you can download normally)

and the configuring docs:

https://github.com/askmike/gekko/blob/localDB/docs/Configuring_gekko.md

--

So you are looking at the docs for the new version, though you are trying to run it on the old version.

Gekko a nodejs bitcoin trading bot!
Realtime Bitcoin Globe - visualizing all transactions and blocks
Tip jar (BTC): 1KyQdQ9ctjCrGjGRCWSBhPKcj5omy4gv5S
Quora
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
January 28, 2014, 11:15:57 PM
 #369


Every time you pull the latest version of gekko you need to run:

Code:
npm update


I got "registry error parsing json". How to fix that if it happens in the stable version update?
whydifficult (OP)
Sr. Member
****
Offline Offline

Activity: 287
Merit: 250



View Profile WWW
January 28, 2014, 11:29:19 PM
 #370

I got "registry error parsing json". How to fix that if it happens in the stable version update?

That's weird. So Gekko runs on Nodejs which is a platform for developers, I'm sorry I can't offer a more user friendly solution at this moment.

To troubleshoot:

- What OS are you running?
- What's the output of running: node -v
- What's the output of running: npm -v

Gekko a nodejs bitcoin trading bot!
Realtime Bitcoin Globe - visualizing all transactions and blocks
Tip jar (BTC): 1KyQdQ9ctjCrGjGRCWSBhPKcj5omy4gv5S
Quora
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
January 29, 2014, 02:15:13 AM
 #371

I got "registry error parsing json". How to fix that if it happens in the stable version update?

That's weird. So Gekko runs on Nodejs which is a platform for developers, I'm sorry I can't offer a more user friendly solution at this moment.

To troubleshoot:

- What OS are you running?
- What's the output of running: node -v
- What's the output of running: npm -v

I'm on Windows 7 64-bit.
node -v 0.10.24
npm -v 1.3.21

If something is currently wrong with my OS (even though that's unlikely) I can try on AWS.
Nova!
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
January 29, 2014, 04:04:30 PM
 #372

I'm not sure, but does Gekko simulation take transaction fees into account? That might be the reason for your discrepancy. I also find it surprising you trade succesfully at cex. I thought that market only had one direction... down...

Yes, Gekko also takes fees into account. Though CEX.io doesn't have any trading fees. The different either comes from a calculation bug (I'm skeptical about this) or fees + slippage.

Currently the simulator assumes it's able to buy/sell at current market price (which is last trade price, does not look at the book) - fees - slippage. If the spread is large and the trade was on the other side of the book this is far removed from reality if slippage is not set accordingly (don't trust the defaults as this is way to market specific). The reason it doesn't look at the book now is because the system is agnostic to any live market: if you feed it a stream of trades it is able to simulate new trades according to the configured trading method. Eg. this also works for backtesting as is. I want to move to a system where we also save a historical ticker data.

Note that only having ticker data does not prevent not being accurately able to calculate slippage, just the part up to the spread (difference between last price and best ask in case of long), but if you are a whale slippage will eat in your profits hard after the top ask (which is the only information the ticker provides).

Ahh, yours is the bot that freaked out when my bot made a mistake.
You may wish to read my post here and adjust your bot accordingly.
https://bitcointalk.org/index.php?topic=436289.0

Seems like a lot of people are using your bot and it doesn't quite know how to handle itself when many other people are also using it.  It seems like it went reactive the other day and all the instances sort of started piling on driving the price down.  My advice is to at least have it broadcast intent into an IRC channel somewhere, so that your bots can see the logic and take defensive action rather than reacting to market price solely and directly.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Nova!
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
January 29, 2014, 04:06:51 PM
 #373

My last was only in reference to CEX.io and the reaction between a bot I whipped up in the space of 30 minutes and this bot (or others acting similarly) and it's total effect on the market.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Nova!
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
January 29, 2014, 04:31:50 PM
 #374

Ok, this is my last post on the subject and then I'll leave you alone.

First off, great job!  This is a nice bot, it appears to be well written and I can see that you've put a lot of effort into it and you continue to to do so.

Now for the bad news.  DON'T USE TICKER DATA!!!

More specifically, don't use ticker data at places like CEX.io where there is no actual ticker stream.  And certainly don't make the assumption that the ticker represents the current market price.  You aren't actually seeing real ticks.  You are seeing "last" trades but only trades that have already executed.
You are going to be missing data and more importantly, you are going to be missing market intent. 

This is because unlike MtGox, you don't get a live stream.  You get a rate limited list of last trades based on a combination of your HTTP polling delay and how delayed CEX.io is in updating it's stream. 

This is going to screw your bot up bad.

What you need to do instead is look at the complete order book and perform a differential analysis on that about once every 30 seconds to a minute.  Then supplement it with ticker data.  (Again this only applies to sites that do not provide an actual streaming ticker).

In otherwords, you don't want to see the past, you want to look at the present and attempt to divine the current intent of the other players (and thus their future actions), based on current market conditions.  Historical is good for replaying strategies in a simulator, but trying to trade forward using the past (especially the recent past), is a really, really bad idea.

It's much more complex to do a differential analysis on the orderbook state, but the end result is a bot that is proactive rather than reactive.

Please don't take what I said as anything other than sage advice.  My previous position partly involved writing these things for a major financial institution, so I sort of have a clue Smiley

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
ha100
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 31, 2014, 02:24:31 AM
 #375

First what an interesting piece of code. Keep up the good work. Is there any smart way to alter the bot to download the history candles from particular date back? I don't really fancy waiting while it downloads it in three days. More like the previous version.
tkon3
Hero Member
*****
Offline Offline

Activity: 824
Merit: 1000



View Profile
February 01, 2014, 01:11:20 AM
 #376

Hi
Im still cant use gekko for kraken even if i use npm update. I tryed the stable version for mtgox and it works well but i need only for kraken.
Here the log when i use npm update, there are some errors when it tries to rebuild  :
Code:
C:\Users\Charles\Desktop\gekko-localDB>npm update
npm http GET https://registry.npmjs.org/mtgox-apiv2/latest
npm http GET https://registry.npmjs.org/lodash/latest
npm http GET https://registry.npmjs.org/moment/latest
npm http GET https://registry.npmjs.org/btc-e/latest
npm http GET https://registry.npmjs.org/cexio/latest
npm http GET https://registry.npmjs.org/bitstamp/latest
npm http GET https://registry.npmjs.org/nedb/latest
npm http GET https://registry.npmjs.org/async/latest
npm http GET https://registry.npmjs.org/line-reader/latest
npm http GET https://registry.npmjs.org/semver/latest
npm http GET https://registry.npmjs.org/kraken-api/latest
npm http GET https://registry.npmjs.org/nodeunit/latest
npm http 304 https://registry.npmjs.org/lodash/latest
npm http GET https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/cexio/latest
npm http GET https://registry.npmjs.org/cexio
npm http 304 https://registry.npmjs.org/mtgox-apiv2/latest
npm http 304 https://registry.npmjs.org/moment/latest
npm http 304 https://registry.npmjs.org/btc-e/latest
npm http GET https://registry.npmjs.org/mtgox-apiv2
npm http GET https://registry.npmjs.org/moment
npm http GET https://registry.npmjs.org/btc-e
npm http 304 https://registry.npmjs.org/nedb/latest
npm http 304 https://registry.npmjs.org/bitstamp/latest
npm http GET https://registry.npmjs.org/bitstamp
npm http GET https://registry.npmjs.org/nedb/0.9.4
npm http 304 https://registry.npmjs.org/async/latest
npm http 304 https://registry.npmjs.org/semver/latest
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/semver/2.2.1
npm http 304 https://registry.npmjs.org/line-reader/latest
npm http GET https://registry.npmjs.org/line-reader
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/kraken-api/latest
npm http 304 https://registry.npmjs.org/cexio
npm http 304 https://registry.npmjs.org/nodeunit/latest
npm http GET https://registry.npmjs.org/kraken-api
npm http GET https://registry.npmjs.org/nodeunit/0.8.2
npm http GET https://registry.npmjs.org/underscore/latest
npm http 304 https://registry.npmjs.org/moment
npm http 304 https://registry.npmjs.org/nedb/0.9.4
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/mtgox-apiv2
npm http 304 https://registry.npmjs.org/btc-e
npm http GET https://registry.npmjs.org/request/latest
npm http 304 https://registry.npmjs.org/semver/2.2.1
npm http 304 https://registry.npmjs.org/line-reader
npm http 304 https://registry.npmjs.org/underscore/latest
npm http GET https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/kraken-api
npm http 304 https://registry.npmjs.org/nodeunit/0.8.2
npm http 304 https://registry.npmjs.org/request/latest
npm http GET https://registry.npmjs.org/request/2.16.6
npm http 304 https://registry.npmjs.org/bitstamp
npm http GET https://registry.npmjs.org/underscore/1.4.4
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/underscore/1.4.4
npm http 304 https://registry.npmjs.org/request/2.16.6
npm http GET https://registry.npmjs.org/moment/2.4.0
npm http GET https://registry.npmjs.org/mtgox-apiv2/1.0.6
npm http GET https://registry.npmjs.org/kraken-api/0.1.2
npm http 304 https://registry.npmjs.org/kraken-api/0.1.2
underscore@1.4.4 node_modules\bitstamp\node_modules\underscore
npm http 304 https://registry.npmjs.org/moment/2.4.0
npm http 304 https://registry.npmjs.org/mtgox-apiv2/1.0.6
npm http GET https://registry.npmjs.org/querystring
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/microtime
npm http GET https://registry.npmjs.org/querystring/0.2.0
npm http GET https://registry.npmjs.org/JSONStream/0.6.4
npm http GET https://registry.npmjs.org/request/2.21.0
npm http 304 https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/cookie-jar
npm http GET https://registry.npmjs.org/aws-sign
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/querystring
npm http 304 https://registry.npmjs.org/microtime
npm http 304 https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/async/0.2.9
npm http GET https://registry.npmjs.org/binary-search-tree/0.2.3
npm http GET https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/request/2.21.0
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/JSONStream/0.6.4
npm http 304 https://registry.npmjs.org/cookie-jar
npm http 304 https://registry.npmjs.org/aws-sign
npm http GET https://registry.npmjs.org/tap
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/async/0.2.9
npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.2
5","npm":"1.3.24"})
npm http 304 https://registry.npmjs.org/binary-search-tree/0.2.3
npm http GET https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/querystring/0.2.0
npm http GET https://registry.npmjs.org/bindings/1.1.1
npm http GET https://registry.npmjs.org/nan/0.6.0
npm http 304 https://registry.npmjs.org/combined-stream
nedb@0.9.4 node_modules\nedb
├── async@0.2.9
├── mkdirp@0.3.5
├── binary-search-tree@0.2.3
└── underscore@1.4.4
npm http 304 https://registry.npmjs.org/tap
npm http GET https://registry.npmjs.org/tough-cookie
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/aws-sign2
npm http 304 https://registry.npmjs.org/bindings/1.1.1
npm http 304 https://registry.npmjs.org/tough-cookie
npm http 304 https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/jsonparse/0.0.5
npm http GET https://registry.npmjs.org/through
npm http GET https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/aws-sign2
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/nan/0.6.0
npm http 304 https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/jsonparse/0.0.5
npm http 304 https://registry.npmjs.org/through
npm http 304 https://registry.npmjs.org/sntp
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/ctype/0.5.2

> microtime@0.5.1 install C:\Users\Charles\Desktop\gekko-localDB\node_modules\kr
aken-api\node_modules\microtime
> node-gyp rebuild


C:\Users\Charles\Desktop\gekko-localDB\node_modules\kraken-api\node_modules\micr
otime>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\nod
e_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:101:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack     at Object.oncomplete (fs.js:107:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Charles\Desktop\gekko-localDB\node_modules\kraken-api\node
_modules\microtime
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
npm http GET https://registry.npmjs.org/form-data/0.0.8
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/punycode
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/slide
npm http GET https://registry.npmjs.org/runforcover
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/difflet
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/buffer-equal
npm http GET https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/form-data/0.0.8
npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.25
","npm":"1.3.24"})
npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"v0.
10.25","npm":"1.3.24"})
npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.25
","npm":"1.3.24"})
npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.25
","npm":"1.3.24"})
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/punycode
npm http 304 https://registry.npmjs.org/deep-equal
npm http 304 https://registry.npmjs.org/slide
npm http 304 https://registry.npmjs.org/runforcover
npm http 304 https://registry.npmjs.org/difflet
npm http 304 https://registry.npmjs.org/buffer-equal
npm http 304 https://registry.npmjs.org/glob
moment@2.4.0 node_modules\moment
npm http GET https://registry.npmjs.org/bunker
npm http GET https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/bunker
npm ERR! Error: ENOENT, lstat 'C:\Users\Charles\Desktop\gekko-localDB\node_modul
es\kraken-api\node_modules\request\node_modules\http-signature\node_modules\ctyp
e\tst\ctf\int.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/isaacs/npm/issues>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "update"
npm ERR! cwd C:\Users\Charles\Desktop\gekko-localDB
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! path C:\Users\Charles\Desktop\gekko-localDB\node_modules\kraken-api\nod
e_modules\request\node_modules\http-signature\node_modules\ctype\tst\ctf\int.jso
n
npm ERR! fstream_path C:\Users\Charles\Desktop\gekko-localDB\node_modules\kraken
-api\node_modules\request\node_modules\http-signature\node_modules\ctype\tst\ctf
\int.json
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fst
ream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET https://registry.npmjs.org/deep-is
npm http GET https://registry.npmjs.org/traverse
npm http GET https://registry.npmjs.org/charm
npm http 304 https://registry.npmjs.org/abbrev
request@2.16.6 node_modules\btc-e\node_modules\request
├── forever-agent@0.2.0
├── aws-sign@0.2.0
├── tunnel-agent@0.2.0
├── oauth-sign@0.2.0
├── json-stringify-safe@3.0.0
├── cookie-jar@0.2.0
├── mime@1.2.11
├── node-uuid@1.4.1
├── qs@0.5.6
├── form-data@0.0.10 (async@0.2.10, combined-stream@0.0.4)
└── hawk@0.10.2 (sntp@0.1.4, boom@0.3.8, hoek@0.7.6, cryptiles@0.1.3)
npm ERR! microtime@0.5.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the microtime@0.5.1 install script.
npm ERR! This is most likely a problem with the microtime package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls microtime
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "update"
npm ERR! cwd C:\Users\Charles\Desktop\gekko-localDB
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/burrito
npm http 304 https://registry.npmjs.org/deep-is
npm http 304 https://registry.npmjs.org/traverse
npm http 304 https://registry.npmjs.org/charm
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/burrito
npm http 304 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/lru-cache
nodeunit@0.8.2 node_modules\nodeunit
└── tap@0.4.8 (deep-equal@0.0.0, buffer-equal@0.0.0, slide@1.1.5, mkdirp@0.3.5,
nopt@2.1.2, difflet@0.2.6, glob@3.2.8, runforcover@0.0.2)
mtgox-apiv2@1.0.6 node_modules\mtgox-apiv2
├── querystring@0.2.0
├── JSONStream@0.6.4 (through@2.2.7, jsonparse@0.0.5)
└── request@2.21.0 (forever-agent@0.5.0, aws-sign@0.3.0, json-stringify-safe@4.0
.0, tunnel-agent@0.3.0, oauth-sign@0.3.0, qs@0.6.6, cookie-jar@0.3.0, mime@1.2.1
1, node-uuid@1.4.1, form-data@0.0.8, hawk@0.13.1, http-signature@0.9.11)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Charles\Desktop\gekko-localDB\npm-debug.log
npm ERR! not ok code 0

C:\Users\Charles\Desktop\gekko-localDB>
If someone can understand that ^^
Stingery64
Newbie
*
Offline Offline

Activity: 59
Merit: 0


View Profile
February 01, 2014, 11:40:09 PM
Last edit: February 02, 2014, 11:50:29 AM by Stingery64
 #377

hi,

1- is there any way i "upload" the bot in a webserver?
or maybe upload just the data harvester and in my computer i run the bot, so the bot read the data from the online server,
this way info is always accurate and the trading starts right after the bot starts... without days waiting to get data


2- i see that candles do not match any specific hour time, if you run a 5min candles, at 7:23
then candles are going to be of 7:28, 7:33, and so on... i want that the candles get round times
so if you select 5 min it match always the time of 7:05, 7:10, 7:15...
same for 15min,30min,1h,2h... it's possible?


3- why in the initial balance there is already a difference between "original simulated balance" and "current simulated balance" ?
the first notification at least shouldn't be the same one?


4- would be possible to select what to show in the profit simulator ? right now it show the balance in the selected currency
but i would like to see how many coins did the bot win, and not how many dollars...
i tried to put "USD" as asset and "LTC" as currency but its not allowed


5- time trades are not stable over time periods, i have just for test a 1min candle selected in the config, as i notice the bot gives advice within the seconds precision,
that should mean a stable second over all trades advices,
if it start at 23:59:44
all trades advice should be made in the "44" seconds time, don't they¿?

look... 44...58...00, 03 seconds...

https://i.imgur.com/i1DNsAL.png




Thom
Member
**
Offline Offline

Activity: 112
Merit: 10


Be kind man, don't be mankind


View Profile WWW
February 06, 2014, 08:32:28 PM
Last edit: February 09, 2014, 12:18:13 PM by Thom
 #378

Please don't take what I said as anything other than sage advice.  My previous position partly involved writing these things for a major financial institution, so I sort of have a clue Smiley

Wow, don't take what I'm saying as anything other than sage advice, but it would probably behoove you and others' opinion of your advice to not describe it quite like that.

Also, major financial institutions leverage extreme bandwidth and near-zero-latency fibre connections in close physical proximity to the exchange to run their bots, essentially making it into a race, precog or otherwise. We in the big wide ping-wobbly interweb can't have that, so Gekko being a reactive trading bot makes it a nice safe bet to leave running on your account in case of massive market moves while you're sleeping, etc. Granted some extreme market oscillation and bad config can result in a loss as easily as it can a gain, but compared to that, a predictive bot requires much more care, tuning and observation, as it's entirely possible for seasoned traders to use the orderbooks at little or no cost to trick predictive spreadwatching bots into orders they shouldn't oughta be doing.

Having said all that, if gekko does ever evolve to watch the spread as well as / instead of the candles, I'd like a plain ol' reactive version like it is right now.

Why? Because it's a robust and often-profitable alternative to hoping like hell BTC/GHS/whatever won't crash in the night, or fraying one's nerves by day trading constantly.
It has required a fair bit of config tweaks to accommodate the market moves of each week, but I'm mostly chalking that up to my inexperience in day trading and that I'm doing so on cex.io, the weirdest mutant of the exchanges.

Nonetheless, pictures can speak more than words. Here's the GHS holdings in my gekko-equipped cex.io account. Most of this is gekko trading, but sometimes i jump in and intervene when the candles get exciting.
Consider only the peaks and the red curve I applied - each blip is an hour's average, so any full hour not holding GHS registers low.

(edit: i pasted multiple cex graphs together to make them more readable and forum-sized plus skip the flat boring bit)


YEAH GEKKO.

@whydifficult - I often ctrl-c gekko so I can manually trade without it disagreeing wildly in my face, but when the graph goes flat again and I fire Gekko up so I can stop trading, it has to recalc candles. IMO what it needs most is a hotkey to toggle the trader (during which it would keep running, advising, simulating, candle gathering, etc). Right now it's a lumpen cancel-changeconfig-restart scenario that resets sim trading values etc.

Only a few things stop the show so far - nonce increment fail, which t recovers from but only when the next trading advice is issued:
Code:
2014-02-09 08:57:05 (INFO):	attempting to BUY <some> GHS at cex.io
2014-02-09 08:57:06 (ERROR): unable to buy: Nonce must be incremented
2014-02-09 10:57:14 (INFO): Trader Received advice to go short Selling  GHS

and this not-too-esoteric error:
Code:
2014-02-06 17:06:13 (ERROR):	unable to buy: { [Error: socket hang up] code: 'ECONNRESET' }
2014-02-06 17:06:29 (ERROR): unable to buy: { [Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }

Happy to report that it can deal with all manner of esoteric balances though:
Code:
2014-02-06 19:16:12 (INFO):	wanted to buy GHS but the amount is to small (-0.0004199288335019076) at cex.io

It's short for Thomassina ⚥ • BTC veteran, Bitcointalk neophyte • BTC1THoM4cn8hHTyE637DEPMCLcerZe1mL1X • Cex.IO Cloud Mining - don't risk preorders, mine & trade now!
༺ ☤ Curecoin - Fold Proteins, Earn Coins! ☤   CURE: B8cjEuGKH3qofsxGGEVYdTwUrpfCTxQP7u ༻
g0re79
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


I´ve got a picture! Haha!


View Profile WWW
February 09, 2014, 01:09:14 AM
Last edit: February 09, 2014, 01:30:09 AM by g0re79
 #379

Hi
Im still cant use gekko for kraken even if i use npm update. I tryed the stable version for mtgox and it works well but i need only for kraken.
Here the log when i use npm update, there are some errors when it tries to rebuild  :
Code:
C:\Users\Charles\Desktop\gekko-localDB>npm update
npm http GET https://registry.npmjs.org/mtgox-apiv2/latest
...CUT.OFF...
└── hawk@0.10.2 (sntp@0.1.4, boom@0.3.8, hoek@0.7.6, cryptiles@0.1.3)
npm ERR! microtime@0.5.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
ERR! Failed at the microtime@0.5.1 install script.
npm ERR! This is most likely a problem with the microtime package,
npm ERR! not with npm itself.
...CUT.OFF...
If someone can understand that ^^

Same error for me on two machines running Win 7 and Win XP. Gekko configured for MtGox works well, but that is (and probably will be) quite useless. I´d like to use Kraken instead.

EDIT: You can get microtime package at https://github.com/wadey/node-microtime.git and try to install it manually, but it have something to do with latest MS SKD. I don´t have a time to solve this now  Undecided

Don´t deal with crappy shitcoins and stop wasting electricity
Support real science instead
[/url]
whydifficult (OP)
Sr. Member
****
Offline Offline

Activity: 287
Merit: 250



View Profile WWW
February 12, 2014, 12:49:09 AM
 #380

I'm on Windows 7 64-bit.
node -v 0.10.24
npm -v 1.3.21

If something is currently wrong with my OS (even though that's unlikely) I can try on AWS.

It appears to be a problem with nodejs or npm installation. If reinstalling those does not work, please try on AWS and let me know if that works.


----



Ahh, yours is the bot that freaked out when my bot made a mistake.
You may wish to read my post here and adjust your bot accordingly.
https://bitcointalk.org/index.php?topic=436289.0

Seems like a lot of people are using your bot and it doesn't quite know how to handle itself when many other people are also using it.  It seems like it went reactive the other day and all the instances sort of started piling on driving the price down.  My advice is to at least have it broadcast intent into an IRC channel somewhere, so that your bots can see the logic and take defensive action rather than reacting to market price solely and directly.


Could you eleborate a bit more on how bots should deal with this situation? Specifically this part:

Quote
So guys, here's a tip.  If you have a bot doing your trading on CEX.io, look at your thresholds and have it consider the whole order book along with depth, not just the "last" ticker (ticker is screwy anyways).  Otherwise when I get around to rewriting this thing it's going to wipe you out.

Not quite sure what you mean by that.

Note that Gekko is not a start and watch autobot that you only have to turn on. It is an automation tool for traders who understand what they are doing. Currently Gekko supports multiple trendwatching indicators. If you are trading on a commodity exchange like CEX.io where it is known that the price of the asset will go down you should adjust your indicators accordingly to balance out the price devaluation not part of any trend (eg. sent the tresholds so that when the price goes down slowly this is not detected as any trend).

-----


[..]

More specifically, don't use ticker data at places like CEX.io where there is no actual ticker stream.  And certainly don't make the assumption that the ticker represents the current market price.  You aren't actually seeing real ticks.  You are seeing "last" trades but only trades that have already executed.
You are going to be missing data and more importantly, you are going to be missing market intent.  

This is because unlike MtGox, you don't get a live stream.  You get a rate limited list of last trades based on a combination of your HTTP polling delay and how delayed CEX.io is in updating it's stream.  

[..]

What you need to do instead is look at the complete order book and perform a differential analysis on that about once every 30 seconds to a minute.  Then supplement it with ticker data.  (Again this only applies to sites that do not provide an actual streaming ticker).

[..]

It's much more complex to do a differential analysis on the orderbook state, but the end result is a bot that is proactive rather than reactive.

This I understand, thanks for the warning! I will definitly look into this. The trenddetection parts is based on historical trade data (so the `trade_history` hcall), but the order price is based on the ticker data.

-----

First what an interesting piece of code. Keep up the good work. Is there any smart way to alter the bot to download the history candles from particular date back? I don't really fancy waiting while it downloads it in three days. More like the previous version.

Thanks, The reason you have to wait is because all exchanges removed the ability to fetch historical data (with the exception of mtgox, will add support for fetchinhg historical data here soon). Bitcoincharts is to unreliable.

I am working providing historical data as well as hosted Gekkos myself. Thouhg nothing I can share at this point yet.

-----

Hi
Im still cant use gekko for kraken even if i use npm update. I tryed the stable version for mtgox and it works well but i need only for kraken.
Here the log when i use npm update, there are some errors when it tries to rebuild

The Kraken dependency required something which was hard to install on Windows. I discussed this with the dependency mantainer and this problem has been solved. Please try again!

------


hi,

1- is there any way i "upload" the bot in a webserver?
or maybe upload just the data harvester and in my computer i run the bot, so the bot read the data from the online server,
this way info is always accurate and the trading starts right after the bot starts... without days waiting to get data


2- i see that candles do not match any specific hour time, if you run a 5min candles, at 7:23
then candles are going to be of 7:28, 7:33, and so on... i want that the candles get round times
so if you select 5 min it match always the time of 7:05, 7:10, 7:15...
same for 15min,30min,1h,2h... it's possible?


3- why in the initial balance there is already a difference between "original simulated balance" and "current simulated balance" ?
the first notification at least shouldn't be the same one?


4- would be possible to select what to show in the profit simulator ? right now it show the balance in the selected currency
but i would like to see how many coins did the bot win, and not how many dollars...
i tried to put "USD" as asset and "LTC" as currency but its not allowed


5- time trades are not stable over time periods, i have just for test a 1min candle selected in the config, as i notice the bot gives advice within the seconds precision,
that should mean a stable second over all trades advices,
if it start at 23:59:44
all trades advice should be made in the "44" seconds time, don't they¿?

look... 44...58...00, 03 seconds...


1.

Yes you can run Gekko on a server, this is what most people are doing who run gekkos 24/7/365!

And no, currently not possible to have the harvester on a server and the rest on your pc without messing with the code (will make this process easier in the near future, also working on fully hosted Gekkos as a service). There is a way, but it requires some plumbing / hacking the code. Short story:

- Install redis on the server (with auth exposed to your pc).
- Configure the redis beacon plugin on the server Gekko to emit candles.
- Run another Gekko on your pc
- Hijack the Candle Manager so it relays candles from redis pub/sub on the server into your trade advisor (you would have to write these 10 lines of code).

2.

At the moment not possible to configure (will put this on the todo to add as a feature), the reason for this is to start at the minute we have enough history and to guard against manipulating close prices of hourly candles.

3.

You get the first notification after the first advice. The simulator has already simulated the first trade and had to pay fees and slippage for this new position.

4.

You can read all details here in the docs, but the answer is: set `reportInCurrency` to false.

5.

Has to do with two things:

- Gekko does not refetch at exactly every 60 seconds, was around 60 seconds (now around 48 seconds).
- Gekko can only propogate candles once they complete, Gekko can only call candles complete once a trade has come in for the next minute (because of the APIs being slow, read some more specific details here.)


-----




@whydifficult - I often ctrl-c gekko so I can manually trade without it disagreeing wildly in my face, but when the graph goes flat again and I fire Gekko up so I can stop trading, it has to recalc candles. IMO what it needs most is a hotkey to toggle the trader (during which it would keep running, advising, simulating, candle gathering, etc). Right now it's a lumpen cancel-changeconfig-restart scenario that resets sim trading values etc.

Only a few things stop the show so far - nonce increment fail, which t recovers from but only when the next trading advice is issued:
Code:
2014-02-09 08:57:05 (INFO): attempting to BUY <some> GHS at cex.io
2014-02-09 08:57:06 (ERROR):  unable to buy: Nonce must be incremented
2014-02-09 10:57:14 (INFO): Trader Received advice to go short Selling  GHS

and this not-too-esoteric error:
Code:
2014-02-06 17:06:13 (ERROR):  unable to buy: { [Error: socket hang up] code: 'ECONNRESET' }
2014-02-06 17:06:29 (ERROR):  unable to buy: { [Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }

Happy to report that it can deal with all manner of esoteric balances though:
Code:
2014-02-06 19:16:12 (INFO): wanted to buy GHS but the amount is to small (-0.0004199288335019076) at cex.io

- Woow that is a really smart idea. Really want those toggles in there. I've put them on the todo now.
- I'll rename the error to something more sain, it means that CEX.io API is not responding correctly. So to clarify: when the unable to buy happened Gekko did not retry to buy?
- Awesome!

-------


Same error for me on two machines running Win 7 and Win XP. Gekko configured for MtGox works well, but that is (and probably will be) quite useless. I´d like to use Kraken instead.

EDIT: You can get microtime package at https://github.com/wadey/node-microtime.git and try to install it manually, but it have something to do with latest MS SKD. I don´t have a time to solve this now  Undecided

You don't have to anymore, the microtime dependency required compiling (which is not fun on Windows). I've persuaded the maintainer to remove the microtime module. Retry please!

Gekko a nodejs bitcoin trading bot!
Realtime Bitcoin Globe - visualizing all transactions and blocks
Tip jar (BTC): 1KyQdQ9ctjCrGjGRCWSBhPKcj5omy4gv5S
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!