Merge pull request #2397 from freqtrade/feat/new_args_system
require subcommand for all actions
This commit is contained in:
@@ -45,7 +45,7 @@ freqtrade --datadir user_data/data/bittrex-20180101 backtesting
|
||||
#### With a (custom) strategy file
|
||||
|
||||
```bash
|
||||
freqtrade -s SampleStrategy backtesting
|
||||
freqtrade backtesting -s SampleStrategy
|
||||
```
|
||||
|
||||
Where `-s SampleStrategy` refers to the class name within the strategy file `sample_strategy.py` found in the `freqtrade/user_data/strategies` directory.
|
||||
|
@@ -5,20 +5,18 @@ This page explains the different parameters of the bot and how to run it.
|
||||
!!! Note
|
||||
If you've used `setup.sh`, don't forget to activate your virtual environment (`source .env/bin/activate`) before running freqtrade commands.
|
||||
|
||||
|
||||
## Bot commands
|
||||
|
||||
```
|
||||
usage: freqtrade [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
|
||||
[--userdir PATH] [-s NAME] [--strategy-path PATH]
|
||||
[--db-url PATH] [--sd-notify]
|
||||
{backtesting,edge,hyperopt,create-userdir,list-exchanges,list-timeframes,download-data,plot-dataframe,plot-profit}
|
||||
usage: freqtrade [-h] [-V]
|
||||
{trade,backtesting,edge,hyperopt,create-userdir,list-exchanges,list-timeframes,download-data,plot-dataframe,plot-profit}
|
||||
...
|
||||
|
||||
Free, open source crypto trading bot
|
||||
|
||||
positional arguments:
|
||||
{backtesting,edge,hyperopt,create-userdir,list-exchanges,list-timeframes,download-data,plot-dataframe,plot-profit}
|
||||
{trade,backtesting,edge,hyperopt,create-userdir,list-exchanges,list-timeframes,download-data,plot-dataframe,plot-profit}
|
||||
trade Trade module.
|
||||
backtesting Backtesting module.
|
||||
edge Edge module.
|
||||
hyperopt Hyperopt module.
|
||||
@@ -32,6 +30,27 @@ positional arguments:
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-V, --version show program's version number and exit
|
||||
|
||||
```
|
||||
|
||||
### Bot trading commands
|
||||
|
||||
```
|
||||
usage: freqtrade trade [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
|
||||
[--userdir PATH] [-s NAME] [--strategy-path PATH]
|
||||
[--db-url PATH] [--sd-notify] [--dry-run]
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
--db-url PATH Override trades database URL, this is useful in custom
|
||||
deployments (default: `sqlite:///tradesv3.sqlite` for
|
||||
Live Run mode, `sqlite://` for Dry Run).
|
||||
--sd-notify Notify systemd service manager.
|
||||
--dry-run Enforce dry-run for trading (removes Exchange secrets
|
||||
and simulates trades).
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--logfile FILE Log to the file specified.
|
||||
-V, --version show program's version number and exit
|
||||
@@ -43,15 +62,12 @@ optional arguments:
|
||||
Path to directory with historical backtesting data.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name (default:
|
||||
`DefaultStrategy`).
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
--db-url PATH Override trades database URL, this is useful in custom
|
||||
deployments (default: `sqlite:///tradesv3.sqlite` for
|
||||
Live Run mode, `sqlite://` for Dry Run).
|
||||
--sd-notify Notify systemd service manager.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
```
|
||||
|
||||
### How to specify which configuration file be used?
|
||||
@@ -60,7 +76,7 @@ The bot allows you to select which configuration file you want to use by means o
|
||||
the `-c/--config` command line option:
|
||||
|
||||
```bash
|
||||
freqtrade -c path/far/far/away/config.json
|
||||
freqtrade trade -c path/far/far/away/config.json
|
||||
```
|
||||
|
||||
Per default, the bot loads the `config.json` configuration file from the current
|
||||
@@ -79,13 +95,13 @@ empty key and secrete values while running in the Dry Mode (which does not actua
|
||||
require them):
|
||||
|
||||
```bash
|
||||
freqtrade -c ./config.json
|
||||
freqtrade trade -c ./config.json
|
||||
```
|
||||
|
||||
and specify both configuration files when running in the normal Live Trade Mode:
|
||||
|
||||
```bash
|
||||
freqtrade -c ./config.json -c path/to/secrets/keys.config.json
|
||||
freqtrade trade -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
|
||||
@@ -134,7 +150,7 @@ In `user_data/strategies` you have a file `my_awesome_strategy.py` which has
|
||||
a strategy class called `AwesomeStrategy` to load it:
|
||||
|
||||
```bash
|
||||
freqtrade --strategy AwesomeStrategy
|
||||
freqtrade trade --strategy AwesomeStrategy
|
||||
```
|
||||
|
||||
If the bot does not find your strategy file, it will display in an error
|
||||
@@ -149,7 +165,7 @@ This parameter allows you to add an additional strategy lookup path, which gets
|
||||
checked before the default locations (The passed path must be a directory!):
|
||||
|
||||
```bash
|
||||
freqtrade --strategy AwesomeStrategy --strategy-path /some/directory
|
||||
freqtrade trade --strategy AwesomeStrategy --strategy-path /some/directory
|
||||
```
|
||||
|
||||
#### How to install a strategy?
|
||||
@@ -165,7 +181,7 @@ using `--db-url`. This can also be used to specify a custom database
|
||||
in production mode. Example command:
|
||||
|
||||
```bash
|
||||
freqtrade -c config.json --db-url sqlite:///tradesv3.dry_run.sqlite
|
||||
freqtrade trade -c config.json --db-url sqlite:///tradesv3.dry_run.sqlite
|
||||
```
|
||||
|
||||
## Backtesting commands
|
||||
@@ -173,8 +189,10 @@ freqtrade -c config.json --db-url sqlite:///tradesv3.dry_run.sqlite
|
||||
Backtesting also uses the config specified via `-c/--config`.
|
||||
|
||||
```
|
||||
usage: freqtrade backtesting [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE]
|
||||
[--max_open_trades INT]
|
||||
usage: freqtrade backtesting [-h] [-v] [--logfile FILE] [-V] [-c PATH]
|
||||
[-d PATH] [--userdir PATH] [-s NAME]
|
||||
[--strategy-path PATH] [-i TICKER_INTERVAL]
|
||||
[--timerange TIMERANGE] [--max_open_trades INT]
|
||||
[--stake_amount STAKE_AMOUNT] [--fee FLOAT]
|
||||
[--eps] [--dmmp]
|
||||
[--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
|
||||
@@ -211,11 +229,29 @@ optional arguments:
|
||||
--export EXPORT Export backtest results, argument are: trades.
|
||||
Example: `--export=trades`
|
||||
--export-filename PATH
|
||||
Save backtest results to the file with this filename
|
||||
(default: `user_data/backtest_results/backtest-
|
||||
result.json`). Requires `--export` to be set as well.
|
||||
Example: `--export-filename=user_data/backtest_results
|
||||
/backtest_today.json`
|
||||
Save backtest results to the file with this filename.
|
||||
Requires `--export` to be set as well. Example:
|
||||
`--export-filename=user_data/backtest_results/backtest
|
||||
_today.json`
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--logfile FILE Log to the file specified.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default: `config.json`).
|
||||
Multiple --config options may be used. Can be set to
|
||||
`-` to read config from stdin.
|
||||
-d PATH, --datadir PATH
|
||||
Path to directory with historical backtesting data.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
|
||||
```
|
||||
|
||||
@@ -223,7 +259,7 @@ optional arguments:
|
||||
|
||||
The first time your run Backtesting, you will need to download some historic data first.
|
||||
This can be accomplished by using `freqtrade download-data`.
|
||||
Check the corresponding [help page section](backtesting.md#Getting-data-for-backtesting-and-hyperopt) for more details
|
||||
Check the corresponding [Data Downloading](data-download.md) section for more details
|
||||
|
||||
## Hyperopt commands
|
||||
|
||||
@@ -231,12 +267,14 @@ To optimize your strategy, you can use hyperopt parameter hyperoptimization
|
||||
to find optimal parameter values for your stategy.
|
||||
|
||||
```
|
||||
usage: freqtrade hyperopt [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE]
|
||||
usage: freqtrade hyperopt [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
|
||||
[--userdir PATH] [-s NAME] [--strategy-path PATH]
|
||||
[-i TICKER_INTERVAL] [--timerange TIMERANGE]
|
||||
[--max_open_trades INT]
|
||||
[--stake_amount STAKE_AMOUNT] [--fee FLOAT]
|
||||
[--customhyperopt NAME] [--hyperopt-path PATH]
|
||||
[--eps] [-e INT]
|
||||
[-s {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]]
|
||||
[--hyperopt NAME] [--hyperopt-path PATH] [--eps]
|
||||
[-e INT]
|
||||
[--spaces {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]]
|
||||
[--dmmp] [--print-all] [--no-color] [--print-json]
|
||||
[-j JOBS] [--random-state INT] [--min-trades INT]
|
||||
[--continue] [--hyperopt-loss NAME]
|
||||
@@ -254,16 +292,15 @@ optional arguments:
|
||||
Specify stake_amount.
|
||||
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
|
||||
entry and exit).
|
||||
--customhyperopt NAME
|
||||
Specify hyperopt class name (default:
|
||||
`DefaultHyperOpt`).
|
||||
--hyperopt-path PATH Specify additional lookup path for Hyperopts and
|
||||
--hyperopt NAME Specify hyperopt class name which will be used by the
|
||||
bot.
|
||||
--hyperopt-path PATH Specify additional lookup path for Hyperopt and
|
||||
Hyperopt Loss functions.
|
||||
--eps, --enable-position-stacking
|
||||
Allow buying the same pair multiple times (position
|
||||
stacking).
|
||||
-e INT, --epochs INT Specify number of epochs (default: 100).
|
||||
-s {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...], --spaces {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]
|
||||
--spaces {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]
|
||||
Specify which parameters to hyperopt. Space-separated
|
||||
list. Default: `all`.
|
||||
--dmmp, --disable-max-market-positions
|
||||
@@ -292,8 +329,27 @@ optional arguments:
|
||||
generate completely different results, since the
|
||||
target for optimization is different. Built-in
|
||||
Hyperopt-loss-functions are: DefaultHyperOptLoss,
|
||||
OnlyProfitHyperOptLoss, SharpeHyperOptLoss.(default:
|
||||
OnlyProfitHyperOptLoss, SharpeHyperOptLoss (default:
|
||||
`DefaultHyperOptLoss`).
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--logfile FILE Log to the file specified.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default: `config.json`).
|
||||
Multiple --config options may be used. Can be set to
|
||||
`-` to read config from stdin.
|
||||
-d PATH, --datadir PATH
|
||||
Path to directory with historical backtesting data.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
```
|
||||
|
||||
## Edge commands
|
||||
@@ -301,7 +357,9 @@ optional arguments:
|
||||
To know your trade expectancy and winrate against historical data, you can use Edge.
|
||||
|
||||
```
|
||||
usage: freqtrade edge [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE]
|
||||
usage: freqtrade edge [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
|
||||
[--userdir PATH] [-s NAME] [--strategy-path PATH]
|
||||
[-i TICKER_INTERVAL] [--timerange TIMERANGE]
|
||||
[--max_open_trades INT] [--stake_amount STAKE_AMOUNT]
|
||||
[--fee FLOAT] [--stoplosses STOPLOSS_RANGE]
|
||||
|
||||
@@ -324,6 +382,24 @@ optional arguments:
|
||||
(without any space). Example:
|
||||
`--stoplosses=-0.01,-0.1,-0.001`
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--logfile FILE Log to the file specified.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default: `config.json`).
|
||||
Multiple --config options may be used. Can be set to
|
||||
`-` to read config from stdin.
|
||||
-d PATH, --datadir PATH
|
||||
Path to directory with historical backtesting data.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
```
|
||||
|
||||
To understand edge and how to read the results, please read the [edge documentation](edge.md).
|
||||
|
@@ -95,7 +95,7 @@ Mandatory parameters are marked as **Required**, which means that they are requi
|
||||
| `db_url` | `sqlite:///tradesv3.sqlite`| Declares database URL to use. NOTE: This defaults to `sqlite://` if `dry_run` is `True`.
|
||||
| `initial_state` | running | Defines the initial application state. More information below.
|
||||
| `forcebuy_enable` | false | Enables the RPC Commands to force a buy. More information below.
|
||||
| `strategy` | DefaultStrategy | Defines Strategy class to use.
|
||||
| `strategy` | None | **Required** Defines Strategy class to use. Recommended to set via `--strategy NAME`.
|
||||
| `strategy_path` | null | Adds an additional strategy lookup path (must be a directory).
|
||||
| `internals.process_throttle_secs` | 5 | **Required.** Set the process throttle. Value in second.
|
||||
| `internals.heartbeat_interval` | 60 | Print heartbeat message every X seconds. Set to 0 to disable heartbeat messages.
|
||||
|
@@ -160,7 +160,7 @@ docker run -d \
|
||||
-v ~/.freqtrade/config.json:/freqtrade/config.json \
|
||||
-v ~/.freqtrade/user_data/:/freqtrade/user_data \
|
||||
-v ~/.freqtrade/tradesv3.sqlite:/freqtrade/tradesv3.sqlite \
|
||||
freqtrade --db-url sqlite:///tradesv3.sqlite --strategy MyAwesomeStrategy
|
||||
freqtrade trade --db-url sqlite:///tradesv3.sqlite --strategy MyAwesomeStrategy
|
||||
```
|
||||
|
||||
!!! Note
|
||||
@@ -202,7 +202,7 @@ docker run -d \
|
||||
-v ~/.freqtrade/config.json:/freqtrade/config.json \
|
||||
-v ~/.freqtrade/tradesv3.sqlite:/freqtrade/tradesv3.sqlite \
|
||||
-v ~/.freqtrade/user_data/:/freqtrade/user_data/ \
|
||||
freqtrade --strategy AwsomelyProfitableStrategy backtesting
|
||||
freqtrade backtesting --strategy AwsomelyProfitableStrategy
|
||||
```
|
||||
|
||||
Head over to the [Backtesting Documentation](backtesting.md) for more details.
|
||||
|
@@ -235,7 +235,7 @@ An example of its output:
|
||||
### Update cached pairs with the latest data
|
||||
|
||||
Edge requires historic data the same way as backtesting does.
|
||||
Please refer to the [download section](backtesting.md#Getting-data-for-backtesting-and-hyperopt) of the documentation for details.
|
||||
Please refer to the [Data Downloading](data-download.md) section of the documentation for details.
|
||||
|
||||
### Precising stoploss range
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
### The bot does not start
|
||||
|
||||
Running the bot with `freqtrade --config config.json` does show the output `freqtrade: command not found`.
|
||||
Running the bot with `freqtrade trade --config config.json` does show the output `freqtrade: command not found`.
|
||||
|
||||
This could have the following reasons:
|
||||
|
||||
|
@@ -245,7 +245,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.
|
||||
|
||||
```bash
|
||||
freqtrade -c config.json hyperopt --customhyperopt <hyperoptname> -e 5000 --spaces all
|
||||
freqtrade hyperopt --config config.json --hyperopt <hyperoptname> -e 5000 --spaces all
|
||||
```
|
||||
|
||||
Use `<hyperoptname>` as the name of the custom hyperopt used.
|
||||
@@ -281,7 +281,7 @@ freqtrade hyperopt --timerange 20180401-20180501
|
||||
Hyperopt can reuse `populate_indicators`, `populate_buy_trend`, `populate_sell_trend` from your strategy, assuming these methods are **not** in your custom hyperopt file, and a strategy is provided.
|
||||
|
||||
```bash
|
||||
freqtrade --strategy SampleStrategy hyperopt --customhyperopt SampleHyperopt
|
||||
freqtrade hyperopt --strategy SampleStrategy --customhyperopt SampleHyperopt
|
||||
```
|
||||
|
||||
### Running Hyperopt with Smaller Search Space
|
||||
|
@@ -192,7 +192,7 @@ python3 -m pip 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.
|
||||
|
||||
```bash
|
||||
freqtrade -c config.json
|
||||
freqtrade trade -c config.json
|
||||
```
|
||||
|
||||
*Note*: If you run the bot on a server, you should consider using [Docker](docker.md) or a terminal multiplexer like `screen` or [`tmux`](https://en.wikipedia.org/wiki/Tmux) to avoid that the bot is stopped on logout.
|
||||
|
@@ -23,13 +23,15 @@ The `freqtrade plot-dataframe` subcommand shows an interactive graph with three
|
||||
Possible arguments:
|
||||
|
||||
```
|
||||
usage: freqtrade plot-dataframe [-h] [-p PAIRS [PAIRS ...]]
|
||||
usage: freqtrade plot-dataframe [-h] [-v] [--logfile FILE] [-V] [-c PATH]
|
||||
[-d PATH] [--userdir PATH] [-s NAME]
|
||||
[--strategy-path PATH] [-p PAIRS [PAIRS ...]]
|
||||
[--indicators1 INDICATORS1 [INDICATORS1 ...]]
|
||||
[--indicators2 INDICATORS2 [INDICATORS2 ...]]
|
||||
[--plot-limit INT] [--db-url PATH]
|
||||
[--trade-source {DB,file}] [--export EXPORT]
|
||||
[--export-filename PATH]
|
||||
[--timerange TIMERANGE]
|
||||
[--timerange TIMERANGE] [-i TICKER_INTERVAL]
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
@@ -62,6 +64,28 @@ optional arguments:
|
||||
/backtest_today.json`
|
||||
--timerange TIMERANGE
|
||||
Specify what timerange of data to use.
|
||||
-i TICKER_INTERVAL, --ticker-interval TICKER_INTERVAL
|
||||
Specify ticker interval (`1m`, `5m`, `30m`, `1h`,
|
||||
`1d`).
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--logfile FILE Log to the file specified.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default: `config.json`).
|
||||
Multiple --config options may be used. Can be set to
|
||||
`-` to read config from stdin.
|
||||
-d PATH, --datadir PATH
|
||||
Path to directory with historical backtesting data.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name (default:
|
||||
`DefaultStrategy`).
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
|
||||
```
|
||||
|
||||
@@ -83,7 +107,7 @@ Use `--indicators1` for the main plot and `--indicators2` for the subplot below
|
||||
You will almost certainly want to specify a custom strategy! This can be done by adding `-s Classname` / `--strategy ClassName` to the command.
|
||||
|
||||
``` bash
|
||||
freqtrade --strategy AwesomeStrategy plot-dataframe -p BTC/ETH --indicators1 sma ema --indicators2 macd
|
||||
freqtrade plot-dataframe --strategy AwesomeStrategy -p BTC/ETH --indicators1 sma ema --indicators2 macd
|
||||
```
|
||||
|
||||
### Further usage examples
|
||||
@@ -91,25 +115,25 @@ freqtrade --strategy AwesomeStrategy plot-dataframe -p BTC/ETH --indicators1 sma
|
||||
To plot multiple pairs, separate them with a space:
|
||||
|
||||
``` bash
|
||||
freqtrade --strategy AwesomeStrategy plot-dataframe -p BTC/ETH XRP/ETH
|
||||
freqtrade plot-dataframe --strategy AwesomeStrategy -p BTC/ETH XRP/ETH
|
||||
```
|
||||
|
||||
To plot a timerange (to zoom in)
|
||||
|
||||
``` bash
|
||||
freqtrade --strategy AwesomeStrategy plot-dataframe -p BTC/ETH --timerange=20180801-20180805
|
||||
freqtrade plot-dataframe --strategy AwesomeStrategy -p BTC/ETH --timerange=20180801-20180805
|
||||
```
|
||||
|
||||
To plot trades stored in a database use `--db-url` in combination with `--trade-source DB`:
|
||||
|
||||
``` bash
|
||||
freqtrade --strategy AwesomeStrategy plot-dataframe --db-url sqlite:///tradesv3.dry_run.sqlite -p BTC/ETH --trade-source DB
|
||||
freqtrade plot-dataframe --strategy AwesomeStrategy --db-url sqlite:///tradesv3.dry_run.sqlite -p BTC/ETH --trade-source DB
|
||||
```
|
||||
|
||||
To plot trades from a backtesting result, use `--export-filename <filename>`
|
||||
|
||||
``` bash
|
||||
freqtrade --strategy AwesomeStrategy plot-dataframe --export-filename user_data/backtest_results/backtest-result.json -p BTC/ETH
|
||||
freqtrade plot-dataframe --strategy AwesomeStrategy --export-filename user_data/backtest_results/backtest-result.json -p BTC/ETH
|
||||
```
|
||||
|
||||
## Plot profit
|
||||
@@ -133,10 +157,11 @@ The third graph can be useful to spot outliers, events in pairs that cause profi
|
||||
Possible options for the `freqtrade plot-profit` subcommand:
|
||||
|
||||
```
|
||||
usage: freqtrade plot-profit [-h] [-p PAIRS [PAIRS ...]]
|
||||
usage: freqtrade plot-profit [-h] [-v] [--logfile FILE] [-V] [-c PATH]
|
||||
[-d PATH] [--userdir PATH] [-p PAIRS [PAIRS ...]]
|
||||
[--timerange TIMERANGE] [--export EXPORT]
|
||||
[--export-filename PATH] [--db-url PATH]
|
||||
[--trade-source {DB,file}]
|
||||
[--trade-source {DB,file}] [-i TICKER_INTERVAL]
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
@@ -159,6 +184,22 @@ optional arguments:
|
||||
--trade-source {DB,file}
|
||||
Specify the source for trades (Can be DB or file
|
||||
(backtest file)) Default: file
|
||||
-i TICKER_INTERVAL, --ticker-interval TICKER_INTERVAL
|
||||
Specify ticker interval (`1m`, `5m`, `30m`, `1h`,
|
||||
`1d`).
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--logfile FILE Log to the file specified.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default: `config.json`).
|
||||
Multiple --config options may be used. Can be set to
|
||||
`-` to read config from stdin.
|
||||
-d PATH, --datadir PATH
|
||||
Path to directory with historical backtesting data.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
|
@@ -65,7 +65,7 @@ docker run -d \
|
||||
-v ~/.freqtrade/user_data/:/freqtrade/user_data \
|
||||
-v ~/.freqtrade/tradesv3.sqlite:/freqtrade/tradesv3.sqlite \
|
||||
-p 127.0.0.1:8080:8080 \
|
||||
freqtrade --db-url sqlite:///tradesv3.sqlite --strategy MyAwesomeStrategy
|
||||
freqtrade trade --db-url sqlite:///tradesv3.sqlite --strategy MyAwesomeStrategy
|
||||
```
|
||||
|
||||
!!! Danger "Security warning"
|
||||
|
@@ -13,7 +13,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)
|
||||
|
||||
```bash
|
||||
freqtrade --strategy AwesomeStrategy
|
||||
freqtrade trade --strategy AwesomeStrategy
|
||||
```
|
||||
|
||||
## Change your strategy
|
||||
@@ -45,7 +45,7 @@ The current version is 2 - which is also the default when it's not set explicitl
|
||||
Future versions will require this to be set.
|
||||
|
||||
```bash
|
||||
freqtrade --strategy AwesomeStrategy
|
||||
freqtrade trade --strategy AwesomeStrategy
|
||||
```
|
||||
|
||||
**For the following section we will use the [user_data/strategies/sample_strategy.py](https://github.com/freqtrade/freqtrade/blob/develop/user_data/strategies/sample_strategy.py)
|
||||
@@ -485,7 +485,7 @@ The strategy template is located in the file
|
||||
If you want to use a strategy from a different directory you can pass `--strategy-path`
|
||||
|
||||
```bash
|
||||
freqtrade --strategy AwesomeStrategy --strategy-path /some/directory
|
||||
freqtrade trade --strategy AwesomeStrategy --strategy-path /some/directory
|
||||
```
|
||||
|
||||
### Common mistakes when developing strategies
|
||||
|
Reference in New Issue
Block a user