# AI use cases for Freqtrade (freqtrade/freqtrade)

Repo: [freqtrade/freqtrade](https://github.com/freqtrade/freqtrade) | Use cases: 3 | Page: https://dedupedai.com/use-cases/freqtrade-freqtrade/

Freqtrade is a free, open-source crypto trading bot in Python that supports major exchanges including Binance, Bybit, Kraken, OKX and Hyperliquid. It includes dry-run mode, backtesting, plotting, money management, strategy optimisation by machine learning (hyperopt), the FreqAI adaptive prediction module, and control through Telegram or a built-in web UI. The README says it is for educational purposes and to always start in dry-run. Not financial advice: paper trade first, and remember you can lose money.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Backtest a crypto strategy on real exchange data: https://dedupedai.com/use-cases/freqtrade-freqtrade/backtest-a-crypto-strategy-with-freqtrade/
- Dry-run a crypto bot and control it from Telegram: https://dedupedai.com/use-cases/freqtrade-freqtrade/dry-run-a-crypto-bot-controlled-from-telegram/
- Tune a strategy with hyperopt and FreqAI: https://dedupedai.com/use-cases/freqtrade-freqtrade/optimize-a-strategy-with-hyperopt-and-freqai/

## How to backtest a crypto strategy on real exchange data with Freqtrade

Repo: [freqtrade/freqtrade](https://github.com/freqtrade/freqtrade) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Create a user directory and strategy, download candles, and simulate your buy and sell rules.

**Who it is for:** A developer with a crypto strategy idea who wants to see how it would have done before running it.

**The problem:** Without a simulation you only learn a strategy is bad after it loses money.

**The outcome:** Backtest results for your strategy on downloaded exchange data, plus a check for look ahead bias.

### Steps

1. Follow the Docker Quickstart in the docs, or install natively with Python 3.12 or newer
2. Run Freqtrade with `create-userdir`, then `new-config` and `new-strategy` to scaffold your setup
3. Download candles with `download-data` for your pairs and timeframe
4. Run `backtesting` and review past results with `backtesting-show`
5. Check the strategy for look ahead bias with `lookahead-analysis`

### Prompt to paste into your agent

```text
Using freqtrade/freqtrade, scaffold a user directory and a strategy for <idea> on <pairs> and <timeframe>, download data, backtest it over <period>, and run lookahead-analysis. Report profit, drawdown and trade count, and any bias it found.
```

### Caveat

Backtests on past candles do not guarantee future results. Not financial advice: paper trade first, and remember you can lose money.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/freqtrade-freqtrade/backtest-a-crypto-strategy-with-freqtrade/

## How to dry-run a crypto bot and control it from Telegram with Freqtrade

Repo: [freqtrade/freqtrade](https://github.com/freqtrade/freqtrade) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Run the bot without real money and check status, profit and exits from your phone.

**Who it is for:** Someone who wants to watch a strategy trade live markets for weeks without risking funds.

**The problem:** A strategy that backtested well can still behave differently in live markets.

**The outcome:** A bot trading live prices in dry-run, with /status, /profit, /daily and /stopentry from Telegram or the web UI.

### Steps

1. Set your config to Dry-run, which runs the bot without paying money
2. Start the bot with the `trade` command
3. Connect Telegram and use /status, /profit and /daily to watch it
4. Use /stopentry to stop new trades and /forceexit to close one
5. Install the built-in web UI with `install-ui` if you prefer a browser

### Prompt to paste into your agent

```text
Run freqtrade/freqtrade in dry-run with <strategy> on <exchange> and <pairs>, connect Telegram, and after <time> send me /profit and /performance output. Confirm dry-run is on before starting.
```

### Caveat

The README says never to engage money before you understand how the bot works and what profit or loss to expect. Not financial advice: paper trade first, and remember you can lose money.

Risk, credentials: When you add exchange API keys, give them trade permission only, never withdrawal, and keep them out of shared configs.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/freqtrade-freqtrade/dry-run-a-crypto-bot-controlled-from-telegram/

## How to tune a strategy with hyperopt and FreqAI with Freqtrade

Repo: [freqtrade/freqtrade](https://github.com/freqtrade/freqtrade) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Search strategy parameters with machine learning, or build a self-training model with FreqAI.

**Who it is for:** A quant hobbyist who wants to tune parameters or try adaptive machine learning models.

**The problem:** Hand tuning parameters is slow and easy to overfit.

**The outcome:** Optimised parameter sets ranked by a loss function, or a FreqAI model that retrains on the market.

### Steps

1. Run `hyperopt` on your strategy and list results with `hyperopt-list`
2. Inspect a result with `hyperopt-show` and see loss functions with `list-hyperoptloss`
3. See available models with `list-freqaimodels` and read the FreqAI docs
4. Check formulas with `recursive-analysis` and re-run `lookahead-analysis` before trusting results

### Prompt to paste into your agent

```text
With freqtrade/freqtrade, run hyperopt on <strategy> over <period>, show the best three parameter sets, then backtest the best one on a later out of sample period and compare.
```

### Caveat

Optimised parameters often overfit the past, so always validate on unseen data and in dry-run. Not financial advice: paper trade first, and remember you can lose money.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/freqtrade-freqtrade/optimize-a-strategy-with-hyperopt-and-freqai/
