3 0.16.0 Release notes
Matthias edited this page 2019-08-13 10:58:29 +02:00

Breaking Changes

This version introduces a major update on strategies. Indicators, Buy and Sell strategies have moved from analyze.py to custom strategies you can create into user_data/strategies/ folder.

We suggest you starting by reading the updated documentation about the strategies: Bot usage and backtesting

The bot still includes a default strategy, but you can now create and update your own strategy without worrying of merge conflicts at each release. It will also allow you to play with different strategies without updating the bot source code.

How to move your strategy into a custom strategy?

  1. Duplicate user_data/strategies/test_strategy.py to a new file user_data/strategies/custom_strategy.py
  2. Replace the content of populate_indicators(), populate_buy_trend(), populate_buy_trend(), and populate_sell_trend() by the customization you have made previously into freqtrade/analyse.py
  3. Define minimal_roi, stoploss, and ticker_interval (You can remove them from your configuration)
  4. Start the bot with the param --strategy <strategy_filename> or -s <strategy_filename>
python3 ./freqtrade/main.py --strategy custom_strategy

If the strategy file is not found or contains code errors the bot will fallback to the default strategy included (located into freqtrade/strategy/default_strategy.py).

Note: Strategies already integrates minimal_roi, stoploss, and ticker_interval values. This value in the config file becomes optional and can be removed. However, if you keep minimal_roi, stoploss, and ticker_interval they will override the strategy values.

Strategies samples

Command helper

Below is the updated commands you need know to run your bot:

Running bot with custom strategy file inside strategy folder
python3 freqtrade/main.py --strategy my_awesome_strategy

Backtesting with a custom ticker (Values 1, 5, 30, 60, 1440)
python3 freqtrade/main.py backtesting --realistic-simulation --ticker-interval 30

Backtesting with your custom strategy file
python3 freqtrade/main.py -s my_awesome_strategy backtesting --realistic-simulation --ticker-interval 30

Run Hyperopt with custom ticker interval
python3 freqtrade/main.py -c config.json hyperopt --ticker-interval 30

Running HyperOpt with your strategy file
python3 freqtrade/main.py -s my_awesome_strategy hyperopt --ticker-interval 30

Plot your Trade with your custom strategy
freqtrade\scripts>plot_dataframe.py -s my_awesome_strategy -p BTC_DOPE -i 30

Thanks @rohit366 for this summary