diff --git a/bin/gekko_launch.sh b/bin/gekko_launch.sh new file mode 100755 index 000000000..16e04740c --- /dev/null +++ b/bin/gekko_launch.sh @@ -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 + diff --git a/bin/gekko_launch_screen.sh b/bin/gekko_launch_screen.sh new file mode 100755 index 000000000..f1e88249c --- /dev/null +++ b/bin/gekko_launch_screen.sh @@ -0,0 +1,3 @@ +#!/bin/sh +screen -dmS gekko_$1 ~/gekko/bin/gekko_launch.sh $1 + diff --git a/bin/gekko_log_grab.sh b/bin/gekko_log_grab.sh new file mode 100755 index 000000000..bad586ca2 --- /dev/null +++ b/bin/gekko_log_grab.sh @@ -0,0 +1 @@ +tail -f ~/gekko/log/gekko_log.$1.txt diff --git a/bin/gekko_screen_grab.sh b/bin/gekko_screen_grab.sh new file mode 100755 index 000000000..88ff923ca --- /dev/null +++ b/bin/gekko_screen_grab.sh @@ -0,0 +1 @@ +screen -dR gekko_$1 diff --git a/docs/Advanced_features.md b/docs/Advanced_features.md index dafa3db3f..8a3ed23aa 100644 --- a/docs/Advanced_features.md +++ b/docs/Advanced_features.md @@ -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 @@ -55,11 +57,13 @@ 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: @@ -67,4 +71,16 @@ or a relative path: or a static path: - node gekko config=home/gekko/alternative-config \ No newline at end of file + 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`