Pages:
Author

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

sr. member
Activity: 400
Merit: 250
the sun is shining, but the ice is still slippery
This is fantastic. I have been pouring over this for the past couple days. Thank you for your work in developing this. On my next BTC buy in will toss a donation your way.

I feel like I have a bit of learning to do in regards to getting this to work before I propose any formal questions for you regarding its operation. I will quickly mention that I installed everything with no problems to speak of but it only gets as far  as displayed down below (ive let it sit for hours). The buy advice (at time of advising) was actually 50cents higher then the highest bid so obviously Im missing something but felt like composing my troubles anyways.
Thanks again. Cheers....

2013-07-09 19:14:15 (INFO):     I'm gonna make you rich, Bud Fox.
2013-07-09 19:14:15 (INFO):     Let me show you some Exponential Moving Averages
2013-07-09 19:14:15 (INFO):     Using normal settings to monitor the live market
2013-07-09 19:14:16 (INFO):     NOT trading with real money
2013-07-09 19:14:16 (INFO):     Profit reporter active on simulated balance
2013-07-09 19:14:16 (INFO):     Calculating EMA on historical data...
2013-07-09 19:15:28 (INFO):     ADVICE is to BUY @ 76.700 (0.357)
sr. member
Activity: 287
Merit: 250
maybe silly question but,

does you backtest includes fees for open and close of trade ?

When Gekko is backtesting it uses the close of candles both as the price to determine trends using EMA and the price at which to trade if a new trend is detected and it simulates a trade. The fee applied to the simulated trade defaults to 0.6% (the default at Mt. Gox with low amounts). You can configure this fee amount in the config.
sr. member
Activity: 287
Merit: 250
Your node version is pretty old: you are running v0.6.19 while the current version is v0.10.12. I think that this is your problem. You can quickly update node by downloading the npm module n globally: `npm install -g n` and than run `n latest` and it will install the latest node version. Or you can compile it yourself.
member
Activity: 85
Merit: 10
Hmm still no difference.

For what its worth, I removed node and reinstalled it and still same problem. I also ran into an issue with "npm install". I posted it below. Any ideas?

Code:
npm http GET https://registry.npmjs.org/mtgox-apiv2
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/moment
npm http GET https://registry.npmjs.org/btc-e
npm http GET https://registry.npmjs.org/bitcoincharts
npm http GET https://registry.npmjs.org/emailjs
npm http GET https://registry.npmjs.org/prompt-lite
npm http GET https://registry.npmjs.org/bitstamp
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/line-reader

npm ERR! Error: failed to fetch from registry: underscore
npm ERR!     at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR!     at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR!     at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR!     at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR!     at Request. (/usr/lib/nodejs/request/main.js:212:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest. (/usr/lib/nodejs/request/main.js:209:10)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at onConnect (/usr/lib/nodejs/request/tunnel.js:151:23)
npm ERR!     at Array.0 (/usr/lib/nodejs/request/tunnel.js:132:7)
npm ERR! You may report this log at:
npm ERR!     
npm ERR! or use
npm ERR!     reportbug --attach /home/nii236/bitcoin/gekko/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-19-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/nii236/bitcoin/gekko
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: underscore
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/nii236/bitcoin/gekko/npm-debug.log
npm not ok
sr. member
Activity: 287
Merit: 250
Yes I'm running a fresh clone of your GitHub project. I'm on Linux Mint at the moment and I'm pretty much stumped by what is causing this.

I suppose I can try and reinstall node and nodejs and see what happens...

Yea, I've never experienced something like this. You can try to create a new file called `test.js` with the following content:

Code:
console.log('test')

Run it with `node test` and see if it logs test or not (if it doesn't your node is not working / outputting correctly).
member
Activity: 85
Merit: 10
Yes I'm running a fresh clone of your GitHub project. I'm on Linux Mint at the moment and I'm pretty much stumped by what is causing this.

I suppose I can try and reinstall node and nodejs and see what happens...
sr. member
Activity: 287
Merit: 250
Yes, at Cryptotrader.org, the script calculates candles the same way, though it also takes volumes into consideration and use data fetched from Mtgox via websockets API for inputs. I think the good way to make sure our calculations are correct, is to compare script output with similar data provided by popular online chart tools like Bitcoincharts ('Load raw data' link at the page bottom).

Good point, I'll also check a couple backtesters with different EMA parameters to see if they would come to the same profit conclusion.

Can anyone help me with running the bot?

It just returns immediately from the program when I type "node gekko". No error messages or anything. npm, nodejs is installed. I did a git clone for installation of Gekko itself.

Code:
nii236@NiiEEE ~/bitcoin/gekko $ node gekko
nii236@NiiEEE ~/bitcoin/gekko $

Hmm that's strange, do you have the newest version of Gekko? And what platform do you have? All logging goes to stdout (which means the terminal session most of the time).

Also, is there a way to disable certain types of trades. I want to do the following:

When EMA crossover signals a buy, buy on MtGox ONLY
When EMA crossover signals a sell, sell on BitStamp ONLY

Is this possible?

Well you would have to run two Gekkos: One where you disable buying by making the buyTreshold "Infinity" (without the quotes). And another one where you'd set the sellTreshold at "-Infinity", if you put those in two different config files you can specify to Gekko what config to use on running. Read more about that here. This way you can also configure the MtGox one to watch MtGox and the Bitstamp one to watch Bitstamp (if you want them to).
member
Activity: 85
Merit: 10
Can anyone help me with running the bot?

It just returns immediately from the program when I type "node gekko". No error messages or anything. npm, nodejs is installed. I did a git clone for installation of Gekko itself.

Code:
nii236@NiiEEE ~/bitcoin/gekko $ node gekko
nii236@NiiEEE ~/bitcoin/gekko $

Also, is there a way to disable certain types of trades. I want to do the following:

When EMA crossover signals a buy, buy on MtGox ONLY
When EMA crossover signals a sell, sell on BitStamp ONLY

Is this possible?
full member
Activity: 220
Merit: 100
By the way, I wanted to use your backtester to verify my EMA and backtesting implementation. But I can't find the raw candle date. How did you calculate your candles? Similar to my candle fetcher (which uses the trade data MtGox put in Google BigQuery)?

Yes, at Cryptotrader.org, the script calculates candles the same way, though it also takes volumes into consideration and use data fetched from Mtgox via websockets API for inputs. I think the good way to make sure our calculations are correct, is to compare script output with similar data provided by popular online chart tools like Bitcoincharts ('Load raw data' link at the page bottom).
sr. member
Activity: 287
Merit: 250
anything out that will do LTC or alt-coins at all ??

Gekko has plans, but those are deffered until the new BTC-e API stabilizes.

With backtesting on this I found 0.80/0.80 was better... thus perhaps best to change the gekko config file to:
"
  sellTreshold: -0.80,
  buyTreshold: 0.80
"
?

Good idea, I'll look into what will be nice beginner settings. But I do need to make it clear that Gekko is more an trading algo platform then something that works out of the box.

nice Don't buy strategy  Wink

I like it a lot actually, this way the bot doesn't change position as agressive as the default one which saves a lot in fees. But this also means that the bot may not pick up light trends.

I am running a couple of paper traders but my real trading Gekko has thresholds of -0.9 and 0.4 (with other EMA short & long) as it appeared very stable over the last couple of weeks.

---

By the way, I wanted to use your backtester to verify my EMA and backtesting implementation. But I can't find the raw candle date. How did you calculate your candles? Similar to my candle fetcher (which uses the trade data MtGox put in Google BigQuery)?
full member
Activity: 220
Merit: 100
With backtesting on this I found 0.80/0.80 was better... thus perhaps best to change the gekko config file to:
"
  sellTreshold: -0.80,
  buyTreshold: 0.80
"
?


Note that Gekko is a very technical tool, if you are having a lot of trouble with editing configuration files and watching the command line instead of a screen with a graph I recommand you to check out these similar projects. They are more focused on a user friendly tool.


Those who are experiencing problems with installing tools mentioned above, may also try http://CryptoTrader.org - web-based scripting platform that allows to run your own trading algorithms on historical mtgox data very easily. For details, check out this comment https://bitcointalksearch.org/topic/m.2668832

nice Don't buy strategy  Wink
hero member
Activity: 900
Merit: 1000
Crypto Geek
With backtesting on this I found 0.80/0.80 was better... thus perhaps best to change the gekko config file to:
"
  sellTreshold: -0.80,
  buyTreshold: 0.80
"
?


Note that Gekko is a very technical tool, if you are having a lot of trouble with editing configuration files and watching the command line instead of a screen with a graph I recommand you to check out these similar projects. They are more focused on a user friendly tool.


Those who are experiencing problems with installing tools mentioned above, may also try http://CryptoTrader.org - web-based scripting platform that allows to run your own trading algorithms on historical mtgox data very easily. For details, check out this comment https://bitcointalksearch.org/topic/m.2668832
hero member
Activity: 532
Merit: 500
Java should work everywhere...

But it's not the actual app...just the API implementations...
Oh ok but I'm not sure how to add that info in or anything like that would you care to help?
legendary
Activity: 965
Merit: 1000
Java should work everywhere...

But it's not the actual app...just the API implementations...
hero member
Activity: 532
Merit: 500
Maybe Aido...

My stuff can do various coin pairs.

I already released some API implementations:

https://github.com/ReAzem/cryptocoin-tradelib

Maybe you can use it...
Can this be compiled on a mac ?
legendary
Activity: 965
Merit: 1000
Maybe Aido...

My stuff can do various coin pairs.

I already released some API implementations:

https://github.com/ReAzem/cryptocoin-tradelib

Maybe you can use it...
hero member
Activity: 532
Merit: 500
anything out that will do LTC or alt-coins at all ??
full member
Activity: 220
Merit: 100

Note that Gekko is a very technical tool, if you are having a lot of trouble with editing configuration files and watching the command line instead of a screen with a graph I recommand you to check out these similar projects. They are more focused on a user friendly tool.


Those who are experiencing problems with installing tools mentioned above, may also try http://CryptoTrader.org - web-based scripting platform that allows to run your own trading algorithms on historical mtgox data very easily. For details, check out this comment https://bitcointalksearch.org/topic/m.2668832
hero member
Activity: 532
Merit: 500
Wait where do I set the trade I'm trying for a different coin not btc I think I just set it to the coin I want but than where do I put the price I want to buy and sell at

On BTC-e Gekko currently only supports BTC. You can read every supported currency pair per exchange here. There is a discussion about using a different data provider so that altcoins are supported on Github. But unfortunatly this is not possible yet.

ok i've set this up again now i get this
node gekko

/Users/chiznillen/gekko/config.js:28
 Monitor the live market
         ^^^
SyntaxError: Unexpected identifier
    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 (/Users/chiznillen/gekko/util.js:9:12)
    at Object. (/Users/chiznillen/gekko/util.js:66:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

Line 28 is a comment, this is so I can explain what the block below does. Comments always need a double slash in front of them. So you should change:

Code:
Monitor the live market

 to
 
Code:
// Monitor the live market

Note that Gekko is a very technical tool, if you are having a lot of trouble with editing configuration files and watching the command line instead of a screen with a graph I recommand you to check out these similar projects. They are more focused on a user friendly tool.


EDIT:

The API key and secret can be generated on the profile page on btce. Gekko only need trade rights.

Correction: gekko need trade and info right on BTC-e, so that it knows the size of the orders it needs to create.
Thanks do you plan on adding any alt-coins at all kinda want this for ltc and the other you pointed out to me only does gox
sr. member
Activity: 287
Merit: 250
Wait where do I set the trade I'm trying for a different coin not btc I think I just set it to the coin I want but than where do I put the price I want to buy and sell at

On BTC-e Gekko currently only supports BTC. You can read every supported currency pair per exchange here. There is a discussion about using a different data provider so that altcoins are supported on Github. But unfortunatly this is not possible yet.

ok i've set this up again now i get this
node gekko

/Users/chiznillen/gekko/config.js:28
 Monitor the live market
         ^^^
SyntaxError: Unexpected identifier
    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 (/Users/chiznillen/gekko/util.js:9:12)
    at Object. (/Users/chiznillen/gekko/util.js:66:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

Line 28 is a comment, this is so I can explain what the block below does. Comments always need a double slash in front of them. So you should change:

Code:
Monitor the live market

 to
 
Code:
// Monitor the live market

Note that Gekko is a very technical tool, if you are having a lot of trouble with editing configuration files and watching the command line instead of a screen with a graph I recommand you to check out these similar projects. They are more focused on a user friendly tool.


EDIT:

The API key and secret can be generated on the profile page on btce. Gekko only need trade rights.

Correction: gekko need trade and info right on BTC-e, so that it knows the size of the orders it needs to create.
Pages:
Jump to: