@@ -5,27 +5,47 @@ This page explains the different parameters of the bot and how to run it.
5
5
!!! Note
6
6
If you've used ` setup.sh ` , don't forget to activate your virtual environment (` source .env/bin/activate ` ) before running freqtrade commands.
7
7
8
-
9
8
## Bot commands
10
9
11
10
```
12
- usage: freqtrade [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
13
- [--userdir PATH] [-s NAME] [--strategy-path PATH]
14
- [--db-url PATH] [--sd-notify]
15
- {backtesting,edge,hyperopt,create-userdir,list-exchanges} ...
11
+ usage: freqtrade [-h] [-V]
12
+ {trade,backtesting,edge,hyperopt,create-userdir,list-exchanges,download-data,plot-dataframe,plot-profit}
13
+ ...
16
14
17
15
Free, open source crypto trading bot
18
16
19
17
positional arguments:
20
- {backtesting,edge,hyperopt,create-userdir,list-exchanges}
18
+ {trade,backtesting,edge,hyperopt,create-userdir,list-exchanges,download-data,plot-dataframe,plot-profit}
19
+ trade Trade module.
21
20
backtesting Backtesting module.
22
21
edge Edge module.
23
22
hyperopt Hyperopt module.
24
23
create-userdir Create user-data directory.
25
24
list-exchanges Print available exchanges.
25
+ download-data Download backtesting data.
26
+ plot-dataframe Plot candles with indicators.
27
+ plot-profit Generate plot showing profits.
28
+
29
+ optional arguments:
30
+ -h, --help show this help message and exit
31
+ -V, --version show program's version number and exit
32
+ ```
33
+
34
+ ### Bot trading commands
35
+
36
+ ```
37
+ usage: freqtrade trade [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
38
+ [--userdir PATH] [-s NAME] [--strategy-path PATH]
39
+ [--db-url PATH] [--sd-notify]
26
40
27
41
optional arguments:
28
42
-h, --help show this help message and exit
43
+ --db-url PATH Override trades database URL, this is useful in custom
44
+ deployments (default: `sqlite:///tradesv3.sqlite` for
45
+ Live Run mode, `sqlite://` for Dry Run).
46
+ --sd-notify Notify systemd service manager.
47
+
48
+ Common arguments:
29
49
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
30
50
--logfile FILE Log to the file specified.
31
51
-V, --version show program's version number and exit
@@ -37,14 +57,12 @@ optional arguments:
37
57
Path to directory with historical backtesting data.
38
58
--userdir PATH, --user-data-dir PATH
39
59
Path to userdata directory.
60
+
61
+ Strategy arguments:
40
62
-s NAME, --strategy NAME
41
63
Specify strategy class name (default:
42
64
`DefaultStrategy`).
43
65
--strategy-path PATH Specify additional strategy lookup path.
44
- --db-url PATH Override trades database URL, this is useful in custom
45
- deployments (default: `sqlite:///tradesv3.sqlite` for
46
- Live Run mode, `sqlite://` for Dry Run).
47
- --sd-notify Notify systemd service manager.
48
66
49
67
```
50
68
@@ -128,7 +146,7 @@ In `user_data/strategies` you have a file `my_awesome_strategy.py` which has
128
146
a strategy class called ` AwesomeStrategy ` to load it:
129
147
130
148
``` bash
131
- freqtrade --strategy AwesomeStrategy
149
+ freqtrade trade --strategy AwesomeStrategy
132
150
```
133
151
134
152
If the bot does not find your strategy file, it will display in an error
@@ -143,7 +161,7 @@ This parameter allows you to add an additional strategy lookup path, which gets
143
161
checked before the default locations (The passed path must be a directory!):
144
162
145
163
``` bash
146
- freqtrade --strategy AwesomeStrategy --strategy-path /some/directory
164
+ freqtrade trade --strategy AwesomeStrategy --strategy-path /some/directory
147
165
```
148
166
149
167
#### How to install a strategy?
@@ -167,20 +185,22 @@ freqtrade -c config.json --db-url sqlite:///tradesv3.dry_run.sqlite
167
185
Backtesting also uses the config specified via ` -c/--config ` .
168
186
169
187
```
170
- usage: freqtrade backtesting [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE]
171
- [--max_open_trades MAX_OPEN_TRADES]
172
- [--stake_amount STAKE_AMOUNT] [-r] [--eps] [--dmmp]
173
- [-l]
174
- [--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
175
- [--export EXPORT] [--export-filename PATH]
188
+ usage: freqtrade backtesting [-h] [-v] [--logfile FILE] [-V] [-c PATH]
189
+ [-d PATH] [--userdir PATH] [-s NAME]
190
+ [--strategy-path PATH] [-i TICKER_INTERVAL]
191
+ [--timerange TIMERANGE] [--max_open_trades INT]
192
+ [--stake_amount STAKE_AMOUNT] [--eps] [--dmmp]
193
+ [--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
194
+ [--export EXPORT] [--export-filename PATH]
176
195
177
196
optional arguments:
178
197
-h, --help show this help message and exit
179
198
-i TICKER_INTERVAL, --ticker-interval TICKER_INTERVAL
180
- Specify ticker interval (1m, 5m, 30m, 1h, 1d).
199
+ Specify ticker interval (`1m`, `5m`, `30m`, `1h`,
200
+ `1d`).
181
201
--timerange TIMERANGE
182
202
Specify what timerange of data to use.
183
- --max_open_trades MAX_OPEN_TRADES
203
+ --max_open_trades INT
184
204
Specify max_open_trades to use.
185
205
--stake_amount STAKE_AMOUNT
186
206
Specify stake_amount.
@@ -193,42 +213,65 @@ optional arguments:
193
213
number).
194
214
--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]
195
215
Provide a space-separated list of strategies to
196
- backtest Please note that ticker-interval needs to be
216
+ backtest. Please note that ticker-interval needs to be
197
217
set either in config or via command line. When using
198
- this together with --export trades, the strategy-name
199
- is injected into the filename (so backtest-data.json
200
- becomes backtest-data-DefaultStrategy.json
201
- --export EXPORT Export backtest results, argument are: trades. Example
202
- --export=trades
218
+ this together with `--export trades`, the strategy-
219
+ name is injected into the filename (so `backtest-
220
+ data.json` becomes `backtest-data-
221
+ DefaultStrategy.json`
222
+ --export EXPORT Export backtest results, argument are: trades.
223
+ Example: `--export=trades`
203
224
--export-filename PATH
204
- Save backtest results to this filename requires
205
- --export to be set as well Example --export-
206
- filename=user_data/backtest_results/backtest_today.json
207
- (default: user_data/backtest_results/backtest-
208
- result.json)
225
+ Save backtest results to the file with this filename
226
+ (default: `user_data/backtest_results/backtest-
227
+ result.json`). Requires `--export` to be set as well.
228
+ Example: `--export-filename=user_data/backtest_results
229
+ /backtest_today.json`
230
+
231
+ Common arguments:
232
+ -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
233
+ --logfile FILE Log to the file specified.
234
+ -V, --version show program's version number and exit
235
+ -c PATH, --config PATH
236
+ Specify configuration file (default: `config.json`).
237
+ Multiple --config options may be used. Can be set to
238
+ `-` to read config from stdin.
239
+ -d PATH, --datadir PATH
240
+ Path to directory with historical backtesting data.
241
+ --userdir PATH, --user-data-dir PATH
242
+ Path to userdata directory.
243
+
244
+ Strategy arguments:
245
+ -s NAME, --strategy NAME
246
+ Specify strategy class name (default:
247
+ `DefaultStrategy`).
248
+ --strategy-path PATH Specify additional strategy lookup path.
249
+
209
250
```
210
251
211
252
### Getting historic data for backtesting
212
253
213
254
The first time your run Backtesting, you will need to download some historic data first.
214
255
This can be accomplished by using ` freqtrade download-data ` .
215
- Check the corresponding [ help page section ] ( backtesting.md#Getting- data-for-backtesting-and-hyperopt ) for more details
256
+ Check the corresponding [ Data Downloading ] ( data-download.md ) section for more details
216
257
217
258
## Hyperopt commands
218
259
219
260
To optimize your strategy, you can use hyperopt parameter hyperoptimization
220
261
to find optimal parameter values for your stategy.
221
262
222
263
```
223
- usage: freqtrade hyperopt [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE]
264
+ usage: freqtrade hyperopt [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
265
+ [--userdir PATH] [-s NAME] [--strategy-path PATH]
266
+ [-i TICKER_INTERVAL] [--timerange TIMERANGE]
224
267
[--max_open_trades INT]
225
- [--stake_amount STAKE_AMOUNT] [-r]
268
+ [--stake_amount STAKE_AMOUNT]
226
269
[--customhyperopt NAME] [--hyperopt-path PATH]
227
270
[--eps] [-e INT]
228
- [-s {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]]
229
- [--dmmp] [--print-all] [--no-color] [-j JOBS ]
230
- [-- random-state INT] [--min-trades INT] [--continue ]
231
- [--hyperopt-loss NAME]
271
+ [--spaces {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]]
272
+ [--dmmp] [--print-all] [--no-color] [--print-json ]
273
+ [-j JOBS] [-- random-state INT] [--min-trades INT]
274
+ [--continue] [-- hyperopt-loss NAME]
232
275
233
276
optional arguments:
234
277
-h, --help show this help message and exit
@@ -250,7 +293,7 @@ optional arguments:
250
293
Allow buying the same pair multiple times (position
251
294
stacking).
252
295
-e INT, --epochs INT Specify number of epochs (default: 100).
253
- -s {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...], - -spaces {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]
296
+ --spaces {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]
254
297
Specify which parameters to hyperopt. Space-separated
255
298
list. Default: `all`.
256
299
--dmmp, --disable-max-market-positions
@@ -260,6 +303,7 @@ optional arguments:
260
303
--print-all Print all results, not only the best ones.
261
304
--no-color Disable colorization of hyperopt results. May be
262
305
useful if you are redirecting output to a file.
306
+ --print-json Print best result detailization in JSON format.
263
307
-j JOBS, --job-workers JOBS
264
308
The number of concurrently running jobs for
265
309
hyperoptimization (hyperopt worker processes). If -1
@@ -278,35 +322,77 @@ optional arguments:
278
322
generate completely different results, since the
279
323
target for optimization is different. Built-in
280
324
Hyperopt-loss-functions are: DefaultHyperOptLoss,
281
- OnlyProfitHyperOptLoss, SharpeHyperOptLoss.
282
- (default: `DefaultHyperOptLoss`).
325
+ OnlyProfitHyperOptLoss, SharpeHyperOptLoss.(default:
326
+ `DefaultHyperOptLoss`).
327
+
328
+ Common arguments:
329
+ -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
330
+ --logfile FILE Log to the file specified.
331
+ -V, --version show program's version number and exit
332
+ -c PATH, --config PATH
333
+ Specify configuration file (default: `config.json`).
334
+ Multiple --config options may be used. Can be set to
335
+ `-` to read config from stdin.
336
+ -d PATH, --datadir PATH
337
+ Path to directory with historical backtesting data.
338
+ --userdir PATH, --user-data-dir PATH
339
+ Path to userdata directory.
340
+
341
+ Strategy arguments:
342
+ -s NAME, --strategy NAME
343
+ Specify strategy class name (default:
344
+ `DefaultStrategy`).
345
+ --strategy-path PATH Specify additional strategy lookup path.
346
+
283
347
```
284
348
285
349
## Edge commands
286
350
287
351
To know your trade expectancy and winrate against historical data, you can use Edge.
288
352
289
353
```
290
- usage: freqtrade edge [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE]
291
- [--max_open_trades MAX_OPEN_TRADES]
292
- [--stake_amount STAKE_AMOUNT] [-r]
293
- [--stoplosses STOPLOSS_RANGE]
354
+ usage: freqtrade edge [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
355
+ [--userdir PATH] [-s NAME] [--strategy-path PATH]
356
+ [-i TICKER_INTERVAL] [--timerange TIMERANGE]
357
+ [--max_open_trades INT] [--stake_amount STAKE_AMOUNT]
358
+ [--stoplosses STOPLOSS_RANGE]
294
359
295
360
optional arguments:
296
361
-h, --help show this help message and exit
297
362
-i TICKER_INTERVAL, --ticker-interval TICKER_INTERVAL
298
- Specify ticker interval (1m, 5m, 30m, 1h, 1d).
363
+ Specify ticker interval (`1m`, `5m`, `30m`, `1h`,
364
+ `1d`).
299
365
--timerange TIMERANGE
300
366
Specify what timerange of data to use.
301
- --max_open_trades MAX_OPEN_TRADES
367
+ --max_open_trades INT
302
368
Specify max_open_trades to use.
303
369
--stake_amount STAKE_AMOUNT
304
370
Specify stake_amount.
305
371
--stoplosses STOPLOSS_RANGE
306
- Defines a range of stoploss against which edge will
307
- assess the strategy the format is "min,max,step"
308
- (without any space).example:
309
- --stoplosses=-0.01,-0.1,-0.001
372
+ Defines a range of stoploss values against which edge
373
+ will assess the strategy. The format is "min,max,step"
374
+ (without any space). Example:
375
+ `--stoplosses=-0.01,-0.1,-0.001`
376
+
377
+ Common arguments:
378
+ -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
379
+ --logfile FILE Log to the file specified.
380
+ -V, --version show program's version number and exit
381
+ -c PATH, --config PATH
382
+ Specify configuration file (default: `config.json`).
383
+ Multiple --config options may be used. Can be set to
384
+ `-` to read config from stdin.
385
+ -d PATH, --datadir PATH
386
+ Path to directory with historical backtesting data.
387
+ --userdir PATH, --user-data-dir PATH
388
+ Path to userdata directory.
389
+
390
+ Strategy arguments:
391
+ -s NAME, --strategy NAME
392
+ Specify strategy class name (default:
393
+ `DefaultStrategy`).
394
+ --strategy-path PATH Specify additional strategy lookup path.
395
+
310
396
```
311
397
312
398
To understand edge and how to read the results, please read the [ edge documentation] ( edge.md ) .
0 commit comments