From f7322358cf045621ee5cdde2b712af0248606503 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 17 Nov 2019 10:31:21 +0100 Subject: [PATCH] Update documentation --- .travis.yml | 2 +- docs/hyperopt.md | 3 ++ docs/strategy-customization.md | 22 +++++++----- docs/utils.md | 64 ++++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 39e914fa4..ec688a1f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ jobs: name: pytest - script: - cp config.json.example config.json - freqtrade create-userdir --userdir user_data + - freqtrade create-userdir --userdir user_data - freqtrade backtesting --datadir tests/testdata --strategy SampleStrategy name: backtest - script: diff --git a/docs/hyperopt.md b/docs/hyperopt.md index 8a750ef43..5a3ae7e3a 100644 --- a/docs/hyperopt.md +++ b/docs/hyperopt.md @@ -19,6 +19,9 @@ the sample hyperopt file located in [user_data/hyperopts/](https://github.com/fr Configuring hyperopt is similar to writing your own strategy, and many tasks will be similar and a lot of code can be copied across from the strategy. +The simplest way to get started is to use `freqtrade new-hyperopt --hyperopt AwesomeHyperopt`. +This will create a new hyperopt file from a template, which will be located under `user_data/hyperopts/AwesomeHyperopt.py`. + ### Checklist on all tasks / possibilities in hyperopt Depending on the space you want to optimize, only some of the below are required: diff --git a/docs/strategy-customization.md b/docs/strategy-customization.md index d0276579e..352389d5e 100644 --- a/docs/strategy-customization.md +++ b/docs/strategy-customization.md @@ -7,24 +7,28 @@ indicators. This is very simple. Copy paste your strategy file into the directory `user_data/strategies`. -Let assume you have a class called `AwesomeStrategy` in the file `awesome-strategy.py`: +Let assume you have a class called `AwesomeStrategy` in the file `AwesomeStrategy.py`: -1. Move your file into `user_data/strategies` (you should have `user_data/strategies/awesome-strategy.py` +1. Move your file into `user_data/strategies` (you should have `user_data/strategies/AwesomeStrategy.py` 2. Start the bot with the param `--strategy AwesomeStrategy` (the parameter is the class name) ```bash freqtrade trade --strategy AwesomeStrategy ``` -## Change your strategy +## Develop your own strategy -The bot includes a default strategy file. However, we recommend you to -use your own file to not have to lose your parameters every time the default -strategy file will be updated on Github. Put your custom strategy file -into the directory `user_data/strategies`. +The bot includes a default strategy file. +Also, several other strategies are available in the [strategy repository](https://github.com/freqtrade/freqtrade-strategies). -Best copy the test-strategy and modify this copy to avoid having bot-updates override your changes. -`cp user_data/strategies/sample_strategy.py user_data/strategies/awesome-strategy.py` +You will however most likely have your own idea for a strategy. +This Document intends to help you develop one for yourself. + +To get started, use `freqtrade new-strategy --strategy AwesomeStrategy`. +This will create a new strategy file from a template, which will be located under `user_data/strategies/AwesomeStrategy.py`. + +!!! Note + This is just a template file, which will most likely not be profitable out of the box. ### Anatomy of a strategy diff --git a/docs/utils.md b/docs/utils.md index d9baee32c..26d354206 100644 --- a/docs/utils.md +++ b/docs/utils.md @@ -36,6 +36,70 @@ optional arguments: └── sample_strategy.py ``` +## Create new strategy + +Creates a new strategy from a template similar to SampleStrategy. +The file will be named inline with your class name, and will not overwrite existing files. + +Results will be located in `user_data/strategies/.py`. + +### Sample usage of new-strategy + +```bash +freqtrade new-strategy --strategy AwesomeStrategy +``` + +With custom user directory + +```bash +freqtrade new-strategy --userdir ~/.freqtrade/ --strategy AwesomeStrategy +``` + +### new-strategy complete options + +``` output +usage: freqtrade new-strategy [-h] [--userdir PATH] [-s NAME] + +optional arguments: + -h, --help show this help message and exit + --userdir PATH, --user-data-dir PATH + Path to userdata directory. + -s NAME, --strategy NAME + Specify strategy class name which will be used by the + bot. +``` + +## Create new hyperopt + +Creates a new hyperopt from a template similar to SampleHyperopt. +The file will be named inline with your class name, and will not overwrite existing files. + +Results will be located in `user_data/hyperopts/.py`. + +### Sample usage of new-hyperopt + +```bash +freqtrade new-hyperopt --hyperopt AwesomeHyperopt +``` + +With custom user directory + +```bash +freqtrade new-hyperopt --userdir ~/.freqtrade/ --hyperopt AwesomeHyperopt +``` + +### new-hyperopt complete options + +``` output +usage: freqtrade new-hyperopt [-h] [--userdir PATH] [--hyperopt NAME] + +optional arguments: + -h, --help show this help message and exit + --userdir PATH, --user-data-dir PATH + Path to userdata directory. + --hyperopt NAME Specify hyperopt class name which will be used by the + bot. +``` ## List Exchanges