Skip to content

Commit

Permalink
added helper shell scripts to launch gekko with user config files
Browse files Browse the repository at this point in the history
  • Loading branch information
streetlogics authored and askmike committed Dec 22, 2013
1 parent 424ab7f commit b2110e6
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
12 changes: 12 additions & 0 deletions bin/gekko_launch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# navigate to gekko folder, change this if your location is different
cd ~/gekko

# zip previous log files for this config
zip -vu log/gekko_logs.zip log/gekko_log.$1*.txt

# remove raw text files now that they're zipped
rm log/gekko_log.$1*.txt

# finally launch gekko and log output to log file as well as stdout
node gekko config="config/user/$1.js" 2>&1 | tee log/gekko_log.$1.txt

3 changes: 3 additions & 0 deletions bin/gekko_launch_screen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
screen -dmS gekko_$1 ~/gekko/bin/gekko_launch.sh $1

1 change: 1 addition & 0 deletions bin/gekko_log_grab.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tail -f ~/gekko/log/gekko_log.$1.txt
1 change: 1 addition & 0 deletions bin/gekko_screen_grab.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
screen -dR gekko_$1
20 changes: 18 additions & 2 deletions docs/Advanced_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ In order to list your active screen sessions just hit
To re-attach this session use the following command

screen -dr 57359



## Run Gekko using nodejs tools

Expand All @@ -55,16 +57,30 @@ You can also use nodejs tools to keep Gekko running, this should work cross plat

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).

The repo has some example config files in config/examples. When you check the repository, there will also be a folder called /config/user, which is setup to ignore all files in the directory using .gitignore. It is recommended to place your config files here to avoid issues when pulling in the latest updates.

You can also use this feature to do a realtime study on what different EMA settings would generate the most profit.

To specify a different config file, you can use the following command line argument:

node gekko config=alternative-config
node gekko config=config/user/alternative-config

or a relative path:

node gekko config=../../alternative-config

or a static path:

node gekko config=home/gekko/alternative-config
node gekko config=home/gekko/config/user/alternative-config

# Helper files

In the bin folder, you will find various helper methods.

Use `gekko_launch.sh` to launch a gekko instance using a provided config file param from the config/user folder. The syntax for this is simply `bin/gekko_launch.sh alternative-config`

Use `gekko_launch_screen.sh` to launch a headless instance of gekko using the outlined methods from above. The syntax is `bin/gekko_launch_screen.sh alternative-config`

Use `gekko_screen_grab.sh` to grab the screen for the config. The syntax is `bin/gekko_screen_grab.sh alternative-config`

Use `gekko_log_grab.sh` to start tailing the log instead of via screen. The syntax is `bin/gekko_log_grab.sh alternative-config`

0 comments on commit b2110e6

Please sign in to comment.