MQL5 Risk per Trade: Lot Size Calculation and Money Management Guide

目次

1. What Is Risk per Trade in MQL5?

Conclusion:
Risk per trade means the maximum percentage of your account you are willing to lose on one trade.
By managing the allowed loss amount instead of the lot size itself, you can control the risk of account failure.

1.1 Definition of Risk per Trade

Conclusion:
Risk per trade is a numeric way to define how much loss you will allow on a single trade relative to your account balance.

Definition:
Risk per trade is the maximum loss percentage (%) relative to the account balance.

For example, interpret it this way:

  • Account balance: $100,000
  • Risk per trade: 1%
  • Maximum loss: $1,000

You then design the lot size and stop loss (SL) so the loss stays within that $1,000 limit.

The key point is that this is not a setting for winning more trades. It is a setting for controlling losses.
A trader’s survival rate is largely determined by this parameter.


1.2 Difference from Lot Size

Conclusion:
Lot size means trade volume, while risk per trade means allowed loss. They are fundamentally different concepts.

Beginners often confuse these points:

  • lot = how much you trade
  • risk per trade = how much you may lose

If you do not understand this difference, your money management can break down.

Even with the same lot size, risk changes:

  • SL of 10 pips: smaller risk
  • SL of 100 pips: larger risk

In other words, lot size alone does not determine risk.
Risk is always determined by these three factors:

  • lot size (volume)
  • SL distance (pips)
  • the value of 1 pip for the instrument

For this reason, fixed-lot trading is considered risky in practical trading.
Risk changes depending on market volatility, price movement, and spread.


1.3 Related Concepts Important for Trade Design

Conclusion:
Risk per trade does not work by itself. It becomes meaningful only when combined with several related elements.

Main related concepts:

  • position sizing
    The method of adjusting lot size based on risk.
  • stop loss
    The price where a loss is closed. It is a required condition for risk calculation.
  • spread
    The difference between bid and ask prices. It increases the real cost of the trade.
  • slippage
    The difference between the expected execution price and the actual price. It can cause risk to exceed the planned level, especially during news events.
  • execution
    Order execution quality, affected by the broker and server environment.
  • drawdown
    The percentage decline in account equity. It is strongly related to the risk setting.

The most important point is that an SL is required.
Without an SL, risk per trade does not function.


Common Misunderstandings and Cautions

  • A smaller lot is always safe: incorrect
    If the SL is wide, risk increases.
  • A high win rate means risk control is unnecessary: incorrect
    Losing streaks always happen.
  • Ignoring spread increases the actual loss.
  • Not managing combined risk across multiple positions can multiply the real risk.

2. How to Calculate Risk per Trade

Conclusion:
Calculate risk per trade in this order: allowed loss amount, SL distance, then lot size.
The correct process is to work backward from the allowed loss, not to decide the lot size first.


2.1 Basic Formula

Conclusion:
Lot size is calculated as allowed loss divided by SL distance multiplied by the value of 1 pip.

Overall calculation:

  • Allowed loss amount = account balance x risk (%)
  • Lot size = allowed loss amount / (SL distance x value of 1 pip)

Example:

  • Account balance: $100,000
  • Risk: 1%, so allowed loss is $1,000
  • SL distance: 50 pips
  • Value of 1 pip: $100, depending on the currency pair

Lot size = 1,000 / (50 x 100) = 0.2 lot

In this way, lot size is the result. It is not the starting input.

MQL5 lot size calculation based on risk per trade, showing how stop loss distance, pip value, and account balance determine position sizing before executing a trade

2.2 Practical Calculation Template

Conclusion:
If you standardize the following process, it can be reused for any currency pair.

Steps:

  • 1. Get the account balance.
  • 2. Set the risk percentage, such as 1%.
  • 3. Calculate the allowed loss amount.
  • 4. Calculate the distance from entry to SL in pips.
  • 5. Get the value per pip.
  • 6. Calculate the lot size.
  • 7. Round the result to the minimum lot and lot step.

Important points:

  • The lot size cannot be determined until the SL is defined.
  • Designing a trade by choosing the lot first is not recommended.
  • When holding multiple positions, check the combined risk.

2.3 MQL5 Implementation Example: Lot Calculation

Conclusion:
In MQL5, use AccountInfo and SymbolInfo to calculate lot size.

double CalculateLot(double risk_percent, double stoploss_pips)
{
    double balance = AccountInfoDouble(ACCOUNT_BALANCE);
    double risk_amount = balance * (risk_percent / 100.0);

    double tick_value = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
    double tick_size  = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);

    double pip_value = tick_value / tick_size;

    double lot = risk_amount / (stoploss_pips * pip_value);

    double min_lot = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MIN);
    double lot_step = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_STEP);

    lot = MathMax(min_lot, lot);
    lot = NormalizeDouble(lot / lot_step, 0) * lot_step;

    return lot;
}

Notes:

  • SYMBOL_TRADE_TICK_VALUE: the money value of the minimum price movement
  • SYMBOL_TRADE_TICK_SIZE: the size of the minimum price movement
  • Always retrieve these values because they differ by currency pair.

2.4 Practical Cautions

Conclusion:
Even if the formula is correct, real trading can produce differences from the theoretical result.

Main risk factors:

Spread

  • The position starts with a small unrealized loss at entry.
  • The loss can increase before the price reaches the SL.

Slippage

  • The execution price can differ from the expected price.
  • This is especially noticeable during news releases.

Execution Quality

  • Execution quality differs by broker.
  • VPS quality and latency also affect execution.

Differences in CFDs, Indices, and Gold

  • The pip concept differs from currency pairs.
  • How tick_value is handled is important.

Common Mistakes

  • Treating pip calculation as a fixed value
    This is risky because it differs by currency pair.
  • Not rounding the lot size
    This can cause order rejection, such as invalid volume.
  • Ignoring the minimum lot
    With small accounts, actual risk can become too large.
  • No SL setting
    The calculation itself becomes meaningless.

Supplement: Brief Difference from Other Methods

  • Fixed lot: no calculation needed, but risk varies.
  • Martingale: focuses on recovery, but the probability of failure is high.
  • Risk per trade: requires calculation, but is the most stable approach.

3. Why Risk per Trade Matters

Conclusion:
Risk per trade is the most important parameter for account survival.
By controlling losses instead of chasing profits, you can improve long-term consistency and stability.


3.1 How It Prevents Account Failure

Conclusion:
By fixing risk per trade, you create a structure where the account does not drop sharply even during a losing streak.

The most dangerous event in trading is losing a large part of the account in one trade.
The role of risk per trade is to prevent this.

Example:

  • Risk 1%: about -10% after 10 consecutive losses
  • Risk 5%: about -40% after 10 consecutive losses

This difference is critical.

Key points:

  • Risk does not worsen in a simple linear way. It compounds negatively.
  • The larger the loss, the harder recovery becomes.

For example:

  • -10% requires about +11% to recover.
  • -50% requires +100% to recover.

For this reason, designing trades to keep losses small comes first.


3.2 Relationship with Drawdown

Conclusion:
Risk per trade is the only direct way to control drawdown (DD).

Drawdown means:

  • the percentage decline from the account’s peak value
  • a durability indicator for a trading system

When risk is high:

  • DD expands quickly.
  • It can cause psychological pressure or EA shutdown.

When risk is low:

  • DD develops more gradually.
  • Long-term operation becomes easier.

Important relationship:

  • DD is roughly risk multiplied by the number of consecutive losses.

In short, reducing risk by half can greatly reduce DD.

In practical trading:

  • DD within 20%: relatively stable operation
  • DD of 30% or more: danger zone

These thresholds are common for many traders and EAs.


3.3 Fit with EA Operation

Conclusion:
For an EA, or automated trading system, risk per trade is an essential design element.

Reasons:

  • An EA trades repeatedly.
  • Losing streaks always occur.
  • It cannot stop trading based on human emotion.

In other words, risk control is even more important for an EA than for a human trader.

By fixing risk:

  • backtests and forward trading become easier to compare.
  • the equity curve becomes more reproducible.
  • the EA can be evaluated more objectively.

If risk is not set:

  • test results become less meaningful.
  • live operation is more likely to fail.

3.4 Relationship with Expected Value

Conclusion:
Even with positive expected value, an account can fail if risk is too high.

Basic trading formula:

  • Expected value = win rate x profit – loss rate x loss

The important point is:

  • loss, meaning risk, directly affects the result.

Example:

  • Even if the PF, or Profit Factor, is high,
  • a large risk can force the trader out through drawdown.

In short:

  • Survival matters before whether the strategy can win.

The same principle applies to EA trading.


Common Misunderstandings and Mistakes

  • Raising risk because the win rate is high
    A losing streak can break the account quickly.
  • Raising risk because backtest results look good
    This is a typical sign of overfitting.
  • Ignoring DD
    The system may become unbearable in live trading.
  • Not combining the risk of multiple positions
    Real risk can become two or three times larger.

Supplement: Difference from Other Methods

  • Fixed lot
    DD cannot be controlled directly.
  • Martingale
    Short-term recovery, long-term failure risk.
  • Risk per trade
    DD control and long-term stability.

In conclusion, if you assume long-term operation,
there are very few practical alternatives to risk per trade.

4. Comparison with Other Money Management Methods

Conclusion:
Risk per trade controls risk based on the allowed loss amount, which makes it stronger than other methods for drawdown control and reproducibility.
Fixed lot and martingale methods may look simple, but they carry a high failure risk in long-term operation.


4.1 Comparison of Money Management Methods

Conclusion:
Each method differs in what it uses as the basis for deciding lot size. From a risk control perspective, risk per trade is the most rational.

MethodBasisFeatureAdvantageDisadvantage
risk per tradeloss amountlot size is decided based on SLhigh DD control and reproducibilitycalculation is required
fixed lotfixed lot sizesame trade volume every timesimple and easy to implementDD can expand and market adaptation is weak
Fixed Fractionalpercentage of capitallot size increases or decreases with account sizecompound growthlarge variation and sudden declines
martingaleloss recoverylot size increases after lossesshort-term recovery powerextreme failure risk

Important difference:

  • Risk per trade uses the losing case as the basis.
  • Other methods often use trade volume or recovery after wins as the basis.

Because controlling losses comes first in trading, this difference is decisive.


4.2 Difference from Fixed Lot

Conclusion:
Fixed lot is simple, but it cannot adapt to volatility or SL distance, so risk becomes unstable.

Problems:

  • Wide SL: risk increases.
  • Narrow SL: risk decreases.

In short:

  • Even with the same lot size, risk changes every time.

It is especially dangerous in these situations:

  • during news events, when spread expands and slippage occurs
  • when volatility changes suddenly
  • when changing currency pairs

Fixed lot only looks stable. The internal risk is unstable.


4.3 Difference from Martingale

Conclusion:
Martingale can work in the short term, but its structure is highly likely to fail over the long term.

Features:

  • The lot size increases after losses.
  • It aims to recover losses with one winning trade.

Problems:

  • It cannot continue forever because account capital is limited.
  • DD increases exponentially.

Difference from risk per trade:

  • Risk per trade fixes the maximum loss.
  • Martingale allows the maximum loss to expand without a practical upper limit.

Because of this structural difference, the risk profiles are completely different.


4.4 Difference from Fixed Fractional

Conclusion:
Fixed Fractional can support account growth, but drawdown can become large.

Features:

  • The lot size increases or decreases with account size.
  • The lot size increases after profits.

Advantage:

  • It can grow the account through compounding.

Disadvantages:

  • The lot size may still be large during DD.
  • Recovery can take time.

Relationship with risk per trade:

  • Risk per trade can be considered a type of fixed fractional approach.
  • It is more practical because it assumes an SL.

4.5 Practical Selection Criteria

Conclusion:
For beginners, EA operation, and long-term operation, risk per trade is usually the best choice.

Selection by use case:

  • Beginners
    Risk per trade is the default choice because it helps prevent account failure.
  • EA operation
    Essential because it supports reproducibility.
  • Scalping
    Use risk per trade while accounting for spread.
  • Short-term gambling
    Fixed lot or martingale may be used, but they are not recommended.

Common Misunderstandings and Mistakes

  • Fixed lot is more stable
    Only the appearance is stable. The actual risk is unstable.
  • Martingale can win
    Capital limits make failure unavoidable over time.
  • Fixed Fractional is always safe
    DD can become large.
  • Mixing methods
    Risk management breaks down.

Supplement: Why Risk per Trade Is Mainstream

  • It is standard among professional traders and funds.
  • Risk management can be quantified.
  • It aligns well with backtesting.

These are the three main reasons.

5. Common Mistakes and Cautions

Conclusion:
Risk per trade works only when it is implemented correctly.
The three main causes of failure are no SL, ignoring trading costs, and lot rounding mistakes.


5.1 No Stop Loss

Conclusion:
Without an SL, or stop loss, risk per trade does not work.

Reason:

  • Risk is calculated based on the maximum loss.
  • No SL means there is no loss limit.

Result:

  • The calculated lot size becomes meaningless.
  • Unexpected drawdown can occur.

Practical countermeasures:

  • Always set the SL at the same time as entry.
  • Use ATR, or average price movement, to decide the SL distance.
  • Do not plan to add the SL later because execution delays and execution quality can affect the result.

5.2 Ignoring Spread and Slippage

Conclusion:
Actual loss is determined by SL distance plus costs. It is usually larger than the simple calculation.

Commonly missed elements:

  • spread, or the bid-ask difference
  • slippage, or execution price difference
  • commission

Example:

  • SL: 20 pips
  • spread: 2 pips

Real loss is effectively 22 pips.

Especially risky situations:

  • news releases, when spread and slippage increase
  • low-liquidity trading hours

Practical countermeasures:

  • Add a buffer to the SL distance.
  • Do not enter when the spread is above a defined threshold.
  • Stabilize execution with a VPS environment.

5.3 Lot Rounding Mistakes: invalid volume

Conclusion:
Lot size must be rounded according to the minimum lot and volume step.

Common errors:

  • invalid volume
  • not enough money

Cause:

  • The calculated lot does not match the broker’s specifications.

MQL5 countermeasure code example:

double AdjustLot(double lot)
{
    double min_lot  = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MIN);
    double max_lot  = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MAX);
    double step     = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_STEP);

    // Round down to the step unit for a safer result
    lot = MathFloor(lot / step) * step;

    // Limit the range
    lot = MathMax(min_lot, lot);
    lot = MathMin(max_lot, lot);

    return lot;
}

Lot minimums, maximums, and steps differ by broker, so the lot must always be adjusted to the broker’s limits. If this is not handled, an Invalid volume error can occur.

Key points:

  • Always round the lot size.
  • The number of decimal places depends on the broker.

5.4 Ignoring Volatility

Conclusion:
If the SL distance is fixed, risk becomes distorted depending on the market environment.

Problems:

  • Low volatility: SL may be too narrow, causing stop-outs from noise.
  • High volatility: SL may be too wide, increasing risk.

Solutions:

  • Use ATR, or Average True Range.
  • Adjust the SL based on volatility.

Example:

  • SL = ATR x 1.5

This allows risk management to adapt to the market.


5.5 Not Combining Risk Across Multiple Positions

Conclusion:
Managing only individual risk is not enough. You must also manage total risk.

Common mistakes:

  • Each position is 1%, but three positions create a total risk of 3%.
  • Correlation risk increases when positions are concentrated in related currency pairs.

Practical countermeasures:

  • Limit the number of open positions.
  • Set a maximum total risk, such as 3%.
  • Consider highly correlated pairs, such as EURUSD and GBPUSD.

5.6 Misunderstanding Pip Value Across Currencies and CFDs

Conclusion:
The value of 1 pip differs by currency pair and instrument, so using a fixed value is risky.

Pay special attention to:

  • JPY pairs, where digit structure differs
  • gold, such as XAUUSD
  • indices, such as NASDAQ and DAX

If this is wrong:

  • actual risk can be several times different from the intended risk.

Countermeasures:

  • Always retrieve the value with SymbolInfoDouble.
  • Eliminate manual calculation.

Short Summary of Common Mistakes

  • No SL: risk control is invalid.
  • Ignoring spread: loss increases.
  • No lot rounding: orders may be rejected.
  • Ignoring volatility: risk becomes distorted.
  • Not managing total risk: DD can accelerate.

6. Practical Use Cases: EA and Discretionary Trading

Conclusion:
Risk per trade is a mechanism for trading with the same risk each time.
For EAs, it can be automated. For discretionary trading, it can be turned into a rule to improve reproducibility.


6.1 EA Implementation Pattern

Conclusion:
For an EA, the basic design is to avoid fixed lots. Calculate the lot size from risk per trade every time.

Common implementation patterns:

  • fixed risk, such as always 1%
  • risk adjustment by currency pair
  • volatility-linked risk based on ATR

Basic flow:

  • 1. Entry condition is met.
  • 2. Decide the SL distance, fixed or ATR-based.
  • 3. Calculate the lot size from risk.
  • 4. Place the order with OrderSend.

MQL5 implementation image:

double risk_percent = 1.0;
double sl_pips = 50;

double lot = CalculateLot(risk_percent, sl_pips);

// Order processing, simplified
trade.Buy(lot, _Symbol, Ask, sl, tp);

Design points:

  • The lot size changes every time because it depends on account balance and SL distance.
  • Separate entry conditions from risk calculation.
  • Account for execution delays and slippage.

6.2 Use in Discretionary Trading

Conclusion:
Even in discretionary trading, deciding lot size before entry removes inconsistency.

Steps:

  • 1. Decide the entry point.
  • 2. Decide the SL location.
  • 3. Set the risk percentage.
  • 4. Calculate the lot size.
  • 5. Enter the trade.

Important:

  • Do not decide the lot size first.
  • Prevent emotion-based lot changes.

Benefits:

  • Risk is consistent from trade to trade.
  • Mental burden is reduced.
  • Performance becomes easier to compare.

6.3 Practical Recommended Settings

Conclusion:
The lower and more consistent the risk setting, the higher the survival rate.

General guidelines:

  • Beginner: 0.5% to 1%
  • Intermediate: 1% to 2%
  • Advanced: around 2%

At 3% or more:

  • DD can expand quickly.
  • The account and trader psychology can become unstable.

Additional notes:

  • Scalping requires adjustment because spread has a large effect.
  • For day trading, 1% to 2% is realistic.
  • For an EA portfolio, manage combined risk.

6.4 Practical Advanced Patterns

Conclusion:
Risk per trade becomes more accurate when adjusted to the trading situation.

Common examples:

ATR-Linked Type

  • SL = ATR x coefficient
  • Lot size adjusts automatically
    This adapts to volatility.

Time-of-Day Filter

  • Lower risk during news events.
  • Avoid low-liquidity hours
    This helps reduce slippage risk.

Spread Filter

  • Do not enter when spread exceeds a threshold
    This controls real trading costs.

Portfolio Control

  • Limit the number of simultaneous positions.
  • Consider currency correlation
    This stabilizes DD.

Common Mistakes

  • Using fixed lots in an EA
    The system cannot adapt to market changes.
  • Choosing discretionary lot size by feel
    Reproducibility breaks down.
  • Not integrating risk across multiple EAs
    Total risk becomes too high.
  • Using the same risk during news events
    Slippage can create unexpected losses.

Supplement: Practical Difference from Other Methods

  • Fixed lot: easy to manage, but risky.
  • Martingale: short-term profit potential, long-term failure risk.
  • Risk per trade: requires management, but is the most stable.

7. FAQ

Conclusion:
Most questions about risk per trade come down to the right percentage setting, the relationship with SL, and multiple-position management.
If you understand these points, most practical problems can be solved.


7.1 What Percentage Is Best for Risk per Trade?

Conclusion:
In general, 1% to 2% offers the best balance.

Reasons:

  • Drawdown during losing streaks can be controlled.
  • The survival rate is higher in long-term operation.

Guidelines:

  • 0.5% to 1%: safety-focused, recommended for beginners and EAs
  • 1% to 2%: standard range
  • 3% or more: high risk and not recommended

For strategies with high uncertainty, using an even lower setting is reasonable.


7.2 Which Is Better, Fixed Lot or Risk per Trade?

Conclusion:
Risk per trade is much safer and more reproducible.

Reasons:

  • Risk stays consistent according to the SL distance.
  • It can adapt to volatility and spread changes.

Problems with fixed lot:

  • Risk changes with market conditions.
  • Drawdown cannot be controlled directly.

7.3 Can Risk per Trade Be Used Without a Stop Loss?

Conclusion:
No. An SL is required.

Reasons:

  • Risk is calculated from the maximum loss.
  • Without an SL, there is no upper limit on loss.

Exception:

  • It may exist in theory, but it is not practical in real trading.

7.4 How Should Risk Be Managed with Multiple Positions?

Conclusion:
You need to manage total risk, not only risk per position.

Example:

  • 1% per position x 3 positions
    Total risk is 3%.

Countermeasures:

  • Set a maximum total risk, such as 3%.
  • Avoid holding highly correlated currency pairs at the same time.

7.5 Is Risk per Trade Required for an EA?

Conclusion:
It is important enough to be considered essential.

Reasons:

  • An EA trades continuously.
  • It cannot be stopped by emotion.
  • Losing streaks always occur.

An EA without risk settings:

  • can diverge between backtesting and live trading.
  • has a higher probability of failure.

7.6 Should Volatility Be Considered?

Conclusion:
Yes. Using ATR is a common practical method.

Reasons:

  • The market is always changing.
  • A fixed SL can distort risk.

Practical example:

  • SL = ATR x 1.5
  • The lot size adjusts automatically.

This enables more stable risk management.


7.7 Is Risk per Trade Useful for Scalping?

Conclusion:
Yes, but adjustment is required.

Cautions:

  • Spread has a large impact.
  • Slippage is more likely to occur.

Countermeasures:

  • Set risk lower, such as 0.5%.
  • Use a spread filter.
  • Optimize the execution environment, such as with a VPS.

7.8 Does Increasing Risk Increase Profit?

Conclusion:
It can increase profit in the short term, but it also raises the long-term risk of failure.

Reasons:

  • Drawdown can increase exponentially.
  • Recovering the account after a losing streak becomes difficult.

Important distinction:

  • Profit depends on expected value.
  • Risk determines survival rate.

These two ideas must be considered separately.

8. Summary

Conclusion:
Risk per trade is not a setting for increasing profit. It is a design rule for staying in the market.
By managing losses instead of lot size, you improve trading reproducibility and long-term stability.


8.1 The Core Idea of Risk per Trade

Conclusion:
Trading success is determined not by how much you win, but by how well you survive.

Key points:

  • Risk per trade manages the upper limit of maximum loss.
  • Think in terms of loss, not lot size.
  • An SL is a required condition.

This design makes it possible to:

  • avoid a sharp account decline during losing streaks.
  • control drawdown (DD).
  • reproduce similar results in both EA and discretionary trading.

8.2 Practical Best Setup

Conclusion:
For beginners to intermediate traders, the most rational setup is around 1% risk, a required SL, and automatic lot calculation.

Recommended setup:

  • Risk: 1%, or 0.5% if safety is the priority
  • SL: set dynamically with ATR or a similar method
  • Lot size: calculate every time; do not fix it

To improve stability further:

  • add a spread filter.
  • reduce slippage risk by avoiding news events and using a VPS.
  • manage combined risk, such as a maximum of 3%.

8.3 Checklist to Avoid Failure

Conclusion:
If the following conditions are met, the basic risk management design is in place.

Checklist:

  • SL is always set.
  • Lot size is calculated backward from risk.
  • Pip value is retrieved correctly.
  • Lot size is rounded to broker specifications.
  • Spread and slippage are considered.
  • Total risk across multiple positions is managed.

If even one item is missing, the design may break down.


8.4 Final Short Conclusion

  • Manage trading by loss, not by lot size.
  • Risk per trade determines survival rate.
  • 1% to 2% is a realistic practical range.
  • It is essential for both EA and discretionary trading.