Skip to content
Algo Market Labs

Risk Management

Risk management

How position size is calculated for each system, how the daily loss limit and spread filter behave, the capital each setting needs given your broker's minimum position, and how leverage and margin affect your account.

9 min read

Position sizing#

NOVA, QUANTIS and VECTOR X1 size every position so that a stop-loss hit loses the configured percentage of the account balance: InpRiskPct (2% by default) for NOVA and QUANTIS, the InpAggressiveness level 1 to 5 (1 to 5%) for VECTOR X1. The stop distance, 3 × ATR for NOVA, 5 × ATR for QUANTIS and VECTOR X1, is known before the order is sent.

Formula - NOVA, QUANTIS and VECTOR X1
lot = balance * risk % / loss per lot if the stop-loss is hit
    -> rounded DOWN to the symbol's volume step
    -> below the broker's minimum lot: the signal is skipped (logged once a day)

Example - VECTOR X1 on XAUUSD, account in USD, illustrative values
balance            = 5,000 USD
level 3            = 3 %  -> 150 USD at risk
ATR (H4)           = 30.00 USD -> stop = 5 * 30.00 = 150.00 USD
loss per 1.00 lot  = 150.00 * 100 oz = 15,000 USD
lot = 150 / 15,000 = 0.01 -> the broker's minimum: the trade is taken
at level 1: 50 / 15,000 = 0.0033 -> below the 0.01 minimum -> signal skipped

The loss per lot is calculated from the tick size and tick value that your broker reports at runtime; for gold, indices and cryptocurrencies they differ between brokers. The lot never depends on previous results: no grid, no martingale.

APEX sizes by volatility. The exposure (value of the position) is equity × min(maximum exposure, volatility target ÷ daily volatility), where the daily volatility is the standard deviation of the Nasdaq 100's returns from one session close to the next over the last 14 sessions. The three values come from the InpRiskProfile profile: Standard (1, default) targets a 2% daily volatility with a maximum exposure of 4 ×; Dynamic (2) targets 4% with 8 ×; Max (3, high risk) targets 8% with 16 ×; custom (0) uses InpTargetVolPct and InpMaxLeverage. With the Standard profile, a daily volatility of 1% gives an exposure of 2 × equity; at 0.4%, the result (5 ×) is capped at 4 ×. The lot is then reduced if needed so that a stop-loss hit loses at most 2% of the balance (4% with Dynamic, 8% with Max, InpMaxRiskPct with custom), and rounded down to the volume step; below the minimum lot, the signal is skipped.

Formula - APEX
profile 1 Standard (default): target vol 2 %, max exposure 4x, max loss at the stop 2 %
profile 2 Dynamic:            target vol 4 %, max exposure 8x, max loss at the stop 4 %
profile 3 Max (high risk):    target vol 8 %, max exposure 16x, max loss at the stop 8 %
profile 0 custom:             InpTargetVolPct, InpMaxLeverage, InpMaxRiskPct

exposure = equity * min(max exposure, target vol / daily volatility)
lot      = exposure / value of 1.00 lot   -> rounded down to the volume step
lot      = min(lot, lot that loses the max loss % of the balance at the stop-loss)
           -> below the broker's minimum lot: the signal is skipped (logged once a day)

Daily loss limit#

At the start of each server day, the EA records the account equity. If equity then falls to start-of-day equity × (1 - InpMaxDailyLossPct / 100), the EA closes its own positions and opens nothing new until the next server day (00:00 server time). A value of 0 turns the limit off.

  • Defaults: 5% for NOVA, 5% for APEX, 5% for QUANTIS, 8% for VECTOR X1.
  • Equity includes floating results. The limit is measured on the whole account, so losses on manual trades or other EAs count towards it, but the EA only closes its own positions.
  • When the limit is reached, the Experts tab shows: [AML] Daily loss limit reached: trading stopped until tomorrow.
  • The limit resets automatically at the server day rollover.
  • If the EA is restarted during the day (attached again, or after a terminal restart), it keeps the morning's reference, and a limit already reached stays active until the next server day: these values are kept in the terminal's global variables (AML.<magic>.<symbol>.*).

Maximum spread guard#

Each EA skips entries while the spread (ask minus bid) is wider than InpMaxSpreadPct percent of the price. The limit is a percentage of the price, not a number of points, so it does not depend on how your broker quotes the symbol. It protects against entries at the daily rollover, during low liquidity and around news, when spreads can widen several times over.

SystemInpMaxSpreadPctExampleWhen the spread is too wide
NOVA0.15Ethereum at 2,500 USD: up to 3.75 USDEntry retried on the following ticks during the same H4 candle
APEX0.03Nasdaq 100 at 25,000: up to 7.5 pointsNo entry at that decision point; the next decision comes 30 minutes later
QUANTIS0.15Bitcoin at 100,000 USD: up to 150 USDEntry retried on the following ticks during the same H4 candle
VECTOR X10.05Gold at 4,000 USD: up to 2.00 USDEntry retried on the following ticks during the same H4 candle

If the spread is still too wide when the H4 candle closes, NOVA, QUANTIS and VECTOR X1 drop that signal. The filter applies to entries only: the stop-loss, take-profit, trailing stop and exits are never delayed by it.

Because the filter is a percentage of the price, a spread of the same dollar amount weighs more when the price is low. In 2019 and 2020, the average Ethereum spread on our test account was about 4.1 USD (2019) then 2.7 USD (2020), while Ethereum was below 750 USD: that spread therefore exceeded 0.15% of the price and NOVA did not enter any position (no trade in those two years in the backtest). With a tighter spread at your broker, the filter blocks fewer entries.

Capital and minimum position#

The capital needed does not depend on the EA but on the minimum position your broker offers on your account (the symbol's minimum volume) and on the chosen risk setting. The EA calculates the position from the risk; if it is smaller than the minimum position, it skips the signal. It never rounds a position up: with insufficient capital, the EA refuses to trade rather than take more risk than the chosen setting.

Approximate minimum capital
minimum capital ~ loss of the broker's minimum position at the stop-loss / risk per trade

Example - VECTOR X1, level 3 (3 %), illustrative values
minimum position = 0.01 lot = 1 oz of gold, stop-loss 150 USD away
loss at the stop = 150 USD  -> 150 / 0.03 = about 5,000 USD
at level 5 (5 %): 150 / 0.05 = about 3,000 USD
MarketMinimum position of our test accountEquivalent
Ethereum (ETHUSD)0.01 lot0.01 ETH (about 25 USD with ETH at 2,500 USD)
Nasdaq 100 (NAS100)0.1 lot0.1 index
Bitcoin (BTCUSD)0.01 lot0.01 BTC
Gold (XAUUSD)0.01 lot1 ounce

If your account's minimum position is smaller, the capital needed falls in the same proportion; if it is larger, it rises. The minimum volume and the contract size are in the symbol specification: Market Watch window, right-click the symbol > Specification. The capital needed also rises when market volatility rises, because the stop-loss moves further away.

When a signal is skipped for this reason, the EA reports it at most once a day in the Experts tab, with the approximate capital needed at the current risk setting:

Experts tab - example of a signal skipped for lack of capital
[AML] Signal skipped: this broker's minimum position (0.10 lot) needs about N USD of capital at the current risk setting. Raise the risk setting, add capital or use a broker with smaller minimum positions.
  1. 1

    Raise the risk setting

    APEX: InpRiskProfile = 2 (Dynamic profile); QUANTIS: InpRiskPct = 4; VECTOR X1: InpAggressiveness = 5. The capital needed falls, but the loss per trade and the drawdowns rise. NOVA: no setting above 2% was tested; at the default setting, NOVA took all its signals from 500 USD, the smallest deposit tested in our simulated backtests.

  2. 2

    Add capital

    Up to the amount given in the message or in the table below, depositing only money you accept to lose entirely.

  3. 3

    Or use an account with a smaller minimum position

    Compare the symbol's minimum volume in your account's specification. We do not recommend any broker.

Leverage and margin#

Leverage does not change the risk per trade calculated from the stop distance, but it determines how much margin each position requires and how many positions the account can hold at once.

  • APEX's exposure is capped by its risk profile (4 × equity with Standard, 8 × with Dynamic, 16 × with Max, InpMaxLeverage with custom), whatever leverage the broker offers. NOVA, QUANTIS and VECTOR X1 size their positions from the risk and the stop distance only.
  • With APEX's Dynamic and Max profiles, check your account's leverage on the Nasdaq 100. At 1:20 leverage (the cap for retail clients in the European Union on major indices), an exposure of 8 × equity ties up 40% of equity as margin, and an exposure of 16 × (the Max profile's cap) up to 80%: the order stays below the 90% free-margin threshold (see below), but another open position on the account can then block APEX's entries. With leverage below 1:20, the largest Max-profile positions are not opened. Our backtests use an account with 1:100 leverage.
  • Margin requirements for indices and cryptocurrencies are often higher than for FX majors and can be raised by the broker around events or weekends.
  • If margin level falls to the broker's stop-out level, positions are closed by the broker regardless of their stop-loss.
  • An EA does not send an order whose margin would use 90% or more of the free margin. Each EA holds one position at a time; keep free margin well above what the positions of all the systems on the account require together.

Test on demo first#

Validate every risk configuration on a demo account with the same broker, account type and symbols you intend to use live. Confirm that calculated lot sizes, the daily loss limit and the spread guard behave as expected before trading real capital.