DEV Community

Gennady
Gennady

Posted on • Originally published at trendrider.net

I Analyzed 500+ Crypto Trades From My Bot — Here Are the 5 Risk Management Rules That Actually Work

After running a crypto trading bot 24/7 for over a month, I've collected enough data to share what actually works for risk management. Not theory — real results from real trades.

The Setup

I use Freqtrade, an open-source Python framework, trading 15 crypto pairs on Bybit futures. The bot uses a multi-indicator scoring system where each signal gets a confidence score before execution.

Current stats:

  • 67.9% win rate across all pairs
  • 2.12 profit factor
  • 1.42% maximum drawdown
  • 15 trading pairs (BTC, ETH, SOL, BNB, and 11 altcoins)

Here are the 5 risk management rules that made the biggest difference.


Rule 1: Dynamic Position Sizing > Fixed Lot Size

Most tutorials tell you to risk 1-2% per trade. That's a start, but it misses the point.

What actually works is confidence-based position sizing:

def calculate_position_size(confidence_score, base_risk=0.01):
    if confidence_score >= 8:
        return base_risk * 1.5  # High confidence = slightly larger
    elif confidence_score >= 5:
        return base_risk * 1.0  # Normal
    else:
        return base_risk * 0.5  # Low confidence = smaller
Enter fullscreen mode Exit fullscreen mode

When your system has high conviction (multiple indicators aligned, volume confirmed, trend in favor), you can afford to size up slightly. When signals are marginal, size down.

This alone improved my risk-adjusted returns by ~18%.

Rule 2: Stoploss Optimization Is More Important Than Entry Optimization

I spent weeks optimizing entry signals. Then I ran a backtest where I kept entries random but optimized stoplosses. The optimized stoploss version outperformed.

Here's what I found:

Stoploss Type Win Rate Avg Loss Profit Factor
Fixed -6% 52% -6.35% 1.12
Fixed -3.5% 58% -3.2% 1.89
Trailing 2% 61% -2.8% 2.01
ATR-based (2x ATR) 64% -2.4% 2.12

ATR-based stoploss adapts to volatility. In calm markets, the stop is tighter. In volatile markets, it gives more room. Simple concept, massive impact.

Rule 3: Time-Based Exits Save You From Zombie Trades

A trade that hasn't moved in 24 hours is probably not going to work. I added a simple rule:

If a position hasn't reached 1% profit within 24 candles (on 1h timeframe), close it.

This eliminated "zombie trades" — positions that slowly bleed through fees and opportunity cost. My average trade duration dropped from 18 hours to 11 hours, and win rate went up because I stopped holding losers.

Rule 4: Regime Detection Prevents the Worst Drawdowns

Not all market conditions are created equal. My bot uses a simple regime detector:

def detect_regime(dataframe):
    adx = ta.ADX(dataframe)
    ema200_slope = (dataframe['ema200'] - dataframe['ema200'].shift(10)) / dataframe['ema200'].shift(10)

    if adx > 30 and abs(ema200_slope) > 0.02:
        return 'trending'
    elif adx < 20:
        return 'ranging'
    else:
        return 'transitional'
Enter fullscreen mode Exit fullscreen mode

My oscillator-based entries work great in ranging markets but get destroyed in strong trends. By reducing position sizes (or skipping trades entirely) during trending regimes, I avoid the worst drawdowns.

Result: Max drawdown dropped from 4.2% to 1.42%.

Rule 5: Correlation Awareness Across Pairs

Trading 15 crypto pairs sounds diversified. It's not. When BTC dumps, everything dumps.

I limit my exposure:

  • Max 3 positions in the same direction
  • If BTC is in a strong trend, reduce altcoin entries
  • Never have more than 30% of capital deployed simultaneously

This is boring but effective. The one time I ignored this rule, I had 6 long positions open when BTC dropped 5% in an hour. All 6 stopped out. Lesson learned.


The Numbers Don't Lie

Before implementing these rules, my system had a 48% win rate and a profit factor of 1.15. After: 67.9% win rate, 2.12 profit factor.

The entries barely changed. Risk management IS the edge.

What's Next

I'm currently paper-trading v3 of the strategy with these improvements baked in. Building everything in public and sharing results.

If you're building a crypto trading bot, my advice: spend 20% of your time on entries, 80% on risk management. The difference is night and day.


What risk management rules have worked for you? Drop a comment below.

Full transparency: I share all trades publicly via Telegram @TrendRiderFree

Top comments (0)