Docs and logging

This commit is contained in:
Fredrik81 2020-03-14 23:55:13 +01:00
parent 27faf12fde
commit cf7e80f45d
2 changed files with 42 additions and 22 deletions

View File

@ -23,44 +23,64 @@ The `freqtrade plot-dataframe` subcommand shows an interactive graph with three
Possible arguments: Possible arguments:
``` ```
usage: freqtrade plot-dataframe [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH] [--userdir PATH] [-s NAME] usage: freqtrade plot-dataframe [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[--strategy-path PATH] [-p PAIRS [PAIRS ...]] [--indicators1 INDICATORS1 [INDICATORS1 ...]] [-d PATH] [--userdir PATH] [-s NAME]
[--indicators2 INDICATORS2 [INDICATORS2 ...]] [--plot-limit INT] [--db-url PATH] [--strategy-path PATH] [-p PAIRS [PAIRS ...]]
[--trade-source {DB,file}] [--export EXPORT] [--export-filename PATH] [--timerange TIMERANGE] [--indicators1 INDICATORS1 [INDICATORS1 ...]]
[-i TICKER_INTERVAL] [--indicators2 INDICATORS2 [INDICATORS2 ...]]
[--plot-limit INT] [--db-url PATH]
[--trade-source {DB,file}] [--export EXPORT]
[--export-filename PATH]
[--timerange TIMERANGE] [-i TICKER_INTERVAL]
[--skip-trades]
optional arguments: optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...] -p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
Show profits for only these pairs. Pairs are space-separated. Show profits for only these pairs. Pairs are space-
separated.
--indicators1 INDICATORS1 [INDICATORS1 ...] --indicators1 INDICATORS1 [INDICATORS1 ...]
Set indicators from your strategy you want in the first row of the graph. Space-separated list. Example: Set indicators from your strategy you want in the
first row of the graph. Space-separated list. Example:
`ema3 ema5`. Default: `['sma', 'ema3', 'ema5']`. `ema3 ema5`. Default: `['sma', 'ema3', 'ema5']`.
--indicators2 INDICATORS2 [INDICATORS2 ...] --indicators2 INDICATORS2 [INDICATORS2 ...]
Set indicators from your strategy you want in the third row of the graph. Space-separated list. Example: Set indicators from your strategy you want in the
third row of the graph. Space-separated list. Example:
`fastd fastk`. Default: `['macd', 'macdsignal']`. `fastd fastk`. Default: `['macd', 'macdsignal']`.
--plot-limit INT Specify tick limit for plotting. Notice: too high values cause huge files. Default: 750. --plot-limit INT Specify tick limit for plotting. Notice: too high
--db-url PATH Override trades database URL, this is useful in custom deployments (default: `sqlite:///tradesv3.sqlite` values cause huge files. Default: 750.
for Live Run mode, `sqlite:///tradesv3.dryrun.sqlite` for Dry Run). --db-url PATH Override trades database URL, this is useful in custom
deployments (default: `sqlite:///tradesv3.sqlite` for
Live Run mode, `sqlite:///tradesv3.dryrun.sqlite` for
Dry Run).
--trade-source {DB,file} --trade-source {DB,file}
Specify the source for trades (Can be DB or file (backtest file)) Default: file Specify the source for trades (Can be DB or file
--export EXPORT Export backtest results, argument are: trades. Example: `--export=trades` (backtest file)) Default: file
--export EXPORT Export backtest results, argument are: trades.
Example: `--export=trades`
--export-filename PATH --export-filename PATH
Save backtest results to the file with this filename. Requires `--export` to be set as well. Example: Save backtest results to the file with this filename.
`--export-filename=user_data/backtest_results/backtest_today.json` Requires `--export` to be set as well. Example:
`--export-filename=user_data/backtest_results/backtest
_today.json`
--timerange TIMERANGE --timerange TIMERANGE
Specify what timerange of data to use. Specify what timerange of data to use.
-i TICKER_INTERVAL, --ticker-interval TICKER_INTERVAL -i TICKER_INTERVAL, --ticker-interval TICKER_INTERVAL
Specify ticker interval (`1m`, `5m`, `30m`, `1h`, `1d`). Specify ticker interval (`1m`, `5m`, `30m`, `1h`,
`1d`).
--skip-trades Skip using trades file from backtesting and DB.
Common arguments: Common arguments:
-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. Special values are: 'syslog', 'journald'. See the documentation for more --logfile FILE Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details. details.
-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: `config.json`). Multiple --config options may be used. Can be set to Specify configuration file (default:
`-` to read config from stdin. `userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH -d PATH, --datadir PATH
Path to directory with historical backtesting data. Path to directory with historical backtesting data.
--userdir PATH, --user-data-dir PATH --userdir PATH, --user-data-dir PATH
@ -68,9 +88,9 @@ Common arguments:
Strategy arguments: Strategy arguments:
-s NAME, --strategy NAME -s NAME, --strategy NAME
Specify strategy class name which will be used by the bot. Specify strategy class name which will be used by the
bot.
--strategy-path PATH Specify additional strategy lookup path. --strategy-path PATH Specify additional strategy lookup path.
``` ```
Example: Example:

View File

@ -51,7 +51,7 @@ def init_plotscript(config):
skip_trades = False skip_trades = False
if not isfile(config.get('exportfilename')) and config['trade_source'] == 'file': if not isfile(config.get('exportfilename')) and config['trade_source'] == 'file':
logger.info("Backtest file is missing skipping trades.") logger.warning("Backtest file is missing skipping trades.")
skip_trades = True skip_trades = True
elif config.get('skip_trades', False): elif config.get('skip_trades', False):
skip_trades = True skip_trades = True