The Bot
Risk Management
How the bot protects your capital with multiple layers of risk controls.
Risk Parameters
| Parameter | Default | Description |
|---|---|---|
| risk_per_trade_pct | 1.0% | % of balance risked per trade |
| max_daily_loss_pct | 3.0% | Stop trading if daily loss exceeds this |
| max_drawdown_pct | 10.0% | Hard stop if equity drops this % from peak |
| max_open_trades | 3 | Maximum concurrent open positions |
| max_daily_trades | 10 | Maximum trades per day |
| max_spread_pips | 3.0 | Skip trade if spread is wider than this |
| min_rr_ratio | 2.0 | Minimum risk:reward ratio to take a trade |
| pause_after_consecutive_losses | 3 | Pause bot after N losses in a row |
| trade_timeout_hours | 48 | Force-close trades older than this |
Lot Size Calculation
Lot size is calculated dynamically based on your account balance, risk percentage, and the SL distance of each signal:
text
risk_amount = balance × risk_per_trade_pct risk_per_lot = (sl_distance / tick_size) × tick_value lot_size = risk_amount / risk_per_lot
Position Management
Once a trade is open, the bot manages it automatically every 60 seconds:
text
At 1R profit: → Move SL to breakeven → Close 50% of position (partial close) At 1.5R profit: → Trail SL at 0.5R behind current price At 48h (configurable): → Force close regardless of profit/loss
Note: All risk parameters can be updated live from the Settings page in the dashboard. The bot reloads settings.json every cycle so changes take effect within 60 seconds.