Update documentation

This commit is contained in:
Matthias 2019-11-17 10:31:21 +01:00
parent 671b98ecad
commit f7322358cf
4 changed files with 81 additions and 10 deletions

View File

@ -28,7 +28,7 @@ jobs:
name: pytest name: pytest
- script: - script:
- cp config.json.example config.json - 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 - freqtrade backtesting --datadir tests/testdata --strategy SampleStrategy
name: backtest name: backtest
- script: - script:

View File

@ -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. 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 ### Checklist on all tasks / possibilities in hyperopt
Depending on the space you want to optimize, only some of the below are required: Depending on the space you want to optimize, only some of the below are required:

View File

@ -7,24 +7,28 @@ indicators.
This is very simple. Copy paste your strategy file into the directory `user_data/strategies`. 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) 2. Start the bot with the param `--strategy AwesomeStrategy` (the parameter is the class name)
```bash ```bash
freqtrade trade --strategy AwesomeStrategy freqtrade trade --strategy AwesomeStrategy
``` ```
## Change your strategy ## Develop your own strategy
The bot includes a default strategy file. However, we recommend you to The bot includes a default strategy file.
use your own file to not have to lose your parameters every time the default Also, several other strategies are available in the [strategy repository](https://github.com/freqtrade/freqtrade-strategies).
strategy file will be updated on Github. Put your custom strategy file
into the directory `user_data/strategies`.
Best copy the test-strategy and modify this copy to avoid having bot-updates override your changes. You will however most likely have your own idea for a strategy.
`cp user_data/strategies/sample_strategy.py user_data/strategies/awesome-strategy.py` 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 ### Anatomy of a strategy

View File

@ -36,6 +36,70 @@ optional arguments:
└── sample_strategy.py └── 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/<strategyclassname>.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/<classname>.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 ## List Exchanges