Capital & Risk Management — Position Sizing, Drawdown Control and Safety Limits
We add a dedicated risk layer to your bot or manual trading: exact lot sizing from stop distance, hard loss limits, and automatic protection that works even when the strategy is wrong.
A risk management system controls how much you can lose: it sizes each trade from a fixed risk percent and the stop-loss distance, caps daily and total drawdown, limits open exposure, and manages trailing stops automatically. ExpertNevees builds these as modules for existing Expert Advisors, standalone MetaTrader panels, or Python services that watch several accounts, typically in 5–10 days.
Risk Controls We Implement
Risk-percent sizing
Drawdown limits
Exposure caps
Trailing and break-even
Scaling rules
Kill-switch and alerts
Position Sizing Models Compared
| Model | How it works | Strength | Weakness |
|---|---|---|---|
| Fixed lot | Same lot every trade | Simple | Risk changes with stop distance and account size |
| Fixed risk % | Lot from balance × risk% ÷ stop-loss cost | Constant risk per trade | Needs a defined stop-loss |
| Volatility-adjusted | Stop distance from ATR, then fixed risk % | Adapts to market conditions | ATR settings need validation |
| Fractional Kelly | Fraction of the Kelly criterion from win rate and payoff | Mathematically grounded growth | Very sensitive to estimation errors, so use a small fraction |
Risk-Percent Position Sizing in Python
import math
def position_size(balance: float, risk_pct: float, sl_distance: float,
tick_size: float, tick_value: float,
vol_step: float, vol_min: float, vol_max: float) -> float:
"""Lots such that a stop-out loses ~risk_pct of balance. Returns 0.0 if it cannot be done safely."""
risk_money = balance * risk_pct / 100.0
loss_per_lot = sl_distance / tick_size * tick_value # money lost per 1.0 lot at the stop
if loss_per_lot <= 0:
return 0.0
lots = math.floor(risk_money / loss_per_lot / vol_step) * vol_step
if lots < vol_min: # never round UP into more risk than allowed
return 0.0
return min(lots, vol_max)
# Example: 10,000 balance, 1% risk, 30-pip stop on a 5-digit pair
print(position_size(10_000, 1.0, 0.0030, 0.00001, 1.0, 0.01, 0.01, 100.0)) # 0.33
The sign of good risk code is what it refuses to do: it returns zero rather than rounding up into a trade riskier than you allowed.
How a Daily-Loss Guard Behaves in Practice
Record the day’s starting equity
At the start of your trading day (broker or custom time), the system stores equity as the reference.
Monitor equity continuously
Floating profit and loss are included, not only closed trades, so open losses count.
Trigger at your limit
At the daily loss limit, the guard blocks new entries and, if configured, closes open positions.
Alert and lock
You get an alert and trading stays locked until the next day or a manual reset.
Using Risk Controls for Prop-Firm Challenges
- ●Daily and maximum drawdown rules are enforced automatically instead of by discipline.
- ●Position sizes are consistent, which avoids a single oversized trade ending a challenge.
- ●Rules differ per firm (balance-based or equity-based, trailing or static). We implement the exact rule set you are subject to; always check your firm’s current terms.
Delivery, Support & Guarantee
Timelines are indicative. The exact price and delivery date are confirmed in writing before work starts, with no hidden costs. Payment: 50% advance, 50% after your approval (USDT or bank wire).
Frequently Asked Questions
Can you add risk management to my existing Expert Advisor?
Yes. We add sizing, drawdown and trailing modules to EAs you already own, or build a separate panel that protects the account regardless of which EA is trading.
What is the right risk per trade?
It depends on your strategy’s edge, drawdown tolerance and account goals. Many traders use between 0.25% and 2% per trade. We implement the percent you choose and can show how drawdown behaves for different values in a backtest.
Does the system work with several MetaTrader accounts?
Yes. A Python service can monitor multiple accounts and enforce limits across them, and MetaTrader panels can be installed on each terminal.
Can it close trades automatically when drawdown is hit?
Yes. You choose whether the guard only blocks new trades, closes all positions, or just alerts you.
Does it replace a stop-loss?
No. It complements it. Every trade should still have a protective stop. The system calculates size from the stop and adds portfolio-level limits above it.
How is this different from the EA service?
Risk management is the protective layer that can sit on top of any strategy. See Expert Advisor Development for full strategy automation.
Official Documentation & Sources
- MQL5 Reference — Trade Functions and Account InfoMQL5.comView Docs ↗
- MetaTrader 5 Python IntegrationMQL5.comView Docs ↗
Protect Your Account With Rules That Never Get Emotional
Tell us your limits and platform. We build the guard and test it before delivery.