Add documentation for user_data_dir

This commit is contained in:
Matthias 2019-07-28 15:34:49 +02:00
parent 73ac98da80
commit c1bc1e3137
2 changed files with 38 additions and 13 deletions

View File

@ -9,38 +9,43 @@ This page explains the different parameters of the bot and how to run it.
## Bot commands ## Bot commands
``` ```
usage: freqtrade [-h] [-v] [--logfile FILE] [--version] [-c PATH] [-d PATH] usage: freqtrade [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
[-s NAME] [--strategy-path PATH] [--db-url PATH] [--userdir PATH] [-s NAME] [--strategy-path PATH]
[--sd-notify] [--db-url PATH] [--sd-notify]
{backtesting,edge,hyperopt} ... {backtesting,edge,hyperopt,create-userdir,list-exchanges} ...
Free, open source crypto trading bot Free, open source crypto trading bot
positional arguments: positional arguments:
{backtesting,edge,hyperopt} {backtesting,edge,hyperopt,create-userdir,list-exchanges}
backtesting Backtesting module. backtesting Backtesting module.
edge Edge module. edge Edge module.
hyperopt Hyperopt module. hyperopt Hyperopt module.
create-userdir Create user-data directory.
list-exchanges Print available exchanges.
optional arguments: optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages). -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--logfile FILE Log to the file specified --logfile FILE Log to the file specified.
-V, --version show program's version number and exit -V, --version show program's version number and exit
-c PATH, --config PATH -c PATH, --config PATH
Specify configuration file (default: None). Multiple Specify configuration file (default: `config.json`).
--config options may be used. Can be set to '-' to Multiple --config options may be used. Can be set to
read config from stdin. `-` to read config from stdin.
-d PATH, --datadir PATH -d PATH, --datadir PATH
Path to backtest data. Path to backtest data.
--userdir PATH, --user-data-dir PATH
Path to Userdata Directory.
-s NAME, --strategy NAME -s NAME, --strategy NAME
Specify strategy class name (default: Specify strategy class name (default:
DefaultStrategy). `DefaultStrategy`).
--strategy-path PATH Specify additional strategy lookup path. --strategy-path PATH Specify additional strategy lookup path.
--db-url PATH Override trades database URL, this is useful if --db-url PATH Override trades database URL, this is useful in custom
dry_run is enabled or in custom deployments (default: deployments (default: `sqlite:///tradesv3.sqlite` for
None). Live Run mode, `sqlite://` for Dry Run).
--sd-notify Notify systemd service manager. --sd-notify Notify systemd service manager.
``` ```
### How to use a different configuration file? ### How to use a different configuration file?
@ -82,6 +87,25 @@ of your configuration in the project issues or in the Internet.
See more details on this technique with examples in the documentation page on See more details on this technique with examples in the documentation page on
[configuration](configuration.md). [configuration](configuration.md).
### Where to store custom data
Freqtrade allows the creation of a user-data directory using `freqtrade create-userdir --userdir someDirectory`.
This directory will look as follows:
user_data/
├── backtest_results
├── data
├── hyperopts
├── plot
└── strategies
You can add the entry "user_data_dir" to your configuration, to always point your bot to this folder.
Alternatively, pass in `--userdir` to every command.
This directory should contain your custom strategies, custom hyperopts, backtest data (downloaded using either backtesting or the download script) and plot outputs.
It is reccomendet to use version control to keep track of changes to your strategies.
### How to use **--strategy**? ### How to use **--strategy**?
This parameter will allow you to load your custom strategy class. This parameter will allow you to load your custom strategy class.

View File

@ -71,6 +71,7 @@ Mandatory Parameters are marked as **Required**.
| `internals.process_throttle_secs` | 5 | **Required.** Set the process throttle. Value in second. | `internals.process_throttle_secs` | 5 | **Required.** Set the process throttle. Value in second.
| `internals.sd_notify` | false | Enables use of the sd_notify protocol to tell systemd service manager about changes in the bot state and issue keep-alive pings. See [here](installation.md#7-optional-configure-freqtrade-as-a-systemd-service) for more details. | `internals.sd_notify` | false | Enables use of the sd_notify protocol to tell systemd service manager about changes in the bot state and issue keep-alive pings. See [here](installation.md#7-optional-configure-freqtrade-as-a-systemd-service) for more details.
| `logfile` | | Specify Logfile. Uses a rolling strategy of 10 files, with 1Mb per file. | `logfile` | | Specify Logfile. Uses a rolling strategy of 10 files, with 1Mb per file.
| `user_data_dir` | cwd()/user_data | Folder containing user data. Defaults to `./user_data/`.
### Parameters in the strategy ### Parameters in the strategy