/*
- FreqHub Strategies - Curated Strategies for Freqtrade to be used with FreqHub
- Copyright (C) 2025 - 2026 FreqHub Strategies Contributors
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see https://www.gnu.org/licenses/.
- ⚖️ DISCLAIMER
- USE AT YOUR OWN RISK
- This software is provided "as is", without warranty of any kind, express or implied,
- including but not limited to the warranties of merchantability, fitness for a particular
- purpose and noninfringement. In no event shall the authors or copyright holders be liable
- for any claim, damages or other liability, whether in an action of contract, tort or
- otherwise, arising from, out of or in connection with the software or the use or other
- dealings in the software.
- Trading cryptocurrencies involves substantial risk of loss and is not suitable for every
- investor. The value of cryptocurrencies may fluctuate, and you may lose some or all of
- your investment. Past performance is not indicative of future results. */
Strategies for Freqtrade, intended to run as individual bots in FreqHub. The goal is to keep multiple strategies in one repository and provide a consistent way to run them.
strategies/: Freqtrade strategies (one folder per strategy).GLOSSARY.md: Definitions of common trading and config terms.
See GLOSSARY.md for definitions of indicators, pattern names, and config fields.
See TRADING_OVERVIEW.md for a general, beginner-friendly trading workflow and
how these strategies map to it.
BinHV45: Mean reversion strategy with Bollinger Bands.EMACrossover: EMA crossover strategy with momentum confirmation.FailureToReturn: Failure to Return (FTR) breakout continuation strategy.IchiV1: Ichimoku Cloud strategy.MandelbrotFibonacci: Fractals + Fibonacci pullback strategy.Markov: discrete Markov state transitions.MarkovFastEMA: Markov with fast EMA confirmation.MarkovRSI: Markov with optimizable RSI thresholds.MarkovVolume: Markov with volume confirmation.MessageTest: Messaging test strategy (do not use for live trading).RSI_Bollinger: RSI + Bollinger example.RSIEMA50: RSI + EMA50 trend-following strategy.TemplateStrategy: minimal example strategy.
- Docker (for build and run).
- Freqtrade (included in the base image).
- FreqHub (to manage bots). Reference: https://github.com/hrodrig/freqhub
Each strategy includes its own config.json.example. Copy it to config.json
and use that as your base, then adjust:
exchange.keyandexchange.secretpairlistsapi_server(user, password, and port) so FreqHub can connect
Each strategy folder includes a config.json.example (copy to config.json)
and may include its own
docker-compose.yml. For strategy-specific details, see the README.md inside
each strategy folder.
Start a bot using the strategy's config.json (after copying from the example):
./scripts/bot up strategies/FreqHub.Strategy.TemplateStrategyStop it:
./scripts/bot down strategies/FreqHub.Strategy.TemplateStrategyRun all strategies with a config.json present:
./scripts/bots upStop all strategies:
./scripts/bots downFrom any directory:
docker compose -f strategies/FreqHub.Strategy.TemplateStrategy/docker-compose.yml up -dStop it with:
docker compose -f strategies/FreqHub.Strategy.TemplateStrategy/docker-compose.yml downIn FreqHub, add the bot pointing to the Freqtrade API using the service name:
http://<service-name>:8080 (for example, http://freqtrade-template-strategy:8080).
Notes:
- If a
docker-compose.ymlexists in the strategy folder,uprunsdocker compose up -d --build, anddownrunsdocker compose down. - To clean orphaned containers explicitly, set
REMOVE_ORPHANS=true. - The
freqtrade-networkis expected to already exist (usually created by FreqHub or another compose stack). - For local testing, you can create or remove the network manually:
./scripts/net upand./scripts/net down(or setNETWORK_NAME). - Port guidance: use
8010for the template strategy, and8011+for additional strategies (avoid port collisions).
When you use scripts/bot up, these variables are supported:
IMAGE: Docker image to run (default:freqhub-strategy-<dir>:latest).STRATEGY: Strategy class name (default: read fromconfig.json).STRATEGY_DIR: Strategy folder name (default: basename of the folder).API_PORT: Host port for Freqtrade API (default:8080).BOT_SUFFIX: Optional suffix for container name.CONTAINER_NAME: Optional override for container name.DATA_DIR: Host data dir (default:<strategy_dir>/data).REMOVE_ORPHANS: Set totrueto clean orphaned containers (compose only).COMPOSE_IGNORE_ORPHANS: Set to1to ignore orphan warnings (default).
API_PORT=8012to avoid port conflicts.IMAGE=your-registry/freqhub-strategy-template:latestto use a custom image.STRATEGY=TemplateStrategyto override the strategy class.
- Create a folder:
strategies/FreqHub.Strategy.<StrategyName>/ - Add the strategy file:
<StrategyName>Strategy.pywith a class inheritingIStrategy. - Optionally add a
config.json.exampleand aREADME.mdinside the strategy folder. - Update
docker-compose.ymlto use it via--strategy <StrategyName>.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Copyright (C) 2025 - 2026 FreqHub Contributors
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
- Freqtrade - The amazing trading bot this project is built for
- FreqHub - Amazing UI for Freqtrade with multi-bots
- FreqUI - Inspiration and reference implementation
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Donations: Donations
Note: FreqHub Strategies is an independent project and is not officially affiliated with the Freqtrade project.