Merge pull request #1696 from freqtrade/docs/1521

Update documentation with correct way of calling
This commit is contained in:
Misagh 2019-03-24 17:06:46 +01:00 committed by GitHub
commit fe3836b497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 50 additions and 36 deletions

View File

@ -33,11 +33,11 @@ jobs:
name: pytest name: pytest
- script: - script:
- cp config.json.example config.json - cp config.json.example config.json
- python freqtrade/main.py --datadir freqtrade/tests/testdata backtesting - python freqtrade --datadir freqtrade/tests/testdata backtesting
name: backtest name: backtest
- script: - script:
- cp config.json.example config.json - cp config.json.example config.json
- python freqtrade/main.py --datadir freqtrade/tests/testdata hyperopt -e 5 - python freqtrade --datadir freqtrade/tests/testdata hyperopt -e 5
name: hyperopt name: hyperopt
- script: flake8 freqtrade - script: flake8 freqtrade
name: flake8 name: flake8

View File

@ -24,37 +24,37 @@ The backtesting is very easy with freqtrade.
#### With 5 min tickers (Per default) #### With 5 min tickers (Per default)
```bash ```bash
python3 ./freqtrade/main.py backtesting python3 freqtrade backtesting
``` ```
#### With 1 min tickers #### With 1 min tickers
```bash ```bash
python3 ./freqtrade/main.py backtesting --ticker-interval 1m python3 freqtrade backtesting --ticker-interval 1m
``` ```
#### Update cached pairs with the latest data #### Update cached pairs with the latest data
```bash ```bash
python3 ./freqtrade/main.py backtesting --refresh-pairs-cached python3 freqtrade backtesting --refresh-pairs-cached
``` ```
#### With live data (do not alter your testdata files) #### With live data (do not alter your testdata files)
```bash ```bash
python3 ./freqtrade/main.py backtesting --live python3 freqtrade backtesting --live
``` ```
#### Using a different on-disk ticker-data source #### Using a different on-disk ticker-data source
```bash ```bash
python3 ./freqtrade/main.py backtesting --datadir freqtrade/tests/testdata-20180101 python3 freqtrade backtesting --datadir freqtrade/tests/testdata-20180101
``` ```
#### With a (custom) strategy file #### With a (custom) strategy file
```bash ```bash
python3 ./freqtrade/main.py -s TestStrategy backtesting python3 freqtrade -s TestStrategy backtesting
``` ```
Where `-s TestStrategy` refers to the class name within the strategy file `test_strategy.py` found in the `freqtrade/user_data/strategies` directory Where `-s TestStrategy` refers to the class name within the strategy file `test_strategy.py` found in the `freqtrade/user_data/strategies` directory
@ -62,7 +62,7 @@ Where `-s TestStrategy` refers to the class name within the strategy file `test_
#### Exporting trades to file #### Exporting trades to file
```bash ```bash
python3 ./freqtrade/main.py backtesting --export trades python3 freqtrade backtesting --export trades
``` ```
The exported trades can be used for [further analysis](#further-backtest-result-analysis), or can be used by the plotting script `plot_dataframe.py` in the scripts folder. The exported trades can be used for [further analysis](#further-backtest-result-analysis), or can be used by the plotting script `plot_dataframe.py` in the scripts folder.
@ -70,7 +70,7 @@ The exported trades can be used for [further analysis](#further-backtest-result-
#### Exporting trades to file specifying a custom filename #### Exporting trades to file specifying a custom filename
```bash ```bash
python3 ./freqtrade/main.py backtesting --export trades --export-filename=backtest_teststrategy.json python3 freqtrade backtesting --export trades --export-filename=backtest_teststrategy.json
``` ```
#### Running backtest with smaller testset #### Running backtest with smaller testset
@ -81,7 +81,7 @@ you want to use. The last N ticks/timeframes will be used.
Example: Example:
```bash ```bash
python3 ./freqtrade/main.py backtesting --timerange=-200 python3 freqtrade backtesting --timerange=-200
``` ```
#### Advanced use of timerange #### Advanced use of timerange

View File

@ -14,7 +14,7 @@ Let assume you have a class called `AwesomeStrategy` in the file `awesome-strate
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
python3 ./freqtrade/main.py --strategy AwesomeStrategy python3 freqtrade --strategy AwesomeStrategy
``` ```
## Change your strategy ## Change your strategy
@ -41,7 +41,7 @@ The bot also include a sample strategy called `TestStrategy` you can update: `us
You can test it with the parameter: `--strategy TestStrategy` You can test it with the parameter: `--strategy TestStrategy`
```bash ```bash
python3 ./freqtrade/main.py --strategy AwesomeStrategy python3 freqtrade --strategy AwesomeStrategy
``` ```
**For the following section we will use the [user_data/strategies/test_strategy.py](https://github.com/freqtrade/freqtrade/blob/develop/user_data/strategies/test_strategy.py) **For the following section we will use the [user_data/strategies/test_strategy.py](https://github.com/freqtrade/freqtrade/blob/develop/user_data/strategies/test_strategy.py)
@ -355,7 +355,7 @@ The default buy strategy is located in the file
If you want to use a strategy from a different folder you can pass `--strategy-path` If you want to use a strategy from a different folder you can pass `--strategy-path`
```bash ```bash
python3 ./freqtrade/main.py --strategy AwesomeStrategy --strategy-path /some/folder python3 freqtrade --strategy AwesomeStrategy --strategy-path /some/folder
``` ```
### Further strategy ideas ### Further strategy ideas

View File

@ -47,7 +47,7 @@ The bot allows you to select which configuration file you want to use. Per
default, the bot will load the file `./config.json` default, the bot will load the file `./config.json`
```bash ```bash
python3 ./freqtrade/main.py -c path/far/far/away/config.json python3 freqtrade -c path/far/far/away/config.json
``` ```
### How to use multiple configuration files? ### How to use multiple configuration files?
@ -63,13 +63,13 @@ empty key and secrete values while running in the Dry Mode (which does not actua
require them): require them):
```bash ```bash
python3 ./freqtrade/main.py -c ./config.json python3 freqtrade -c ./config.json
``` ```
and specify both configuration files when running in the normal Live Trade Mode: and specify both configuration files when running in the normal Live Trade Mode:
```bash ```bash
python3 ./freqtrade/main.py -c ./config.json -c path/to/secrets/keys.config.json python3 freqtrade -c ./config.json -c path/to/secrets/keys.config.json
``` ```
This could help you hide your private Exchange key and Exchange secrete on you local machine This could help you hide your private Exchange key and Exchange secrete on you local machine
@ -95,7 +95,7 @@ In `user_data/strategies` you have a file `my_awesome_strategy.py` which has
a strategy class called `AwesomeStrategy` to load it: a strategy class called `AwesomeStrategy` to load it:
```bash ```bash
python3 ./freqtrade/main.py --strategy AwesomeStrategy python3 freqtrade --strategy AwesomeStrategy
``` ```
If the bot does not find your strategy file, it will display in an error If the bot does not find your strategy file, it will display in an error
@ -109,7 +109,7 @@ Learn more about strategy file in
This parameter allows you to add an additional strategy lookup path, which gets This parameter allows you to add an additional strategy lookup path, which gets
checked before the default locations (The passed path must be a folder!): checked before the default locations (The passed path must be a folder!):
```bash ```bash
python3 ./freqtrade/main.py --strategy AwesomeStrategy --strategy-path /some/folder python3 freqtrade --strategy AwesomeStrategy --strategy-path /some/folder
``` ```
#### How to install a strategy? #### How to install a strategy?
@ -136,7 +136,7 @@ using `--db-url`. This can also be used to specify a custom database
in production mode. Example command: in production mode. Example command:
```bash ```bash
python3 ./freqtrade/main.py -c config.json --db-url sqlite:///tradesv3.dry_run.sqlite python3 freqtrade -c config.json --db-url sqlite:///tradesv3.dry_run.sqlite
``` ```
## Backtesting commands ## Backtesting commands

View File

@ -13,14 +13,14 @@ on BaseVolume. This value can be changed when you run the script.
Get the 20 currencies based on BaseVolume. Get the 20 currencies based on BaseVolume.
```bash ```bash
python3 ./freqtrade/main.py --dynamic-whitelist python3 freqtrade --dynamic-whitelist
``` ```
**Customize the number of currencies to retrieve** **Customize the number of currencies to retrieve**
Get the 30 currencies based on BaseVolume. Get the 30 currencies based on BaseVolume.
```bash ```bash
python3 ./freqtrade/main.py --dynamic-whitelist 30 python3 freqtrade --dynamic-whitelist 30
``` ```
**Exception** **Exception**

View File

@ -146,16 +146,19 @@ Percentage of allowed risk per trade.
(defaults to 0.01 so 1%) (defaults to 0.01 so 1%)
#### stoploss_range_min #### stoploss_range_min
Minimum stoploss. Minimum stoploss.
(defaults to -0.01) (defaults to -0.01)
#### stoploss_range_max #### stoploss_range_max
Maximum stoploss. Maximum stoploss.
(defaults to -0.10) (defaults to -0.10)
#### stoploss_range_step #### stoploss_range_step
As an example if this is set to -0.01 then Edge will test the strategy for \[-0.01, -0,02, -0,03 ..., -0.09, -0.10\] ranges. As an example if this is set to -0.01 then Edge will test the strategy for \[-0.01, -0,02, -0,03 ..., -0.09, -0.10\] ranges.
Note than having a smaller step means having a bigger range which could lead to slow calculation. Note than having a smaller step means having a bigger range which could lead to slow calculation.
@ -164,6 +167,7 @@ If you set this parameter to -0.001, you then slow down the Edge calculation by
(defaults to -0.01) (defaults to -0.01)
#### minimum_winrate #### minimum_winrate
It filters out pairs which don't have at least minimum_winrate. It filters out pairs which don't have at least minimum_winrate.
This comes handy if you want to be conservative and don't comprise win rate in favour of risk reward ratio. This comes handy if you want to be conservative and don't comprise win rate in favour of risk reward ratio.
@ -171,6 +175,7 @@ This comes handy if you want to be conservative and don't comprise win rate in f
(defaults to 0.60) (defaults to 0.60)
#### minimum_expectancy #### minimum_expectancy
It filters out pairs which have the expectancy lower than this number. It filters out pairs which have the expectancy lower than this number.
Having an expectancy of 0.20 means if you put 10$ on a trade you expect a 12$ return. Having an expectancy of 0.20 means if you put 10$ on a trade you expect a 12$ return.
@ -178,6 +183,7 @@ Having an expectancy of 0.20 means if you put 10$ on a trade you expect a 12$ re
(defaults to 0.20) (defaults to 0.20)
#### min_trade_number #### min_trade_number
When calculating *W*, *R* and *E* (expectancy) against historical data, you always want to have a minimum number of trades. The more this number is the more Edge is reliable. When calculating *W*, *R* and *E* (expectancy) against historical data, you always want to have a minimum number of trades. The more this number is the more Edge is reliable.
Having a win rate of 100% on a single trade doesn't mean anything at all. But having a win rate of 70% over past 100 trades means clearly something. Having a win rate of 100% on a single trade doesn't mean anything at all. But having a win rate of 70% over past 100 trades means clearly something.
@ -185,6 +191,7 @@ Having a win rate of 100% on a single trade doesn't mean anything at all. But ha
(defaults to 10, it is highly recommended not to decrease this number) (defaults to 10, it is highly recommended not to decrease this number)
#### max_trade_duration_minute #### max_trade_duration_minute
Edge will filter out trades with long duration. If a trade is profitable after 1 month, it is hard to evaluate the strategy based on it. But if most of trades are profitable and they have maximum duration of 30 minutes, then it is clearly a good sign. Edge will filter out trades with long duration. If a trade is profitable after 1 month, it is hard to evaluate the strategy based on it. But if most of trades are profitable and they have maximum duration of 30 minutes, then it is clearly a good sign.
**NOTICE:** While configuring this value, you should take into consideration your ticker interval. As an example filtering out trades having duration less than one day for a strategy which has 4h interval does not make sense. Default value is set assuming your strategy interval is relatively small (1m or 5m, etc.). **NOTICE:** While configuring this value, you should take into consideration your ticker interval. As an example filtering out trades having duration less than one day for a strategy which has 4h interval does not make sense. Default value is set assuming your strategy interval is relatively small (1m or 5m, etc.).
@ -192,15 +199,17 @@ Edge will filter out trades with long duration. If a trade is profitable after 1
(defaults to 1 day, i.e. to 60 * 24 = 1440 minutes) (defaults to 1 day, i.e. to 60 * 24 = 1440 minutes)
#### remove_pumps #### remove_pumps
Edge will remove sudden pumps in a given market while going through historical data. However, given that pumps happen very often in crypto markets, we recommend you keep this off. Edge will remove sudden pumps in a given market while going through historical data. However, given that pumps happen very often in crypto markets, we recommend you keep this off.
(defaults to false) (defaults to false)
## Running Edge independently ## Running Edge independently
You can run Edge independently in order to see in details the result. Here is an example: You can run Edge independently in order to see in details the result. Here is an example:
```bash ```bash
python3 ./freqtrade/main.py edge python3 freqtrade edge
``` ```
An example of its output: An example of its output:
@ -224,18 +233,21 @@ An example of its output:
| NEBL/BTC | -0.03 | 0.63 | 1.29 | 0.58 | 0.44 | 19 | 59 | | NEBL/BTC | -0.03 | 0.63 | 1.29 | 0.58 | 0.44 | 19 | 59 |
### Update cached pairs with the latest data ### Update cached pairs with the latest data
```bash ```bash
python3 ./freqtrade/main.py edge --refresh-pairs-cached python3 freqtrade edge --refresh-pairs-cached
``` ```
### Precising stoploss range ### Precising stoploss range
```bash ```bash
python3 ./freqtrade/main.py edge --stoplosses=-0.01,-0.1,-0.001 #min,max,step python3 freqtrade edge --stoplosses=-0.01,-0.1,-0.001 #min,max,step
``` ```
### Advanced use of timerange ### Advanced use of timerange
```bash ```bash
python3 ./freqtrade/main.py edge --timerange=20181110-20181113 python3 freqtrade edge --timerange=20181110-20181113
``` ```
Doing `--timerange=-200` will get the last 200 timeframes from your inputdata. You can also specify specific dates, or a range span indexed by start and stop. Doing `--timerange=-200` will get the last 200 timeframes from your inputdata. You can also specify specific dates, or a range span indexed by start and stop.

View File

@ -46,22 +46,24 @@ have to run it for 10.000 or more. But it will take an eternity to
compute. compute.
We recommend you to run it at least 10.000 epochs: We recommend you to run it at least 10.000 epochs:
```bash ```bash
python3 ./freqtrade/main.py hyperopt -e 10000 python3 freqtrade hyperopt -e 10000
``` ```
or if you want intermediate result to see or if you want intermediate result to see
```bash ```bash
for i in {1..100}; do python3 ./freqtrade/main.py hyperopt -e 100; done for i in {1..100}; do python3 freqtrade hyperopt -e 100; done
``` ```
#### Why it is so long to run hyperopt? #### Why it is so long to run hyperopt?
Finding a great Hyperopt results takes time. Finding a great Hyperopt results takes time.
If you wonder why it takes a while to find great hyperopt results If you wonder why it takes a while to find great hyperopt results
This answer was written during the under the release 0.15.1, when we had This answer was written during the under the release 0.15.1, when we had:
:
- 8 triggers - 8 triggers
- 9 guards: let's say we evaluate even 10 values from each - 9 guards: let's say we evaluate even 10 values from each
- 1 stoploss calculation: let's say we want 10 values from that too to - 1 stoploss calculation: let's say we want 10 values from that too to

View File

@ -152,7 +152,7 @@ Because hyperopt tries a lot of combinations to find the best parameters it will
We strongly recommend to use `screen` or `tmux` to prevent any connection loss. We strongly recommend to use `screen` or `tmux` to prevent any connection loss.
```bash ```bash
python3 ./freqtrade/main.py -c config.json hyperopt --customhyperopt <hyperoptname> -e 5000 --spaces all python3 freqtrade -c config.json hyperopt --customhyperopt <hyperoptname> -e 5000 --spaces all
``` ```
Use `<hyperoptname>` as the name of the custom hyperopt used. Use `<hyperoptname>` as the name of the custom hyperopt used.
@ -178,7 +178,7 @@ you want to use. The last N ticks/timeframes will be used.
Example: Example:
```bash ```bash
python3 ./freqtrade/main.py hyperopt --timerange -200 python3 freqtrade hyperopt --timerange -200
``` ```
### Running Hyperopt with Smaller Search Space ### Running Hyperopt with Smaller Search Space

View File

@ -407,7 +407,7 @@ pip3 install -e .
If this is the first time you run the bot, ensure you are running it in Dry-run `"dry_run": true,` otherwise it will start to buy and sell coins. If this is the first time you run the bot, ensure you are running it in Dry-run `"dry_run": true,` otherwise it will start to buy and sell coins.
```bash ```bash
python3.6 ./freqtrade/main.py -c config.json python3.6 freqtrade -c config.json
``` ```
*Note*: If you run the bot on a server, you should consider using [Docker](#automatic-installation---docker) a terminal multiplexer like `screen` or [`tmux`](https://en.wikipedia.org/wiki/Tmux) to avoid that the bot is stopped on logout. *Note*: If you run the bot on a server, you should consider using [Docker](#automatic-installation---docker) a terminal multiplexer like `screen` or [`tmux`](https://en.wikipedia.org/wiki/Tmux) to avoid that the bot is stopped on logout.

View File

@ -235,7 +235,7 @@ function install() {
echo "-------------------------" echo "-------------------------"
echo "Run the bot !" echo "Run the bot !"
echo "-------------------------" echo "-------------------------"
echo "You can now use the bot by executing 'source .env/bin/activate; python freqtrade/main.py'." echo "You can now use the bot by executing 'source .env/bin/activate; python freqtrade'."
} }
function plot() { function plot() {