Merge branch 'develop' into plot_commands
This commit is contained in:
@@ -79,18 +79,18 @@ freqtrade backtesting --datadir user_data/data/bittrex-20180101
|
||||
#### With a (custom) strategy file
|
||||
|
||||
```bash
|
||||
freqtrade -s TestStrategy backtesting
|
||||
freqtrade -s SampleStrategy 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 SampleStrategy` refers to the class name within the strategy file `sample_strategy.py` found in the `freqtrade/user_data/strategies` directory.
|
||||
|
||||
#### Comparing multiple Strategies
|
||||
|
||||
```bash
|
||||
freqtrade backtesting --strategy-list TestStrategy1 AwesomeStrategy --ticker-interval 5m
|
||||
freqtrade backtesting --strategy-list SampleStrategy1 AwesomeStrategy --ticker-interval 5m
|
||||
```
|
||||
|
||||
Where `TestStrategy1` and `AwesomeStrategy` refer to class names of strategies.
|
||||
Where `SampleStrategy1` and `AwesomeStrategy` refer to class names of strategies.
|
||||
|
||||
#### Exporting trades to file
|
||||
|
||||
@@ -103,7 +103,7 @@ The exported trades can be used for [further analysis](#further-backtest-result-
|
||||
#### Exporting trades to file specifying a custom filename
|
||||
|
||||
```bash
|
||||
freqtrade backtesting --export trades --export-filename=backtest_teststrategy.json
|
||||
freqtrade backtesting --export trades --export-filename=backtest_samplestrategy.json
|
||||
```
|
||||
|
||||
#### Running backtest with smaller testset
|
||||
|
@@ -61,8 +61,9 @@ Mandatory parameters are marked as **Required**.
|
||||
| `order_time_in_force` | None | Configure time in force for buy and sell orders. [More information below](#understand-order_time_in_force). [Strategy Override](#parameters-in-the-strategy).
|
||||
| `exchange.name` | | **Required.** Name of the exchange class to use. [List below](#user-content-what-values-for-exchangename).
|
||||
| `exchange.sandbox` | false | Use the 'sandbox' version of the exchange, where the exchange provides a sandbox for risk-free integration. See [here](sandbox-testing.md) in more details.
|
||||
| `exchange.key` | '' | API key to use for the exchange. Only required when you are in production mode.
|
||||
| `exchange.secret` | '' | API secret to use for the exchange. Only required when you are in production mode.
|
||||
| `exchange.key` | '' | API key to use for the exchange. Only required when you are in production mode. ***Keep it in secrete, do not disclose publicly.***
|
||||
| `exchange.secret` | '' | API secret to use for the exchange. Only required when you are in production mode. ***Keep it in secrete, do not disclose publicly.***
|
||||
| `exchange.password` | '' | API password to use for the exchange. Only required when you are in production mode and for exchanges that use password for API requests. ***Keep it in secrete, do not disclose publicly.***
|
||||
| `exchange.pair_whitelist` | [] | List of pairs to use by the bot for trading and to check for potential trades during backtesting. Can be overriden by dynamic pairlists (see [below](#dynamic-pairlists)).
|
||||
| `exchange.pair_blacklist` | [] | List of pairs the bot must absolutely avoid for trading and backtesting. Can be overriden by dynamic pairlists (see [below](#dynamic-pairlists)).
|
||||
| `exchange.ccxt_config` | None | Additional CCXT parameters passed to the regular ccxt instance. Parameters may differ from exchange to exchange and are documented in the [ccxt documentation](https://ccxt.readthedocs.io/en/latest/manual.html#instantiation)
|
||||
@@ -76,8 +77,8 @@ Mandatory parameters are marked as **Required**.
|
||||
| `pairlist.method` | StaticPairList | Use static or dynamic volume-based pairlist. [More information below](#dynamic-pairlists).
|
||||
| `pairlist.config` | None | Additional configuration for dynamic pairlists. [More information below](#dynamic-pairlists).
|
||||
| `telegram.enabled` | true | **Required.** Enable or not the usage of Telegram.
|
||||
| `telegram.token` | token | Your Telegram bot token. Only required if `telegram.enabled` is `true`.
|
||||
| `telegram.chat_id` | chat_id | Your personal Telegram account id. Only required if `telegram.enabled` is `true`.
|
||||
| `telegram.token` | token | Your Telegram bot token. Only required if `telegram.enabled` is `true`. ***Keep it in secrete, do not disclose publicly.***
|
||||
| `telegram.chat_id` | chat_id | Your personal Telegram account id. Only required if `telegram.enabled` is `true`. ***Keep it in secrete, do not disclose publicly.***
|
||||
| `webhook.enabled` | false | Enable usage of Webhook notifications
|
||||
| `webhook.url` | false | URL for the webhook. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
|
||||
| `webhook.webhookbuy` | false | Payload to send on buy. Only required if `webhook.enabled` is `true`. See the [webhook documentationV](webhook-config.md) for more details.
|
||||
|
@@ -139,7 +139,7 @@ You can override strategy settings as demonstrated below.
|
||||
# Define some constants
|
||||
ticker_interval = "5m"
|
||||
# Name of the strategy class
|
||||
strategy_name = 'TestStrategy'
|
||||
strategy_name = 'SampleStrategy'
|
||||
# Path to user data
|
||||
user_data_dir = 'user_data'
|
||||
# Location of the strategy
|
||||
|
@@ -1 +1 @@
|
||||
mkdocs-material==4.4.0
|
||||
mkdocs-material==4.4.1
|
@@ -24,7 +24,7 @@ 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.
|
||||
`cp user_data/strategies/test_strategy.py user_data/strategies/awesome-strategy.py`
|
||||
`cp user_data/strategies/sample_strategy.py user_data/strategies/awesome-strategy.py`
|
||||
|
||||
### Anatomy of a strategy
|
||||
|
||||
@@ -36,14 +36,19 @@ A strategy file contains all the information needed to build a good strategy:
|
||||
- Minimal ROI recommended
|
||||
- Stoploss strongly recommended
|
||||
|
||||
The bot also include a sample strategy called `TestStrategy` you can update: `user_data/strategies/test_strategy.py`.
|
||||
You can test it with the parameter: `--strategy TestStrategy`
|
||||
The bot also include a sample strategy called `SampleStrategy` you can update: `user_data/strategies/sample_strategy.py`.
|
||||
You can test it with the parameter: `--strategy SampleStrategy`
|
||||
|
||||
Additionally, there is an attribute called `INTERFACE_VERSION`, which defines the version of the strategy interface the bot should use.
|
||||
The current version is 2 - which is also the default when it's not set explicitly in the strategy.
|
||||
|
||||
Future versions will require this to be set.
|
||||
|
||||
```bash
|
||||
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/sample_strategy.py](https://github.com/freqtrade/freqtrade/blob/develop/user_data/strategies/sample_strategy.py)
|
||||
file as reference.**
|
||||
|
||||
!!! Note Strategies and Backtesting
|
||||
@@ -109,9 +114,8 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
|
||||
return dataframe
|
||||
```
|
||||
|
||||
|
||||
!!! Note "Want more indicator examples?"
|
||||
Look into the [user_data/strategies/test_strategy.py](https://github.com/freqtrade/freqtrade/blob/develop/user_data/strategies/test_strategy.py).<br/>
|
||||
Look into the [user_data/strategies/sample_strategy.py](https://github.com/freqtrade/freqtrade/blob/develop/user_data/strategies/sample_strategy.py).
|
||||
Then uncomment indicators you need.
|
||||
|
||||
### Buy signal rules
|
||||
@@ -122,7 +126,7 @@ It's important to always return the dataframe without removing/modifying the col
|
||||
|
||||
This will method will also define a new column, `"buy"`, which needs to contain 1 for buys, and 0 for "no action".
|
||||
|
||||
Sample from `user_data/strategies/test_strategy.py`:
|
||||
Sample from `user_data/strategies/sample_strategy.py`:
|
||||
|
||||
```python
|
||||
def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
@@ -152,7 +156,7 @@ It's important to always return the dataframe without removing/modifying the col
|
||||
|
||||
This will method will also define a new column, `"sell"`, which needs to contain 1 for sells, and 0 for "no action".
|
||||
|
||||
Sample from `user_data/strategies/test_strategy.py`:
|
||||
Sample from `user_data/strategies/sample_strategy.py`:
|
||||
|
||||
```python
|
||||
def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
|
Reference in New Issue
Block a user