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?
- Duplicate
user_data/strategies/test_strategy.py
to a new fileuser_data/strategies/custom_strategy.py
- Replace the content of
populate_indicators()
,populate_buy_trend()
,populate_buy_trend()
, andpopulate_sell_trend()
by the customization you have made previously intofreqtrade/analyse.py
- Define
minimal_roi
,stoploss
, andticker_interval
(You can remove them from your configuration) - 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
- Test strategy included with the bot: user_data/strategies/test_strategy.py
- 4 tests strategies: here
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
- Wiki-Home
- Documentation
- Contributing
- Developer docs
- FAQ
- SQL Cheatsheet
- Release notes
- 2022.11
- 2022.10
- 2022.9
- 2022.8
- 2022.7
- 2022.6
- 2022.5
- 2022.4
- 2022.3
- 2022.2
- 2022.1
- 2021.12
- 2021.11
- 2021.10
- 2021.9
- 2021.8
- 2021.7
- 2021.6
- 2021.5
- 2021.4
- 2021.3
- 2021.2
- 2021.1
- 2020.12
- 2020.11
- 2020.10
- 2020.9.1
- 2020.8
- 2020.7
- 2020.6
- 2020.5
- 2020.4
- 2020.3
- 2020.02
- 2020.01
- 2019.11
- 2019.10
- 2019.9
- 2019.8
- 2019.7
- 2019.6
- 0.18.5
- 0.18.1
- 0.18.0
- 0.17.2
- 0.17.1
- 0.17.0
- 0.16.1
- 0.16.0