Pages:
Author

Topic: Gekko - a javascript trading bot and backtesting platform - page 15. (Read 147846 times)

member
Activity: 112
Merit: 10
Be kind man, don't be mankind

@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  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!

I've built a completely differently-oriented standalone cexbot of my own in python this week, so I know cex's API returns pretty well now.

Toggles - Awesome! I added toggles to my bot by adding a quick "Trade, Simulate, Quit? >" prompt that happens on ctrl-c / keyboardinterrupt. Should be easy in node?
Error - yeah cexapi gets sleepy and times out sometimes. And gekko didn't retry the buy - it just left the order open and didn't do anything else until next advice time (by which time i'd cancelled the order manually). Happened twice now.
Awesome - awesome!

Leaping between your Gekko's DEMA for the candle action and my Librium's high-speed balancing and reporting for the flatlines and sleepytimes is working out nicely so far. With toggles on both and autorecovery from timeouts, they can run in harmony for evaaaaar <3
member
Activity: 136
Merit: 10
tester
what is the time for refresh ?
can i decrease it ?
newbie
Activity: 41
Merit: 0
You can ignore those warnings, I'm seeing them as well.

Great! Can't wait for Wizbit too.
newbie
Activity: 1
Merit: 0
Awsome, im going to try it and install it on my raspberry pi

 Grin
sr. member
Activity: 287
Merit: 250

Yes, I will be either using that wrapper or my own Smiley

Parsing json is OK now, updated to node 0.10.25 and npm 1.3.24 - now there are warnings for [email protected], [email protected], [email protected], [email protected] and [email protected] - node 0.8.x wanted. I'm not on AWS anymore.

You can ignore those warnings, I'm seeing them as well.

after last update i have this error
Code:
user@netbook:/home/user/gekko# node gekko config=config/user/cexio.js

/home/user/gekko/config/user/cexio.js:1
(function (exports, require, module, __filename, __dirname) { \// Everything
                                                              ^
SyntaxError: Unexpected token ILLEGAL
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.util.getConfig (/home/user/gekko/core/util.js:18:15)
    at Object. (/home/user/gekko/core/util.js:144:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

add: problem solved !
just delete first slash in setting file.

Well those config files are extremely outdated, please use the file `config.js` and read here how to configure it:

https://github.com/askmike/gekko/blob/master/docs/Configuring_gekko.md
member
Activity: 136
Merit: 10
tester
after last update i have this error
Code:
user@netbook:/home/user/gekko# node gekko config=config/user/cexio.js

/home/user/gekko/config/user/cexio.js:1
(function (exports, require, module, __filename, __dirname) { \// Everything
                                                              ^
SyntaxError: Unexpected token ILLEGAL
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.util.getConfig (/home/user/gekko/core/util.js:18:15)
    at Object. (/home/user/gekko/core/util.js:144:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

add: problem solved !
just delete first slash in setting file.
newbie
Activity: 41
Merit: 0
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.


Parsing json is OK now, updated to node 0.10.25 and npm 1.3.24 - now there are warnings for [email protected], [email protected], [email protected], [email protected] and [email protected] - node 0.8.x wanted. I'm not on AWS anymore.
legendary
Activity: 1974
Merit: 1077
^ Will code for Bitcoins
Will add a trading method so that one can be optionally installed (because it doesn't work well on Windows)!

Would this help?
https://github.com/oransel/node-talib
sr. member
Activity: 287
Merit: 250
Big news Guys: Version 0.1.0 is finally out

Read the OP for all this complete overhaul (previously found in the localDB branch).

New features include:

- Support for: Mt. Gox, BTC-e, Bitstamp, Kraken, CEX.io (and cryptsy soon).
- New indicators: DEMA, MACD and PPO.
- A bunch of fun plugins, like the IRC bot and the mailer.
- Store historical market data automatically on disk.

This is getting better and better, congrats!

Is there a way to link the entire Ta-Lib instead of adding indicators one by one?

Will add a trading method so that one can be optionally installed (because it doesn't work well on Windows)!
legendary
Activity: 1974
Merit: 1077
^ Will code for Bitcoins
Big news Guys: Version 0.1.0 is finally out

Read the OP for all this complete overhaul (previously found in the localDB branch).

New features include:

- Support for: Mt. Gox, BTC-e, Bitstamp, Kraken, CEX.io (and cryptsy soon).
- New indicators: DEMA, MACD and PPO.
- A bunch of fun plugins, like the IRC bot and the mailer.
- Store historical market data automatically on disk.

This is getting better and better, congrats!

Is there a way to link the entire Ta-Lib instead of adding indicators one by one?
sr. member
Activity: 287
Merit: 250
Big news Guys: Version 0.1.0 is finally out

Read the OP for all this complete overhaul (previously found in the localDB branch).

New features include:

- Support for: Mt. Gox, BTC-e, Bitstamp, Kraken, CEX.io (and cryptsy soon).
- New indicators: DEMA, MACD and PPO.
- A bunch of fun plugins, like the IRC bot and the mailer.
- Store historical market data automatically on disk.
sr. member
Activity: 287
Merit: 250
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://bitcointalksearch.org/topic/cexio-experiences-436289

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:


[..]

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 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!
sr. member
Activity: 476
Merit: 250
I´ve got a picture! Haha!
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...
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
ERR! Failed at the [email protected] 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
member
Activity: 112
Merit: 10
Be kind man, don't be mankind
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 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
newbie
Activity: 59
Merit: 0
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...






hero member
Activity: 824
Merit: 1000
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
[email protected] 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 [email protected]: 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
[email protected] node_modules\nedb
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
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

> [email protected] 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 [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.25
","npm":"1.3.24"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.
10.25","npm":"1.3.24"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.25
","npm":"1.3.24"})
npm WARN engine [email protected]: 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
[email protected] 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!    

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
[email protected] node_modules\btc-e\node_modules\request
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
[email protected] node_modules\nodeunit
└── [email protected] ([email protected], [email protected], [email protected], [email protected],
[email protected], [email protected], [email protected], [email protected])
[email protected] node_modules\mtgox-apiv2
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected]
.0, [email protected], [email protected], [email protected], [email protected], [email protected]
1, [email protected], [email protected], [email protected], [email protected])
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 ^^
newbie
Activity: 2
Merit: 0
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.
full member
Activity: 140
Merit: 101
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
full member
Activity: 140
Merit: 101
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.
full member
Activity: 140
Merit: 101
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://bitcointalksearch.org/topic/cexio-experiences-436289

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.
Pages:
Jump to: