Pages:
Author

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

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?
sr. member
Activity: 369
Merit: 250
Thank you very much for your informative answers.

Yeah I think I`ll have to wait to try your version because if this reason. I`ll be waiting for new updates and upgrades.
Quote
Basically, my version won't work as you expect if you need a bot which both can buy AND sell... At least not until the "sell" logic is fixed

No worries.

Mine isn't the only fork which is still being updated. Mostly I've seen a lot of other people who have focused on adding new features and exchanges, so hopefully because it's open source, people will continue to share their changes in good faith, and hopefully you'll find a version that does what you want.

[...] there are other forks than mine:

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

^ you can drag with a mouse and scroll along the timeline to see what all updates and such are taking place on the various branches and forks and such. (one of the nice features of github -- a good way to see who all has been updating, what exists, whenever new forks happen, etc.)

Note that most of the active forks are from after askmike left around 8 months ago.
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Thank you very much for your informative answers.

Yeah I think I`ll have to wait to try your version because if this reason. I`ll be waiting for new updates and upgrades.
Quote
Basically, my version won't work as you expect if you need a bot which both can buy AND sell... At least not until the "sell" logic is fixed
sr. member
Activity: 369
Merit: 250
I really appreciate that you put efford on this and still keep it AGPL

I`m not a technical guy when it comes down to Linux, servers or coding so I have some n00b questions.

Does your version
1- support only cex.io? Can I not use it for bitstamp?
2- have other trading methods like Dema, macd etc? I just didnt understand what is exactly buy and hold
3- Do I need a server to run your script? Right now I use a regular ubuntu and just installed the askmike version on it. It runs ok for now.

I'm gonna reply to this in reverse order:

#3 When I mentioned server administration, I meant for the purposes of reliable, uninterrupted operation. Technically you could run it on your laptop or home PC or whatever since it's based on node.js and doesn't actually need to be a server environment. The main issue is that the bot REQUIRES uninterrupted historical price data, and if there are any gaps because you turn it off it has to start over and gather another N minutes or hours of non-corrupt gapless history before it can start trading or giving advice again (50 hours for askmike's version, or 39.083 hours for mine --- both versions are configurable, but that's the default for the latest version)

#2 I left all of the original methods from askmike's version, but I added a "zero lag" method which is functionally equivalent to work done by Patrick Malloy from at or around the year 1994 (I changed to a default 1 minute intervals while developing this) Most of the trading methods on gekko are based around math which can be used at 1 minute intervals just as easily as 1 day intervals.

#1 Huh -- I haven't tested any exchanges other than cexio. You can probably use Askmike's version. I think it still works, but there's just a bug or two which isn't in that version.. Another thing to consider is that askmike's version uses a default setting of 60 minute (1 hour) candles, and 50 hours worth of history before it starts trading (the latest version of my fork uses less history, but it's been tested and is based around 1 minute candles and can react faster)


Warning: I decided to intentionally break the code related to SELLING assets. No matter what trading method you use, my version waits for a good price and then buys new GHS (or other assets / currency pairs)

... I made this decision because GHS will continue to mine new coins if you hold. This difference from askmike's version can be made configurable, but for now it's hardcoded. Basically, my version won't work as you expect if you need a bot which both can buy AND sell... At least not until the "sell" logic is fixed (by making the behavior configurable, probably. A lot of the bugs in askmike's version were because each time a change was made, it only ended up tested with 1 or 2 trading methods or exchanges, and caused something to break for other usage cases than the one being tested.)
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
I really appreciate that you put efford on this and still keep it AGPL

I`m not a technical guy when it comes down to Linux, servers or coding so I have some n00b questions.

Does your version
1- support only cex.io? Can I not use it for bitstamp?
2- have other trading methods like Dema, macd etc? I just didnt understand what is exactly buy and hold
3- Do I need a server to run your script? Right now I use a regular ubuntu and just installed the askmike version on it. It runs ok for now.
sr. member
Activity: 369
Merit: 250
I`m kinda confused on this now. I downloaded and currently using the one shared on
https://github.com/askmike/gekko

Should I not use this? and switch to your version?
Why? What are the differences?

Mainly it's that askmike's version hasn't been updated (bugfixes, features, or otherwise) in over 8 months. Askmike left and hasn't returned, and hasn't been accepting pull requests or otherwise given anyone commit access to the repo. When I forked gekko a few months ago, I was doing it because I wanted to fix bugs and add features --  One of the main bugs I fixed was related to how the history is stored and used when a history size of greater than 24 hours is used. (askmike's version from 8 months ago had a major bug and can't correctly load history databases if a window of larger than 24 hours is needed)

WARNING: I've only been supporting cex.io automatic reinvestment to buy more GHS. The way I redesigned is for a reinvestment-type "buy and hold" strategy. I've been doing this in my spare time, but the latest version is finally stable and works as intended so I can probably move on to adding other strategies than the current "buy and hold" reinvestment code.

Last difference is that all the changes in my version are AGPL instead of MIT license. Moving forward I'd prefer to keep my fork as AGPL licensed. I really believe in the idea of making sure people have the source code to their trading engine ESPECIALLY in cases where it's hosted as a managed service. (not everyone has the experience or technical knowledge to run and maintain their own server, but that's no excuse to deny them access to audit the changes made to the source code. This is an important feature of the AGPL license which I strongly believe in)
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
I`m kinda confused on this now. I downloaded and currently using the one shared on
https://github.com/askmike/gekko

Should I not use this? and switch to your version?
Why? What are the differences?
sr. member
Activity: 369
Merit: 250
There's a new version...


currently same as:




Code:
window: 2345, // SHOULD NOT be larger than your historySize!!!

^ that new line / comment is a hint which should hopefully help to prevent confusion and misconfiguration

Not much has changed, other than making sure that the settings it ships with are sane and actually work right.



The exact changes for anyone who wants to see what they're getting:

https://github.com/kuzetsa/gekko/compare/kuzetsa:427e0373d96a864d3afb7e4c0d8c616c36f0552a...config.fix
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Cool. Thank you.
sr. member
Activity: 369
Merit: 250
Should we actually install this for the bot?
Do we need it?
https://github.com/rvagg/node-levelup

No.

You do not need that.

That is not a dependency for gekko.



Of the things which ARE dependencies for gekko, you shouldn't even be manually installing any of these:

Code:
 "dependencies": {
    "cryptsy-api": "0.1.x",
    "mtgox-apiv2": "1.1.x",
    "lodash": "2.x",
    "moment": "2.4.x",
    "btc-e": "0.0.x",
    "cexio": "0.0.x",
    "bitstamp": "0.1.x",
    "async": "0.2.x",
    "nedb": "0.9.4",
    "line-reader": "0.2.x",
    "semver": "2.2.1",
    "kraken-api" :"0.1.x"
  }

^ if you're using gekko, all you have to do is unzip the package and type this command:

Code:
npm install

It installs all the dependencies for you.

The reason for using the "npm" command is because the node.js programming language comes with its own package manger.

The "node package manager" is what npm stands for, hence the command you would use is called: "npm install"

The dependencies are handled automatically because they're configured in the package.json file for use with the install command (you shouldn't need to automatically install any of those in order to use gekko. Just use "npm install" and you're ready to go)
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Should we actually install this for the bot?
Do we need it?
https://github.com/rvagg/node-levelup
sr. member
Activity: 369
Merit: 250
Nevermind. I solved the issue and thought I should let others know.

If you use Ubuntu, the command to start the script is not node gekko but It`s
sudo nodejs gekko

gekko with a standard node.js installation has never required sudo.

ubuntu is doing something wrong to break your node.js if it disabled the node command and changed the command to nodejs

perhaps you should check and confirm that ubuntu isn't adding "node" to your environment / path...

I don't use ubuntu, nor do I know how they like to do things otherwise I'd file a bug with your distro.



commands to check and make sure it's in your path:

Code:
kuzetsa@yurizoku ~ $ which node
/usr/bin/node
kuzetsa@yurizoku ~ $ which nodejs
which: no nodejs in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.9.1)
kuzetsa@yurizoku ~ $

^ I have no idea what that "nodejs" even is, but if it requires sudo to use I'd recommend fixing your path
(and/or possibly uninstalling the ubuntu nodejs all together, since it's naughty and demands more privileges than it needs)

you SHOULD NOT need to use sudo.

If you chose to use gekko via the the ubuntu-provided "nodejs" command, you're doing so at your own risk.
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
Nevermind. I solved the issue and thought I should let others know.

If you use Ubuntu, the command to start the script is not node gekko but It`s
sudo nodejs gekko
sr. member
Activity: 472
Merit: 254
Anlik Coin Fiyatlari BTCkur.com
I write node gekko and press enter but it does nothing. It just gives me another line to put a command again in ubuntu
sr. member
Activity: 369
Merit: 250
Sorry for the ignorance .. but what is the minimum deposit because gekko start trading ?


Most exchanges have a minimum, but gekko itself can handle very small amounts.

Also, keep in mind that for a lot of exchanges, a microtrade smaller than 0.000002 bitcoin (200 satoshi) or less would be a bad thing since the fees are usually rounded up to the nearest satoshi (8 decimal places) and the lowest fee possible is 1 satoshi (0.00000001 BTC)

Either way, it'll work with 0.00000235 bitcoin just as easily as 5000 bitcoin, though I'd recommend start with less than 5k BTC
(that was meant as a joke, testing with over a million USD is a bit crazy).
sr. member
Activity: 369
Merit: 250
Is anyone still running this project?

I'll be resuming work soon...

I haven't updated anything in over a month though.



Also, there are other forks than mine:

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

^ you can drag with a mouse and scroll along the timeline to see what all updates and such are taking place on the various branches and forks and such. (one of the nice features of github -- a good way to see who all has been updating, what exists, whenever new forks happen, etc.)
sr. member
Activity: 462
Merit: 253
Is anyone still running this project?
newbie
Activity: 43
Merit: 0
i've made a small web interface for it.

screenshot: https://www.dropbox.com/s/od0ac7djvvdyrps/gekkoweb.png
source: https://www.dropbox.com/s/54y2crazfnyghnd/gekko.zip

i am not familiar with npm or node. so you have to install a few dependencies by hand (eg npm install express).

there are currently some drawbacks:
 - portfolio is only updated after a successfull buy or sell
 - web interface does work as soon as a the first advice is made.
 - only ema does work as the web if does show some internal data from it

i use it in "advanced mode" using data from mtgox and trading on mtgox and btce (but only with small amounts)

i did not test it with other configurations, so use it at your own risk (i am not responsiple for any losses etc).

as this is a pure personal project i dont think i'll make other extensions, but i am always open for suggestions

regards
flower

sorry for double post, but want to bump this thread with a question - does anyone have this package that is mentioned above? the dropbox URLs are dead.
newbie
Activity: 43
Merit: 0

WHAT IS that method in the DEMA.js? I do not know what that code even is. It is not using a "double EMA" of any kind, and I can't seem to find any sort of indicator based on that sort of algorithm. This is how it works:

Code:
~pseudocode~

Calculate a fast and slow EMA average

A = subtract one from the other

B = add one to the other, and divide it by 2

C = 100 times A divided B

based on the value of C, assume positive values mean an uptrend, and negative values mean a downtrend

I ... don't even know what that is. It is not called "DEMA" though I don't think, I've never seen any TA indicator which does that particular combination of things to two different EMAs...

I could have updated the ticket with more info after fixing the PPO code, but was tired last night... PPO has been audited and is now consistent with the new codebase, and I added the x2MACD now as well (which worked correctly overnight) -- updated: https://github.com/kuzetsa/gekko/issues/3


maybe you still have not found it, but it is in gekko documentation:

Code:
### DEMA

This method uses `Exponential Moving Average crossovers` to determine the current trend the
market is in. Using this information it will suggest to ride the trend. Note that this is
not MACD because it just checks whether the longEMA and shortEMA are [threshold]% removed
from eachother.

This method is fairly popular in bitcoin trading due to Bitcointalk user Goomboo. Read more about this method in [his topic](https://bitcointalk.org/index.php?topic=60501.0)

You can configure these parameters for DEMA in config.js:

    config.DEMA = {
      // EMA weight (α)
      // the higher the weight, the more smooth (and delayed) the line
      short: 10,
      long: 21,
      // amount of candles to remember and base initial EMAs on
      // the difference between the EMAs (to act as triggers)
      thresholds: {
        down: -0.025,
        up: 0.025
      }
    };

- short is the short EMA that moves closer to the real market (including noise)
- long is the long EMA that lags behind the market more but is also more resistant to noise.
- the down treshold and the up treshold tell Gekko how big the difference in the lines needs to be for it to be considered a trend. If you set these to 0 each line cross would trigger new advice.
legendary
Activity: 1974
Merit: 1077
Honey badger just does not care
Edited to add:

Holy crap, I was curious and trying to translate that russian URL into english, and once I converted the %20 into spaces, noticed that
it says: [ S&C on DVD 11.26 ]

Thanks so much, I'm gonna get a copy of that DVD -- I hate hard copies they take up way too much space and are just awful to keep in good condition long-term... Turns out, apparently, that Фaйлы is russian for "files"

That's a complete contents of the DVD 11.26 version. For those who would like to purchase a US$ 395 copy of the newest 12.27 version here's the link:
http://www.traders.com/Documentation/DVD_adpage/DVDrom.html

In both cases there's a *lot* of useful info there. I've found some quality descriptions of many indicators and their specific implementations.
Pages:
Jump to: