Merge branch 'develop' into feature/objectify

This commit is contained in:
gcarq 2018-03-19 19:10:19 +01:00
commit 967bf417df
9 changed files with 19 additions and 14 deletions

2
.gitignore vendored
View File

@ -88,3 +88,5 @@ target/
.venv .venv
.idea .idea
.vscode .vscode
.pytest_cache/

View File

@ -1,7 +1,7 @@
FROM python:3.6.2 FROM python:3.6.4-slim-stretch
# Install TA-lib # Install TA-lib
RUN apt-get update && apt-get -y install build-essential && apt-get clean RUN apt-get update && apt-get -y install curl build-essential && apt-get clean
RUN curl -L http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz | \ RUN curl -L http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz | \
tar xzvf - && \ tar xzvf - && \
cd ta-lib && \ cd ta-lib && \

View File

@ -2,6 +2,7 @@
[![Build Status](https://travis-ci.org/gcarq/freqtrade.svg?branch=develop)](https://travis-ci.org/gcarq/freqtrade) [![Build Status](https://travis-ci.org/gcarq/freqtrade.svg?branch=develop)](https://travis-ci.org/gcarq/freqtrade)
[![Coverage Status](https://coveralls.io/repos/github/gcarq/freqtrade/badge.svg?branch=develop&service=github)](https://coveralls.io/github/gcarq/freqtrade?branch=develop) [![Coverage Status](https://coveralls.io/repos/github/gcarq/freqtrade/badge.svg?branch=develop&service=github)](https://coveralls.io/github/gcarq/freqtrade?branch=develop)
[![Maintainability](https://api.codeclimate.com/v1/badges/5737e6d668200b7518ff/maintainability)](https://codeclimate.com/github/gcarq/freqtrade/maintainability)
Simple High frequency trading bot for crypto currencies designed to Simple High frequency trading bot for crypto currencies designed to
@ -104,7 +105,7 @@ vi config.json
**3. Build your docker image and run it** **3. Build your docker image and run it**
```bash ```bash
docker build -t freqtrade . docker build -t freqtrade .
docker run --rm -v `pwd`/config.json:/freqtrade/config.json -it freqtrade docker run --rm -v /etc/localtime:/etc/localtime:ro -v `pwd`/config.json:/freqtrade/config.json -it freqtrade
``` ```

View File

@ -53,13 +53,13 @@ python3 ./freqtrade/main.py backtesting --datadir freqtrade/tests/testdata-20180
**With a (custom) strategy file** **With a (custom) strategy file**
```bash ```bash
python3.6 ./freqtrade/main.py -s currentstrategy backtesting python3 ./freqtrade/main.py -s currentstrategy backtesting
``` ```
Where `-s currentstrategy` refers to a filename `currentstrategy.py` in `freqtrade/user_data/strategies` Where `-s currentstrategy` refers to a filename `currentstrategy.py` in `freqtrade/user_data/strategies`
**Exporting trades to file** **Exporting trades to file**
```bash ```bash
freqtrade backtesting --export trades python3 ./freqtrade/main.py backtesting --export trades
``` ```
**Running backtest with smaller testset** **Running backtest with smaller testset**
@ -99,7 +99,7 @@ cd user_data/data-20180113
Possibly edit pairs.json file to include/exclude pairs Possibly edit pairs.json file to include/exclude pairs
```bash ```bash
python freqtrade/tests/testdata/download_backtest_data.py -p pairs.json python3 freqtrade/tests/testdata/download_backtest_data.py -p pairs.json
``` ```
The script will read your pairs.json file, and download ticker data The script will read your pairs.json file, and download ticker data

View File

@ -129,7 +129,7 @@ docker images
You can run a one-off container that is immediately deleted upon exiting with the following command (`config.json` must be in the current working directory): You can run a one-off container that is immediately deleted upon exiting with the following command (`config.json` must be in the current working directory):
```bash ```bash
docker run --rm -v `pwd`/config.json:/freqtrade/config.json -it freqtrade docker run --rm -v /etc/localtime:/etc/localtime:ro -v `pwd`/config.json:/freqtrade/config.json -it freqtrade
``` ```
In this example, the database will be created inside the docker instance and will be lost when you will refresh your image. In this example, the database will be created inside the docker instance and will be lost when you will refresh your image.
@ -152,6 +152,7 @@ mv tradesv3.sqlite ~/.freqtrade
```bash ```bash
docker run -d \ docker run -d \
--name freqtrade \ --name freqtrade \
-v /etc/localtime:/etc/localtime:ro \
-v ~/.freqtrade/config.json:/freqtrade/config.json \ -v ~/.freqtrade/config.json:/freqtrade/config.json \
-v ~/.freqtrade/tradesv3.sqlite:/freqtrade/tradesv3.sqlite \ -v ~/.freqtrade/tradesv3.sqlite:/freqtrade/tradesv3.sqlite \
freqtrade freqtrade

View File

@ -73,5 +73,5 @@ The `-p` pair argument, can be used to plot a single pair
Example Example
``` ```
python3.6 scripts/plot_profit.py --datadir ../freqtrade/freqtrade/tests/testdata-20171221/ -p BTC_LTC python3 scripts/plot_profit.py --datadir ../freqtrade/freqtrade/tests/testdata-20171221/ -p BTC_LTC
``` ```

View File

@ -15,7 +15,7 @@ The only things you need is a working Telegram bot and its API token.
Below we explain how to create your Telegram Bot, and how to get your Below we explain how to create your Telegram Bot, and how to get your
Telegram user id. Telegram user id.
### 1. Create your instagram bot ### 1. Create your Telegram bot
**1.1. Start a chat with https://telegram.me/BotFather** **1.1. Start a chat with https://telegram.me/BotFather**
**1.2. Send the message** `/newbot` **1.2. Send the message** `/newbot`
*BotFather response:* *BotFather response:*

View File

@ -79,6 +79,7 @@ def test_loss_calculation_prefer_correct_trade_count() -> None:
Test Hyperopt.calculate_loss() Test Hyperopt.calculate_loss()
""" """
hyperopt = _HYPEROPT hyperopt = _HYPEROPT
Strategy({'strategy': 'default_strategy'})
correct = hyperopt.calculate_loss(1, hyperopt.target_trades, 20) correct = hyperopt.calculate_loss(1, hyperopt.target_trades, 20)
over = hyperopt.calculate_loss(1, hyperopt.target_trades + 100, 20) over = hyperopt.calculate_loss(1, hyperopt.target_trades + 100, 20)
@ -169,10 +170,10 @@ def test_fmin_best_results(mocker, default_conf, caplog) -> None:
mocker.patch('freqtrade.optimize.hyperopt.hyperopt_optimize_conf', return_value=conf) mocker.patch('freqtrade.optimize.hyperopt.hyperopt_optimize_conf', return_value=conf)
mocker.patch('freqtrade.logger.Logger.set_format', MagicMock()) mocker.patch('freqtrade.logger.Logger.set_format', MagicMock())
Strategy({'strategy': 'default_strategy'})
hyperopt = Hyperopt(conf) hyperopt = Hyperopt(conf)
hyperopt.trials = create_trials(mocker) hyperopt.trials = create_trials(mocker)
hyperopt.tickerdata_to_dataframe = MagicMock() hyperopt.tickerdata_to_dataframe = MagicMock()
Strategy({'strategy': 'default_strategy'})
hyperopt.start() hyperopt.start()
exists = [ exists = [

View File

@ -1,6 +1,6 @@
python-bittrex==0.3.0 python-bittrex==0.3.0
SQLAlchemy==1.2.4 SQLAlchemy==1.2.5
python-telegram-bot==9.0.0 python-telegram-bot==10.0.1
arrow==0.12.1 arrow==0.12.1
cachetools==2.0.1 cachetools==2.0.1
requests==2.18.4 requests==2.18.4
@ -10,8 +10,8 @@ pandas==0.22.0
scikit-learn==0.19.1 scikit-learn==0.19.1
scipy==1.0.0 scipy==1.0.0
jsonschema==2.6.0 jsonschema==2.6.0
numpy==1.14.1 numpy==1.14.2
TA-Lib==0.4.16 TA-Lib==0.4.17
pytest==3.4.2 pytest==3.4.2
pytest-mock==1.7.1 pytest-mock==1.7.1
pytest-cov==2.5.1 pytest-cov==2.5.1