1 | If you want to get the maximum out of Gekko you can look through this list to find some more advanced options.
|
2 |
|
3 | Advanced options:
|
4 |
|
5 | * [Running Gekko headlessly](#running-gekko-headlessly)
|
6 | * [Specify a config file](#specify-a-config-file)
|
7 |
|
8 | # Running Gekko headlessly
|
9 |
|
10 | Gekko is a nodejs application, this means that you can use tools for node to automatically keep Gekko running. On Unix system node applications run as normal applications: logging goes to `stdout` and errors go to `sterr`, this means you can use normal Unix tools to run Gekko silently in the background:
|
11 |
|
12 | ## Run Gekko using Unix tools
|
13 |
|
14 | You could use [nohup](http://linux.die.net/man/1/nohup) with output redirection or [screen](http://www.gnu.org/software/screen/manual/screen.html)
|
15 |
|
16 | ### With [nohup](http://linux.die.net/man/1/nohup)
|
17 |
|
18 | nohup node gekko &> output.log &
|
19 |
|
20 | You will now find all your output in output.log, the process is put in the backround and it is safe to log out from your session.
|
21 | If you want to track the output in real-time you can always use [tail](http://unixhelp.ed.ac.uk/CGI/man-cgi?tail).
|
22 |
|
23 | tail -fn100 output.log
|
24 |
|
25 | If you want to shutdown Gekko you have to kill the process (or reboot your pc for example). To kill the process you need to find the PID. If you enter `ps ax | grep gekko` in a terminal it will list out everything 'gekko' that is running:
|
26 |
|
27 | 3486 pts/0 S+ 0:00 grep gekko
|
28 | 13310 ? Sl 0:04 node gekko.js
|
29 |
|
30 | This means that `3486` is the PID of the command we just ran, and `13310` is the PID of the running Gekko. To kill it just run `kill 13310`.
|
31 |
|
32 | ### With [screen](http://www.gnu.org/software/screen/manual/screen.html)
|
33 |
|
34 | screen -S gekko-seesion
|
35 | node gekko
|
36 |
|
37 | Then just detach your session with <Ctrl>+<a> followed by <Ctrl>+<d>.
|
38 |
|
39 | In order to list your active screen sessions just hit
|
40 |
|
41 | screen -ls
|
42 | There is a screen on:
|
43 | 57359.gekko-session (Detached)
|
44 | 1 Socket in /tmp/screens/S-lockdoc.
|
45 |
|
46 | To re-attach this session use the following command
|
47 |
|
48 | screen -dr 57359
|
49 |
|
50 | ## Run Gekko using nodejs tools
|
51 |
|
52 | You can also use nodejs tools to keep Gekko running, this should work cross platform (so also on Windows). I would advice to look at [Forever](https://github.com/nodejitsu/forever) and [Supervisor](https://github.com/isaacs/node-supervisor). Alternatively you look at a couple of more alternatives [described on Stackoverflow](http://stackoverflow.com/questions/12701259/how-to-make-a-node-js-application-run-permanently).
|
53 |
|
54 | # Specify a config file
|
55 |
|
56 | You can tell Gekko what config file to use to make it easier to run Gekko more times on different exchanges, while watching each exchange. (If you configure Gekko to trade on all exchanges while only watching Mt. Gox in one single config file, Gekko will base all buy/sell actions on all exchanges based on the trends at Mt. Gox).
|
57 |
|
58 | You can also use this feature to do a realtime study on what different EMA settings would generate the most profit.
|
59 |
|
60 | To specify a different config file, you can use the following command line argument:
|
61 |
|
62 | node gekko config=alternative-config
|
63 |
|
64 | or a relative path:
|
65 |
|
66 | node gekko config=../../alternative-config
|
67 |
|
68 | or a static path:
|
69 |
|
70 | node gekko config=home/gekko/alternative-config |
\ | No newline at end of file |