A trading bot without proper risk management is like a car without brakes — it'll go fast, right until it crashes.
The biggest mistake in automated trading isn't a bad strategy. It's a good strategy with bad risk management. A 60% win rate with 3:1 risk-reward sounds great until a losing streak blows through your account because you risked 5% per trade.
This guide covers the practical risk controls every automated forex trader needs.
The Foundation: Position Sizing
Position sizing answers one question: how much do you risk on each trade?
The 1-2% Rule
Never risk more than 1-2% of your account on a single trade. This isn't conservative — it's survival:
- At 1% risk per trade, a 10-trade losing streak costs 10% of your account
- At 5% risk per trade, a 10-trade losing streak costs 50% of your account
- A 50% drawdown requires a 100% gain to recover
How to calculate lot size:
Risk Amount = Account Balance × Risk Percentage
Lot Size = Risk Amount / (SL in pips × Pip Value per lot)
Example: $10,000 account, 1% risk, 40-pip SL on EURUSD:
Risk Amount = $10,000 × 0.01 = $100
Lot Size = $100 / (40 × $10) = 0.25 lots
Set this in your alert:
{
"action": "alertX",
"symbol": "EURUSD",
"magic": 1001,
"direction": "BUY",
"size": 0.25,
"sl": 40,
"tp": 80
}
Adjusting for Volatility
Different pairs have different volatilities. A 30-pip SL on EURUSD is reasonable. A 30-pip SL on XAUUSD is suicidal.
Adjust your SL to the instrument, then calculate lot size from there:
| Pair | Typical SL Range | Lot Size at 1% ($10K) |
|---|---|---|
| EUR/USD | 20-60 pips | 0.17-0.50 lots |
| GBP/USD | 30-80 pips | 0.12-0.33 lots |
| USD/JPY | 20-60 pips | 0.25-0.75 lots |
| XAU/USD | 80-200 pips | 0.05-0.12 lots |
| GBP/JPY | 40-120 pips | 0.08-0.25 lots |
Maximum Open Positions
Running multiple strategies simultaneously multiplies your risk. If you have 5 strategies each risking 2%, your total exposure is 10% — a bad day could cost you dearly.
Set position limits: - Total across all strategies: 3-5 positions for accounts under $20K - Per strategy: 1-2 positions for most strategies - Per pair: Never have more than 2 positions on the same pair (they're correlated)
Correlation Risk
This is the silent killer of multi-strategy bots. You think you're diversified because you're trading 5 different pairs. But if 4 of them are USD pairs, you're really making one big bet on the dollar.
Highly correlated pairs: - EUR/USD and GBP/USD move together (both vs USD) - AUD/USD and NZD/USD move together (both commodity currencies vs USD) - EUR/GBP often moves opposite to EUR/USD
Practical rule: Don't have more than 2-3 positions on the same side of the same currency. If you're long EUR/USD and long GBP/USD, you're essentially double-short USD.
Drawdown Limits
Set hard limits on how much your bot can lose before it stops:
Daily Drawdown Limit
If you lose more than 2-3% in a single day, stop trading for the rest of the day. This prevents revenge-trading behavior even in an automated system — your strategy may be hitting a regime change that it wasn't designed for.
Weekly Drawdown Limit
If your bot loses more than 5% in a week, pause it and review. Is the strategy still valid? Has market behavior changed? Did something break technically?
Maximum Drawdown
Set an absolute maximum drawdown (e.g., 15-20% from peak equity). If reached, stop the bot entirely and reassess. This is your emergency brake.
Breakeven and Trailing: Your Safety Net
Two features that dramatically improve risk-adjusted returns:
Breakeven
Move your stop loss to entry price after a configurable profit level. The trade can no longer lose money (except for spread/slippage).
{
"move_sl_after": 25,
"move_sl_to": 3
}
After 25 pips of profit, SL moves to entry + 3 pips. Worst case is now a +3 pip gain.
Trailing Stop
Lock in progressively more profit as the trade moves in your favor:
{
"trail_activate": 40,
"trail_distance": 20
}
After 40 pips of profit, the SL trails 20 pips behind the best price. If the trade reaches +80 pips and reverses, you're stopped out at +60 pips — not back at breakeven.
Time-Based Risk Controls
Trading Hours
Not all hours are equal. Avoid: - Daily rollover (5pm EST): Spreads widen, liquidity drops - Low-liquidity sessions: Asian session for most pairs (except JPY) - 5 minutes before/after major news: Slippage can be extreme
Configure your EA with trading schedule filters:
{
"start_time": "08:00",
"end_time": "20:00"
}
Weekend Gaps
Forex markets close Friday 5pm EST and reopen Sunday 5pm EST. Prices can gap significantly. If you hold positions over the weekend: - Your SL may be skipped (gapped past) - Losses can exceed your SL level - Consider closing all positions before Friday close
News Events
Major economic releases (NFP, FOMC, CPI) cause extreme volatility. Options: - Pause the bot 15 minutes before and after - Tighten stops during news windows - Accept the volatility as part of your strategy (if backtested)
Testing Risk Management
Before going live, stress-test your risk settings:
Monte Carlo Simulation
Take your backtest results and randomize the order of trades. Does your strategy survive the worst-case sequence? If a specific order of wins and losses could blow your account, your position sizing is too aggressive.
Worst-Case Scenarios
- What happens during 10 consecutive losses?
- What if your biggest winner turns into your biggest loser (SL slippage)?
- What if correlation spikes and all your positions lose simultaneously?
If any scenario puts you below your maximum drawdown limit, reduce position sizes.
FAQ
Should I use a fixed lot size or percentage-based? Percentage-based is better for compounding and risk control. Fixed lot size is simpler but doesn't adapt as your account grows or shrinks.
What's an acceptable drawdown? For most traders, a maximum drawdown of 15-20% from peak equity is the threshold. Beyond 20%, the psychological and mathematical recovery becomes very difficult.
How do I know if my strategy stopped working? Compare live results to backtest expectations. If your live win rate or average trade deviates significantly (more than 2 standard deviations) from backtest results over 50+ trades, something may have changed.
Automate your risk management alongside your strategy. iNakaTrader supports breakeven, trailing stop, partial TP, and position limits — all configurable per-signal.
Risk Disclaimer: Trading forex and other financial instruments involves substantial risk of loss and is not suitable for all investors. Past performance does not guarantee future results. Only trade with capital you can afford to lose. iNakaTrader provides signal execution tools, not financial advice.