DEV Community

Paarthurnax
Paarthurnax

Posted on

How AI Agents Can Enforce Your Crypto Risk Rules (Paper Trading)

How AI Agents Can Enforce Your Crypto Risk Rules (Paper Trading)

Here's an uncomfortable truth about crypto trading: you are your own worst enemy.

Not the market. Not the whales. You.

The impulsive "I'll just buy a little more" at the top. The panicked sell-off at the bottom. The "I'll skip the stop loss just this once" that costs you 30% overnight.

AI agents can't predict markets. But they can enforce your rules when you won't.

This guide shows you how to configure OpenClaw to be your rule-enforcer — for paper trading and beyond.

⚠️ Disclaimer: Not financial advice. Paper trading only. You can lose 100% of capital.


The Psychology Problem in Crypto Trading

Studies consistently show that retail crypto traders underperform systematic rule-based approaches — not because the rules are magic, but because humans don't follow rules under pressure.

When BTC drops 15% in 4 hours, your stop loss at -8% feels like a mistake. You remove it. It drops another 20%. You've now lost 35% instead of 8%.

This is the core problem AI agents solve: rules are enforced mechanically, without emotion, every single time.


The Three Risk Rules That Matter Most

Before coding anything, decide on your rules. These are the three that matter most:

Rule 1: Position Sizing

Never risk more than X% of your portfolio on a single position.

Max position size = 20% of total portfolio
Example: $10,000 portfolio → max $2,000 per position
Enter fullscreen mode Exit fullscreen mode

This prevents one bad trade from destroying your portfolio.

Rule 2: Stop Loss

Exit when a position drops more than X% from entry.

Stop loss = -8% from entry price
Example: Buy BTC at $67,000 → stop out at $61,640
Enter fullscreen mode Exit fullscreen mode

8% is conservative. Some traders use 5%, some 15%. The number matters less than enforcing it.

Rule 3: Take Profit

Exit when a position gains more than X%.

Take profit = +15% from entry price
Example: Buy ETH at $3,800 → take profit at $4,370
Enter fullscreen mode Exit fullscreen mode

Taking profits is psychologically hard. Automating it removes the decision.


Configuring Risk Rules in OpenClaw

Open your crypto-scanner config:

{
  "risk_management": {
    "max_portfolio_pct_per_trade": 20,
    "stop_loss_pct": 8,
    "take_profit_pct": 15,
    "max_open_positions": 3,
    "daily_loss_limit_pct": 10,
    "enforce_strictly": true
  },
  "paper_trading": true
}
Enter fullscreen mode Exit fullscreen mode

The enforce_strictly: true flag means the agent will refuse to simulate a trade that violates these rules, even if a signal triggers.


The RiskGuard Skill

OpenClaw's RiskGuard skill adds an extra layer — it validates every proposed trade against your rules before execution (or simulation).

clawhub install riskguard
openclaw skill configure riskguard
Enter fullscreen mode Exit fullscreen mode

RiskGuard runs as a middleware:

CoinGecko data → Signal detected → RiskGuard checks → Trade executed (or blocked)
Enter fullscreen mode Exit fullscreen mode

If a trade would violate any rule, RiskGuard logs the block:

[riskguard] BLOCKED: Buy SOL signal
  Reason: Would exceed max_portfolio_pct (current: 18%, limit: 20%)
  Action required: Close existing position before new entry allowed
Enter fullscreen mode Exit fullscreen mode

This paper trail is invaluable. You can review every decision made and blocked.


Advanced Rule: Correlation Risk

Here's one most beginners skip: correlation risk.

If you hold BTC, ETH, and SOL and the market crashes, all three drop simultaneously. You're not diversified — you're triply exposed to crypto market risk.

Configure correlation limits:

{
  "risk_management": {
    "max_correlated_exposure_pct": 40,
    "correlation_pairs": [
      ["bitcoin", "ethereum", "solana"],
      ["cardano", "polkadot"]
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

This tells RiskGuard that BTC + ETH + SOL are correlated. Max combined exposure: 40%.


Advanced Rule: Drawdown Protection

A drawdown limit stops all trading if your paper portfolio loses too much:

{
  "risk_management": {
    "max_drawdown_pct": 20,
    "drawdown_action": "halt_trading",
    "drawdown_review_period_hours": 24
  }
}
Enter fullscreen mode Exit fullscreen mode

If the paper portfolio drops 20% from its high, the agent halts all new simulated trades for 24 hours. This simulates the "step away and reassess" behavior that protects real accounts.


Setting Up a Risk Dashboard

OpenClaw includes a simple web dashboard for monitoring paper trading risk metrics:

openclaw dashboard start
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:3000 in your browser. You'll see:

  • Current paper portfolio value and P&L
  • Open positions with stop loss and take profit levels
  • Recent signals triggered and blocked
  • 30-day performance chart
  • Risk utilization (how close you are to limits)

The Daily Risk Review Routine

Configure your agent to send a daily risk summary via Telegram:

{
  "daily_report": {
    "time": "08:00",
    "include": [
      "portfolio_value",
      "open_positions",
      "signals_triggered_yesterday",
      "signals_blocked_by_riskguard",
      "drawdown_from_peak"
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

Sample report:

📊 Daily Risk Report — 2026-03-21

Portfolio: $10,847 (+8.47% from start)
Open positions: 2/3 max
  BTC: +5.2% | SL: $62,100 | TP: $77,050
  ETH: -1.8% | SL: $3,520 | TP: $4,485

Signals yesterday: 3 triggered, 1 blocked (position limit)
Drawdown from peak: 2.1%

Status: 🟢 All risk rules within limits
Enter fullscreen mode Exit fullscreen mode

This daily review habit translates directly to real trading discipline.


What Paper Trading Risk Management Teaches You

After 60 days of running these rules:

  1. Stop losses save more than you think — reviewing blocked losses is eye-opening
  2. Position sizing is everything — big wins in small positions barely matter; big losses in oversized positions devastate
  3. Correlation kills diversification — that "diversified" altcoin portfolio often moves as one
  4. Rules you set calm are different from rules you'll follow in heat — paper trading reveals this safely

Get the Full RiskGuard Package

The OpenClaw Crypto Home Trader 2026 package at dragonwhisper36.gumroad.com includes:

  • RiskGuard skill with pre-configured conservative ruleset
  • Portfolio tracker with drawdown monitoring
  • Daily risk report templates
  • Community Discord where traders share their rule configs
  • "30-Day Paper Challenge" with daily prompts to refine your rules

Start trading with discipline, not hope.


⚠️ Not financial advice. Paper trading only. You can lose 100% of capital in live trading. Risk management rules do not guarantee profits or prevent losses. Crypto markets are highly volatile. Always do your own research (DYOR).

Top comments (0)