Code Monkey home page Code Monkey logo

run-freqtrade-docker's Introduction

Run Freqtrade on Docker

Easier way to run freqtrade on Docker without having to download all the code base.

Example of use would be to clone this repo in a VM running Ubuntu and run the docker command.

Pre-requisites: docker and make installed

1) Clone project and generate config files

# Clone repo
git clone github.com/evzpav/run-freqtrade-docker

# Enter project folder
cd run-freqtrade-docker

# This script will create the ~./freqtrade folder with config files there
make init

2.0) Adjust and add Telegram and Exchange API keys to ~/.freqtrade/config_dry.json and ~/.freqtrade/config_prod.json newly created

2.1) Add your strategy file inside the folder ./user_data/strategies

3) Download exchange data

make download-data 
    TIMEFRAME=4h \
    STRATEGY=bbrsi #for production only

4.0) Run backtest

make backtest \
    STRATEGY=bbrsi \
    FEE=0.001 \ # 0.1% x 2 (entry and exit)
    TIMERANGE=20180101-20191008 \
    TIMEFRAME=4h \
    CONFIG_FILE=config_dry.json \
    DB_FILE=tradesv3.dryrun.sqlite

4.1) Plot dataframe chart after backtest

make plot \
    STRATEGY=bbrsi \
    CONFIG_FILE=config_dry.json \
    DB_FILE=tradesv3.dryrun.sqlite \
    PAIRS='ETH/BTC LTC/BTC' \ #with spaces between pairs
    IND1='bb_lowerband bb_middleband' \ #with spaces between indicators
    IND2=rsi

4.2) Plot profit charts

make plot-profit \
    DB_FILE=tradesv3.dryrun.sqlite \
    PAIRS='ETH/BTC LTC/BTC' #with spaces between pairs

4.3) Add your strategy optmization to ./user_data/hyperopts and run optimization:

make hyperopt \
    HYPEROPT=bbrsi \
    TIMERANGE=20180101-20191008 \
    ITERATIONS=100 \
    OPT_TARGET=all \
    FEE=0.001

5) Run bot locally in dry run mode

make run \
    STRATEGY=bbrsi \
    CONFIG_FILE=config_dry.json  \
    DB_FILE=tradesv3.dryrun.sqlite

6.0) Run in production mode

This will run the freqtrade bot on docker in the background

# Create config folder and config file to be copied for production
make init-prod STRATEGY=bbrsi \
    CONFIG_PATH=./config_example.json \
    EXCHANGE_KEY=your_exchange_key \
    EXCHANGE_SECRET=your_exchange_secret \
    TELEGRAM_TOKEN=your_telegram_token \
    TELEGRAM_CHAT_ID=your_telegram_chat_id 

# Edit ~/.freqtrade_$STRATEGY/config_dry_$STRATEGY.json and ~/.freqtrade_$STRATEGY/config_prod_$STRATEGY.json files accordingly

# Run in production
make run-prod STRATEGY=bbrsi DRYRUN=false

6.1) Stop the docker of freqtrade in production

make stop-prod STRATEGY=bbrsi

Other commands

# List timeframes
make timeframes EXCHANGE=bittrex

# List exchanges
make exchanges

run-freqtrade-docker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.