How to Build a Crypto Signal Bot Using RSI and MACD

Pim Feltkamp7 min read
A practical guide to building an RSI- and MACD-powered signal bot that identifies potential entry and exit points on crypto markets using technical indicators.
Share this article

Technical indicators have been part of traders' toolkits for decades, but turning them into an automated, rules-based system is where many people get stuck. A crypto signal bot using RSI and MACD removes the emotional layer from the process — the bot applies your defined conditions consistently, every candle, around the clock. This guide walks you through how these two indicators work, how to combine them into coherent bot logic, and how to evaluate that logic before risking real capital.

Crypto is highly volatile and trading involves substantial risk of loss. Everything in this article is educational. Nothing here constitutes financial or investment advice.


What Is a Crypto Signal Bot — and How Does It Differ from a DCA or Grid Bot?

A signal bot reacts to indicator conditions. When a defined combination of technical signals is true, the bot triggers a potential entry or exit. That is fundamentally different from:

  • DCA (Dollar-Cost Averaging) bots, which buy at fixed time or price intervals regardless of market conditions.
  • Grid bots, which place buy and sell orders at predefined price levels above and below a base price, profiting from oscillation within a range.

A signal bot does not trade on a schedule or a price ladder. It waits for the market to tell it something — through RSI levels, MACD crossovers, or a combination of both — before acting. This makes it more context-aware but also more dependent on the quality of the indicator logic you define.


How Does RSI and MACD Work Together in Crypto Trading?

RSI (Relative Strength Index) is a momentum oscillator that measures the speed and magnitude of recent price changes on a 0–100 scale. Readings below 30 are traditionally considered oversold (potential exhaustion of selling pressure), and readings above 70 are considered overbought (potential exhaustion of buying pressure).

MACD (Moving Average Convergence Divergence) compares two exponential moving averages — typically the 12-period and 26-period EMAs — and plots the difference as the MACD line. A 9-period EMA of that line forms the signal line. When the MACD line crosses above the signal line, it indicates building bullish momentum; a cross below signals bearish momentum. The histogram visualises the distance between the two lines, making momentum acceleration or deceleration easy to read at a glance.

Used together, RSI provides an overbought/oversold context while MACD provides a directional momentum trigger. A potential long signal might require RSI below 35 and a bullish MACD crossover occurring simultaneously — both conditions being true reduces the number of false signals that either indicator would generate alone.

Combining RSI and MACD means requiring two independent pieces of evidence before the bot acts — a simple but effective filter that reduces noise in choppy markets.


What Are the Best Settings for RSI and MACD in a Crypto Bot?

There is no universally "best" setting. However, a widely used baseline to start backtesting from is:

ParameterCommon Starting ValueWhat It Controls
RSI Period14Lookback window for momentum calculation
RSI Oversold Threshold30Potential long-entry zone
RSI Overbought Threshold70Potential long-exit / short-entry zone
MACD Fast EMA12Shorter-term price average
MACD Slow EMA26Longer-term price average
MACD Signal Line9EMA of the MACD line (crossover trigger)
Candle Timeframe1H or 4HReduces noise vs. sub-minute charts

Shorter RSI periods (e.g., 7 or 9) make the indicator more reactive but also more prone to false signals. Longer periods (e.g., 21) smooth out noise but can lag significantly on fast-moving crypto assets. The same trade-off applies to MACD fast/slow periods. Always validate any parameter change through backtesting before applying it live.


Designing the Bot Logic: Combining RSI + MACD Conditions

The goal is a set of clear, unambiguous rules the bot evaluates on every closed candle. A practical example of a long-entry rule set:

Entry Conditions (Long)

  1. RSI(14) crosses below 30 on the current or previous candle (oversold signal).
  2. MACD line crosses above the signal line on the same candle or within the last two candles (bullish momentum confirmation).
  3. Both conditions must occur on the same timeframe (e.g., 1H chart).

Exit Conditions

  1. RSI(14) rises above 70 (overbought — potential exhaustion of upside move).
  2. Or MACD line crosses below the signal line (momentum reverting downward).
  3. Or a stop-loss price level is hit (see safety section below).

Using "AND" logic for entries tightens the filter. Using "OR" logic for exits is deliberately more sensitive — you want to exit quickly if any reversal signal appears, not wait for all conditions to align against you.

Well-designed bot logic is explicit and testable. If you cannot write your strategy as a set of true/false conditions, it is not ready to be automated.


How Do I Create a Crypto Signal Bot with RSI and MACD Indicators?

You have two paths: write indicator logic in code yourself, or describe what you want in plain language and let an AI builder generate it for you.

Cryptohopper.AI takes the second approach. You describe your RSI and MACD signal strategy in natural language — the indicator periods, thresholds, entry/exit rules, which trading pair and exchange to watch — and the platform generates a working, deployable signal bot. Projects are automatically hosted at a cryptohopper.app subdomain with no manual deployment step required. Your Cryptohopper account is connected via OAuth so the bot can operate within your existing setup, and any API keys or secrets are encrypted at rest and never exposed in generated code.

This is particularly useful for traders who have a clear strategy in mind but want to move from idea to running prototype quickly, without writing and debugging indicator calculations from scratch.


Backtesting Your RSI + MACD Strategy on Historical Candles

Before switching any signal bot to live trading, run it against historical price data. Backtesting tells you how your defined rules would have performed on past candles — useful for understanding signal frequency, win rate, and drawdown characteristics.

Key backtesting practices:

  • Use out-of-sample data. Optimise your parameters on one date range, then test on a separate, unseen range. If performance collapses on the out-of-sample set, the strategy is likely curve-fitted to the first dataset.
  • Check signal frequency. If your RSI + MACD conditions only fire twice a year on a 1H chart, you have too few data points to draw conclusions.
  • Measure drawdown, not just returns. A strategy that shows high theoretical gains but 60% peak-to-trough drawdown is difficult to live through psychologically and financially.
  • Account for fees. Every entry and exit has a cost. Backtests that ignore trading fees routinely overstate results.

Past backtest performance never guarantees future results, especially in crypto, where volatility regimes can shift rapidly.


Is RSI or MACD More Reliable for Crypto Trading Signals?

Neither indicator is reliably "better" in isolation — both have meaningful weaknesses when used alone.

RSI can remain in overbought or oversold territory for extended periods during strong trends, generating premature reversal signals. MACD crossovers on short timeframes produce frequent whipsaws in ranging markets.

The practical answer is that reliability comes from combination and context, not from choosing one over the other. RSI constrains when you act (only near extremes); MACD confirms the direction of momentum before you do. That layering is precisely why most signal bot strategies use both.


Safety Practices: Position Sizing, Stop-Losses, and Avoiding Over-Optimisation

Even a well-backtested strategy can produce extended losing streaks in live conditions. These practices do not eliminate risk but help keep losses manageable:

  • Position sizing: Decide in advance what percentage of available capital each signal can deploy. Risking a fixed small percentage per trade (e.g., 1–2%) limits the impact of any single bad signal on your overall account.
  • Stop-loss orders: Define a maximum acceptable loss per trade as a price level or a fixed percentage below entry. The bot should exit if this level is hit regardless of what RSI or MACD say.
  • Avoid over-optimisation: If you keep tweaking RSI and MACD parameters until the backtest looks perfect, you are likely fitting the strategy to historical noise rather than a real edge. Set parameters, test once on out-of-sample data, and accept the result.
  • Start small: Run any new signal bot configuration with minimal position sizes until you have observed its live behaviour over at least a few weeks.

Wrapping Up

A crypto signal bot using RSI and MACD is one of the more approachable ways to systematise technical analysis — RSI provides the context, MACD provides the momentum trigger, and combining them filters the noise that either generates alone. The discipline, however, lies in rigorous backtesting, honest appraisal of results, and layering in stop-losses and position sizing before going live. If you want to move from strategy idea to a deployed, hosted signal bot without writing the indicator code yourself, Cryptohopper.AI lets you describe your RSI and MACD rules in plain language and handles the build and deployment automatically.

Frequently asked questions

What is the best crypto signal bot using RSI and MACD?

There is no single universally best configuration — the most effective crypto signal bot for RSI and MACD is one whose specific parameters (RSI period and thresholds, MACD fast/slow/signal settings) have been backtested on historical data for the specific asset and timeframe you are trading, and then validated on out-of-sample data before going live. Common starting points are RSI(14) with 30/70 thresholds and MACD(12, 26, 9), but these should always be tested rather than assumed optimal.

How does RSI and MACD work together in crypto trading?

RSI identifies whether an asset is potentially oversold (below 30) or overbought (above 70), providing a price-exhaustion context. MACD crossovers — when the MACD line crosses above or below its signal line — indicate shifts in momentum direction. Using both together means requiring two independent confirming signals before triggering a trade, which reduces the false signals that either indicator generates on its own.

Can a crypto bot generate accurate signals with RSI and MACD?

A bot can apply RSI and MACD rules consistently and without emotion, which is itself valuable. However, 'accuracy' depends on market conditions: in trending markets, RSI oversold readings can remain depressed for extended periods; in ranging markets, MACD crossovers can whipsaw frequently. No indicator combination produces reliable signals in all conditions, which is why backtesting on a representative historical range and implementing stop-losses are both essential before going live.

What are the best settings for RSI and MACD in a crypto bot?

A widely used baseline is RSI with a 14-period lookback and oversold/overbought thresholds of 30 and 70, paired with MACD settings of 12 (fast EMA), 26 (slow EMA), and 9 (signal line), on a 1H or 4H candle timeframe. These are starting points for backtesting, not definitive optimal values. Shorter RSI periods increase sensitivity but also false signals; longer periods reduce noise but add lag. Always validate any parameter change through backtesting before applying it live.

Is RSI or MACD more reliable for crypto trading signals?

Neither is reliably more accurate in isolation. RSI can stay in overbought or oversold territory for long stretches during strong trends, generating premature reversal signals. MACD crossovers produce frequent whipsaws on short timeframes in ranging markets. The practical consensus is that combining both — using RSI to identify extreme conditions and MACD to confirm momentum direction — produces more reliable signal filtering than either indicator used alone.

How do I create a crypto signal bot with RSI and MACD indicators?

You need to define clear entry and exit rules based on RSI and MACD conditions, then either code those rules yourself or use a platform that builds the bot from a natural-language description. The logic typically involves AND conditions for entries (e.g., RSI below 30 AND MACD bullish crossover) and OR conditions for exits (e.g., RSI above 70 OR MACD bearish crossover OR stop-loss hit). After building, backtest the strategy on historical candles and validate on out-of-sample data before trading with real capital.

Share this article

Subscribe to the Cryptohopper newsletter

New posts, product updates, and the occasional lesson — straight to your inbox.

We'll never share your email. Unsubscribe anytime.

Related articles