Pages:
Author

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

sr. member
Activity: 369
Merit: 250
(...snip...)

If there was an easy way to implement new exchanges I could add couple.

"An easy way" --- Actually, there is -- the only thing needed is an API wrapper.

Both askmike's current design, as well as my fork of Gekko is modular, so all the logic to trade on one exchange with a particular method works the same no matter which exchange or which currencies are being used. (Example: Originally the bot was developed for mtgox, but gekko works the same no matter what API wrapper you use.)

The code to talk to the exchange (API wrapper) really doesn't do much other than providing the abstraction logic which translates the internal names used in gekko's code for doing different things (buy, sell, check balance, etc. etc. etc.) to whatever the names might be for how the developers at the exchanges decided to name it in their API.

Actually, here's a flowchat diagram thingy which might help to understand the concept:


sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Quote
Either way, he's back so there might be new features coming to askmike's gekko repo.
That is wonderful

and about the fees not being included in coding, that`s definitely a smart idea I never thought about. Bitstamp charges about 0.3 or 0.5 percent which is more than BTC-e but right now I dont really wanna change the source as I do my manual trading in BTC-e and I wont open an account in Bitfinex as they ask for too much information which doesnt sound fair nor right to give away to a BTC exchange company.

If there was an easy way to implement new exchanges I could add couple. But these kinda coding I`m so not familiar with.
Anyways, as always thx for your help tho.
sr. member
Activity: 369
Merit: 250
(...snip...)
I mean It doesnt really make money. It gets less and less everyday but it works at least.

(...snip...)

So far it came down from 0.5 BTC to 0.41 BTC

Yeah, for FIAT trades it tries to increase your portfolio value in dollars or whatever currency you're using... It still shouldn't lose so much money like that. Maybe it was because the exchange you're using has high fees? Buy and hold (just holding BTC since the value has increased over the years) is often better in some cases though, particularly in cases where the bot parameters aren't tuned right.

Speaking of fees...

I'm pretty sure askmike never added any logic which checks to make sure the hypothetical gains will be higher than whatever fees the exchange is charging. Actually, this is a major issue since many exchanges charge a percentage based on the size of your trade, and askmike never added a feature to gekko's engine to have the option to do a smaller trade than "buy/sell as much as possible"

I had a talk with askmike the other day on IRC and this came up:

Code:
[08:31:50] <@askmike> amount < available is true when a user
   has 10 BTC but the sell order only wants to sell 1BTC

[08:31:57] <@askmike> it seems you are irght

[08:31:59] <@askmike> right*

[08:32:35] <@askmike> though at this moment I am not sure how
   amount is calculated (pretty sure Gekkot tries to sell all
   of you assets, so it should equal available. Right?

^ we were actually looking at a bug unrelated to fees...
Either way, he's back so there might be new features coming to askmike's gekko repo.
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Yeah I didnt do through the instructions as I dont have any problem with the process either. Even with that error and another error in the beginin of the process saying the amoun is too small, I still get the bot working fine. I mean It doesnt really make money. It gets less and less everyday but it works at least.

I tried DEMA
and then now I`m trying MACD with the above suggested settings
So far it came down from 0.5 BTC to 0.41 BTC

We`ll see.
Experience is always the most expensive type of lesson you get in life Smiley
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Quote
^ What version are of node.js are you using?

I updated all right because I start the bot. So the nodejs and everything should be up to date.

I havent checked your instructions yet but I`ll apply and let you know. Thank you.
sr. member
Activity: 369
Merit: 250
Hey i get this error sometimes

"Possible EventEmitter memory leak detected"

What is it and how can i fix this?
I run the bot in macd, Ubuntu on a laptop

Not sure, I've never seen that error on mine.

Code:
kuzetsa@yurizoku ~ $ gcc --version
gcc (Gentoo 4.9.2 p1.0, pie-0.6.1) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

kuzetsa@yurizoku ~ $ node --version
v0.10.33

^ What version are of node.js are you using?

I'm certain that gekko runs fine on the latest version of node.js built with a recent compiler. With the latest version it's very stable for me (I compiled my node.js binary using gcc 4.9.2... I think an error like that could possibly be related to the ancient compiler toolchain the ubuntu devs use to build packages)



Edited to add:

I feel no remorse about disliking ubuntu, but it's not your fault they ship an ancient version of node
(I just checked -- it looks like ubuntu really might include node.js version is v0.10.25 or older...
That's from nearly a year ago so please don't use that with gekko
)

If you don't want to manually build node.js from source, there's a handy tool called "node version manager"

Official README for NVM

^ TL;DR

... you can install NVM like this if you just want to use it and don't care how it works:

Quote
To install you could use the install script using cURL:

Code:
curl https://raw.githubusercontent.com/creationix/nvm/v0.18.0/install.sh | bash

Afterward, the relevant instructions are here:

"usage" section of the readme

Quote
To download, compile, and install the latest v0.10.x release of node, do this:

Code:
nvm install 0.10
And then in any new shell just use the installed version:

Code:
nvm use 0.10
Or you can just run it:

Code:
nvm run 0.10 --version
Or, you can run any arbitrary command in a subshell with the desired version of node:

Code:
nvm exec 0.10 node --version



I'm sorry for almost saying bad things about ubuntu and not actually helping. That wasn't cool.

... I haven't personally found NVM to be a helpful tool because I just build mine from source and it's easy to get the latest version with gentoo. Ubuntu makes it harder, but there's NVM specifically for making it easier to get a non-ancient version on distros which don't provide a non-ancient version, so hopefully this info helps.
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Hey i get this error sometimes

"Possible EventEmitter memory leak detected"

What is it and how can i fix this?
I run the bot in macd, Ubuntu on a laptop
sr. member
Activity: 369
Merit: 250
Cool. Thx a lot

But I have .4 BTC in bitstamp. How come it says amount is too small?
I dont get it

What I think happened was that the market conditions were in a state where your gekko was trying to buy more bitcoin but your portfolio was out of FIAT currency and so it couldn't buy more... I'm pretty sure whenever it says "buy" it's trying to spend money to buy bitcoin.
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Cool. Thx a lot

But I have .4 BTC in bitstamp. How come it says amount is too small?
I dont get it
sr. member
Activity: 369
Merit: 250
Can someone give me some info about these DEMA settings and how should I set them to make money?
Also my bot keeps saying "Wanted to buy but the amount is too small" the amount of what? What should I do?

That specific error message is because there's a minimum amount for trade, but you didn't have enough funds or assets available in your portfolio on the exchange. You can look in exchanges.js for the minimum values on whatever exchange(s) you're planning on trading on.

I don't have any advice on how to configure DEMA...

I recommend switching to MACD.

The standard values which a lot of people have good luck with is:

Short @ 12
Long @ 26
Signal @ 9

If you want to see what those values do, a good way to visualize and look at historical data is by looking at old charts on a site like bitcoin wisdom.

https://bitcoinwisdom.com/markets/bitfinex/btcusd << the default MACD settings are 12 26 9 so just turn on the MACD indicator and have a look (it'll show up at the bottom once you enable it)

Note: bitfinex currently looks like it might be the exchange with the most volume at this time...

askmike just accepted a pull request for bitfinex support too, so you can even use it with gekko Smiley

I hope this info helps.
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Can someone give me some info about these DEMA settings and how should I set them to make money?
Also my bot keeps saying "Wanted to buy but the amount is too small" the amount of what? What should I do?
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
No problem. That's fine.
I respect that.
sr. member
Activity: 369
Merit: 250
But yours dont really trade. It only buys.

Do you think we can integrate your method to askmikes ?
Would that be easy?

Yes, that's fine. The technical skill required to add it wouldn't be hard.

However...

http://www.gnu.org/licenses/index.html

Quote from: GNU.org ~ description of GNU Affero General Public License
The GNU Affero General Public License is based on the GNU GPL, but has an additional term to allow users who interact with the licensed software over a network to receive the source for that program. We recommend that people consider using the GNU AGPL for any software which will commonly be run over a network. The latest version is version 3.

Copy of the AGPLv3 license as included in my fork

TL;DR / Translation: Please don't steal it; I want my work, and any modifications or derivative version to remain open source...

Specifically, I mention the AGPL license because I expect application service providers who use a modified version of my work comply with the license, and the source code should remain available for any modified versions if it was changed in any way for use as a "hosted application" (cloud service or any other term with a similar meaning)



Though as far as my own version is concerned, the modifications for "only reinvest or otherwise buy" could be made configurable. The hardcoded change was a bad idea.

My bad. Sorry about that.
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
But yours dont really trade. It only buys.

Do you think we can integrate your method to askmikes ?
Would that be easy?
sr. member
Activity: 369
Merit: 250
Is there a minimum account balance or trade amount for this bot?
I have put .5 BTC to test it out in Bitstamp and it always uses the whole amount for buying/selling. It doesnt use only part of it for every opportunity. Is this normal?

Yes, that's normal. That's the way askmike designed it.

(...snip...)


Well so far It`s not really doing a good job. It has been working for about 2-3 days and .5 BTC has become .4 BTC now


Yeah I know... None of the methods in askmike's version check to make sure trades happen at a better price than the average price over the past periods --- That's why I wrote a trading method which actually tracks to make sure the trades happen at a good price:

The "stats window" functionality of the zero method is explicitly to make sure the price isn't worse than the average trading price over the past periods (candles)
sr. member
Activity: 369
Merit: 250
also when we wanna update this script from github what is the command to do that in console?

Here's an example of the remote tracked repositories (on github) I've been using for development of my own fork...

Code:
kuzetsa@yurizoku ~/gitstuffs/gekko $ git remote -v
dowjames        https://github.com/dowjames/gekko.git (fetch)
dowjames        https://github.com/dowjames/gekko.git (push)
gekko   https://github.com/askmike/gekko.git (fetch)
gekko   https://github.com/askmike/gekko.git (push)
origin  [email protected]:kuzetsa/gekko.git (fetch)
origin  [email protected]:kuzetsa/gekko.git (push)
kuzetsa@yurizoku ~/gitstuffs/gekko $ git pull origin HEAD:master
Already up-to-date.

^ That "pull" command in the example would fetch the latest version from my own fork.

WARNING:

If you do something like that you're pulling the version from the repository and overwriting whatever you have locally. This will overwrite your config.js and probably shouldn't be used on a live gekko installation (running OR stopped, either one is bad and it doesn't matter which) unless you know how to use git well enough to disable synchronization of certain files...

Your best bet is probably just to download a ZIP from here:

https://github.com/kuzetsa/gekko/releases

Or alternatively, one of askmike's:

https://github.com/askmike/gekko/releases

... oh, that's weird. There aren't any releases / tags in there for some reason.



...Actually it looks like he's back, and maybe even accepting pull requests?

https://github.com/askmike/gekko/commits/master

^ maybe he's working on it again.

...I don't know?

sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Is there a minimum account balance or trade amount for this bot?
I have put .5 BTC to test it out in Bitstamp and it always uses the whole amount for buying/selling. It doesnt use only part of it for every opportunity. Is this normal?

Yes, that's normal. That's the way askmike designed it.









Does this bot also work for exchange like Coin-swap.net? Its a really nice tool to have and I am thinking of going into trading soon.

Someone made a node.js wrapper for the REST APIs for coinswap, but I don't have an account with that exchange so I wouldn't be able to add it to gekko. If anyone wants to look into it, try and add (or find) a NPM module and see if they can get it working in gekko:

https://github.com/defcronyke/NodeJS-Coin-Swap-v2


Well so far It`s not really doing a good job. It has been working for about 2-3 days and .5 BTC has become .4 BTC now
sr. member
Activity: 369
Merit: 250
Is there a minimum account balance or trade amount for this bot?
I have put .5 BTC to test it out in Bitstamp and it always uses the whole amount for buying/selling. It doesnt use only part of it for every opportunity. Is this normal?

Yes, that's normal. That's the way askmike designed it.









Does this bot also work for exchange like Coin-swap.net? Its a really nice tool to have and I am thinking of going into trading soon.

Someone made a node.js wrapper for the REST APIs for coinswap, but I don't have an account with that exchange so I wouldn't be able to add it to gekko. If anyone wants to look into it, try and add (or find) a NPM module and see if they can get it working in gekko:

https://github.com/defcronyke/NodeJS-Coin-Swap-v2
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
also when we wanna update this script from github what is the command to do that in console?
sr. member
Activity: 294
Merit: 250
Does this bot also work for exchange like Coin-swap.net? Its a really nice tool to have and I am thinking of going into trading soon.
Pages:
Jump to: