Copy
Trading Bots
Events
More

Add Regime Detection to Freqtrade Bot in 5 Minutes

2026/07/16 17:00Browse 0

Freqtrade Bot Gets Smarter with Regime Detection

Most Freqtrade strategies trade identically in bull, bear, and choppy markets, often leading to poor performance. A momentum strategy that thrives in a bull run can bleed during sideways action, while mean reversion strategies get crushed by strong trends. A new API from Regime Intelligence offers a simple fix: add market regime detection to your Freqtrade bot in about five minutes.

The Regime API provides a dedicated endpoint for Freqtrade that returns the current market regime — bull, bear, or chop — along with a confidence score and a suggested action. The action field maps directly to Freqtrade behavior: "full_trading" for normal operation, "reduce_exposure" for bear regimes, and "minimal_trading" for chop. The free tier supports up to 10 requests per minute, enough for most strategies that evaluate every five minutes.

Two Ways to Integrate Regime Detection

The simplest integration involves adding a few lines of Python code to your strategy class. The `get_regime()` method caches the API response for five minutes to avoid excessive calls. In the `custom_stake_amount` method, you scale position sizes based on regime: 1.0 for bull, 0.4 for chop, and 0.15 for bear, with further adjustment by confidence. The `confirm_trade_entry` method can block new entries entirely when the regime is bearish with high confidence.

Alternatively, you can treat the regime as an informative pair. This non-code approach adds the regime and its confidence as columns to your DataFrame, allowing you to filter entry signals directly in `populate_entry_trend`. For example, you can skip entries when the regime is bearish while keeping your existing conditions.

Backtest Results and Practical Use

Backtesting over 302,000 candles with a simple SMA 50/200 crossover strategy showed that the regime filter's main benefit is drawdown avoidance. It keeps the bot out of the worst market periods, improving risk-adjusted returns. The full integration guide is available at getregime.com/freqtrade. For real-time regime data and webhook alerts on regime shifts, a Pro tier is available for $49 per month.

Disclaimer: This page may contain third-party information and does not necessarily reflect BYDFi's views or opinions. This content is for general reference only and does not constitute any representation, warranty, financial advice, or investment advice. BYDFi is not responsible for any errors, omissions, or any results arising from the use of such information. Virtual asset investments involve risks. Please carefully evaluate the risks of the product and your risk tolerance based on your financial situation. For more information, please refer to our Terms of Use and Risk Disclosure.