Fix conflicts

This commit is contained in:
Anton
2018-05-03 11:16:29 +03:00
43 changed files with 1113 additions and 694 deletions

View File

@@ -14,12 +14,12 @@ Since the version `0.16.0` the bot allows using custom strategy file.
This is very simple. Copy paste your strategy file into the folder
`user_data/strategies`.
Let assume you have a strategy file `awesome-strategy.py`:
Let assume you have a class called `AwesomeStrategy` in the file `awesome-strategy.py`:
1. Move your file into `user_data/strategies` (you should have `user_data/strategies/awesome-strategy.py`
2. Start the bot with the param `--strategy awesome-strategy` (the parameter is the name of the file without '.py')
2. Start the bot with the param `--strategy AwesomeStrategy` (the parameter is the class name)
```bash
python3 ./freqtrade/main.py --strategy awesome_strategy
python3 ./freqtrade/main.py --strategy AwesomeStrategy
```
## Change your strategy
@@ -35,11 +35,18 @@ A strategy file contains all the information needed to build a good strategy:
- Stoploss recommended
- Hyperopt parameter
The bot also include a sample strategy you can update: `user_data/strategies/test_strategy.py`.
You can test it with the parameter: `--strategy test_strategy`
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`
```bash
python3 ./freqtrade/main.py --strategy awesome_strategy
python3 ./freqtrade/main.py --strategy AwesomeStrategy
```
### Specify custom strategy location
If you want to use a strategy from a different folder you can pass `--strategy-path`
```bash
python3 ./freqtrade/main.py --strategy AwesomeStrategy --strategy-path /some/folder
```
**For the following section we will use the [user_data/strategies/test_strategy.py](https://github.com/gcarq/freqtrade/blob/develop/user_data/strategies/test_strategy.py)

View File

@@ -26,9 +26,9 @@ optional arguments:
--version show program's version number and exit
-c PATH, --config PATH
specify configuration file (default: config.json)
-s PATH, --strategy PATH
specify strategy file (default:
freqtrade/strategy/default_strategy.py)
-s NAME, --strategy NAME
specify strategy class name (default: DefaultStrategy)
--strategy-path PATH specify additional strategy lookup path
--dry-run-db Force dry run to use a local DB
"tradesv3.dry_run.sqlite" instead of memory DB. Work
only if dry_run is enabled.
@@ -48,21 +48,19 @@ python3 ./freqtrade/main.py -c path/far/far/away/config.json
```
### How to use --strategy?
This parameter will allow you to load your custom strategy file. Per
default without `--strategy` or `-s` the bot will load the
`default_strategy` included with the bot (`freqtrade/strategy/default_strategy.py`).
This parameter will allow you to load your custom strategy class.
Per default without `--strategy` or `-s` the bot will load the
`DefaultStrategy` included with the bot (`freqtrade/strategy/default_strategy.py`).
The bot will search your strategy file into `user_data/strategies` and
`freqtrade/strategy`.
The bot will search your strategy file within `user_data/strategies` and `freqtrade/strategy`.
To load a strategy, simply pass the file name (without .py) in this
parameters.
To load a strategy, simply pass the class name (e.g.: `CustomStrategy`) in this parameter.
**Example:**
In `user_data/strategies` you have a file `my_awesome_strategy.py` to
load it:
In `user_data/strategies` you have a file `my_awesome_strategy.py` which has
a strategy class called `AwesomeStrategy` to load it:
```bash
python3 ./freqtrade/main.py --strategy my_awesome_strategy
python3 ./freqtrade/main.py --strategy AwesomeStrategy
```
If the bot does not find your strategy file, it will display in an error
@@ -70,9 +68,16 @@ message the reason (File not found, or errors in your code).
Learn more about strategy file in [optimize your bot](https://github.com/gcarq/freqtrade/blob/develop/docs/bot-optimization.md).
### How to use --strategy-path?
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!):
```bash
python3 ./freqtrade/main.py --strategy AwesomeStrategy --strategy-path /some/folder
```
#### How to install a strategy?
This is very simple. Copy paste your strategy file into the folder
`user_data/strategies`. And voila, the bot is ready to use it.
`user_data/strategies` or use `--strategy-path`. And voila, the bot is ready to use it.
### How to use --dynamic-whitelist?
Per default `--dynamic-whitelist` will retrieve the 20 currencies based

View File

@@ -35,6 +35,8 @@ The table below will list all configuration parameters.
| `telegram.token` | token | No | Your Telegram bot token. Only required if `telegram.enabled` is `true`.
| `telegram.chat_id` | chat_id | No | Your personal Telegram account id. Only required if `telegram.enabled` is `true`.
| `initial_state` | running | No | Defines the initial application state. More information below.
| `strategy` | DefaultStrategy | No | Defines Strategy class to use.
| `strategy_path` | null | No | Adds an additional strategy lookup path (must be a folder).
| `internals.process_throttle_secs` | 5 | Yes | Set the process throttle. Value in second.
The definition of each config parameters is in

View File

@@ -127,3 +127,14 @@ Day Profit BTC Profit USD
## /version
> **Version:** `0.14.3`
### using proxy with telegram
in [freqtrade/freqtrade/rpc/telegram.py](https://github.com/gcarq/freqtrade/blob/develop/freqtrade/rpc/telegram.py) replace
```
self._updater = Updater(token=self._config['telegram']['token'], workers=0)
```
with
```
self._updater = Updater(token=self._config['telegram']['token'], request_kwargs={'proxy_url': 'socks5://127.0.0.1:1080/'}, workers=0)
```