Skip to main content
Version: 2.0

RIM - Risk Manager

Concept diagram

The concept diagram provided below depicts the function block associated with this page.

Concept diagram, Risk Manager.png

Risk profile

The input parameter > (RIM) Risk profile allows you to adjust the volume per trade. The default value (NORMAL) uses the volume defined by the inputs determining the volume size. Sometimes, it is wanted to quickly increase or decrease the calculated volume by a fixed factor or divisor to adjust the risk per trade.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (RIM) Risk profile
(IN_enmRimRiskProfile)
NORMALNumeric values usable in SET files:
0 - LOWEST
1 - LOW
2 - MODERATE
3 - NORMAL
4 - HIGH
5 - EXTREME

The different options for the > (RIM) Risk profile result in the following volume size adjustments:

  • LOWEST: Selects minimum volume → 0.01 Lots
  • LOW: Standard value divided by 3 → 0.20 Lots
  • MODERATE: Standard value divided by 2 → 0.30 Lots
  • NORMAL: Standard value configured with Volume Calculation → 0.60 Lots
  • HIGH: Standard value multiplied by 2 → 1.20 Lots
  • EXTREME: Standard value multiplied by 3 → 1.80 Lots

The different options' effects are illustrated with examples in the image below.

Configuration, Risk Manager, Risk profile examples.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_crim_2_v_2_0.zip.

In summary, use these input parameters to quickly adapt the volume size without modifying the actual risk and money management calculation.

Volume per order

The lot size per volume is a crucial order parameter across all trading styles. Limiting the potential risk per trade to a small percentage of your trading equity is standard practice. For instance, if only 1.0% of your equity is risked per trade and a trade closes with a loss, you still have enough potential for a further 99 trades with negative results. The last comparison does not take into account the required margin.

With the Expert Advisor Builder, you can choose between a fixed lot size per trade, a fixed relative risk per trade, and a fixed absolute risk per trade. The input parameter > (RIM) Volume calculation allows you to select between these three options. Depending on your selection, either > (RIM) Fix lots, > (RIM) Fix rel risk, or > (RIM) Fix abs risk will be used to determine the risk or the volume size, respectively.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (RIM) Volume calculation
(IN_enmRimVolumeCalculation)
FIX LOTSNumeric values usable in SET files:
0 - FIX LOTS
1 - FIX REL RISK BASED
2 - FIX ABS RISK BASED
> (RIM) Fix lots
(IN_dRimFixLots)
1.0The input value cannot be smaller or equal to 0.
Only in use when FIX LOTS is selected.
> (RIM) Fix rel risk
(IN_dRimFixRelRisk)
0.5The input value cannot be smaller or equal to 0.
Only in use when FIX REL RISK BASED is selected.
> (RIM) Fix abs risk
(IN_dRimFixAbsRisk)
100.0The input value cannot be smaller or equal to 0.
Only in use when FIX ABS RISK BASED is selected.

> (RIM) Volume calculation = FIX LOTS

When FIX LOTS is selected, the volume per trade can be defined using the > (RIM) Fix lots parameter. As shown in the examples below, the volume size is precisely the value you configure, regardless of the initial stop loss or initial take profit.

Configuration, Risk Manager, Volume calculation, Example with FIX LOTS.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_crim_3_v_2_0.zip.

> (RIM) Volume calculation = FIX REL RISK BASED

When FIX REL RISK BASED is selected, the volume size is automatically calculated using the initial stop loss and the > (RIM) Fix rel risk parameters. As demonstrated in the examples below, the larger the initial stop loss level from the opening price, the lower the volume size. This ensures that the relative risk per trade remains constant. Various calculation methods can be selected for the initial stop loss, as explained in this article. Please note that the commission per trade is not taken into account. The change in volume size is demonstrated in the examples below. This mode requires the use of an initial stop loss.

Configuration, Risk Manager, Volume calculation, Example with FIX REL RISK BASED.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_crim_4_v_2_0.zip.

> (RIM) Volume calculation = FIX ABS RISK BASED

When FIX ABS RISK BASED is used, the risk per trade can be defined using the > (RIM) Fix abs risk parameter. This parameter is used to describe an absolute amount in your account currency. The actual volume size will be calculated individually for each trade. Similar to the relative mode, it uses the initial stop loss to determine the volume size per trade. Please note that the commission per trade is not taken into account. The change in volume size is demonstrated in the examples below. This mode also requires the use of an initial stop loss.

Configuration, Risk Manager, Volume calculation, Example with FIX ABS RISK BASED.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_crim_5_v_2_0.zip.

Maximum allowed spread

The Expert Advisor Builder can restrict the opening of new trades when the spread is too large. This is particularly important in smaller timeframes such as M1, M5, and M15, where the spread can significantly impact the performance of a trading system. Even a 1-2 pips spread too high as the desired maximum can negatively affect trading results. To prevent large spreads from affecting your trading performance, you can set a maximum limit at which the trading idea is permitted to open new trades.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (RIM) Max. spread (0 -> OFF)
(IN_nRimMaxSpread)
0The input value cannot be smaller than 0.
The Input value is interpreted as spread in pips.

The input parameter > (RIM) Max. spread (0 -> OFF) sets the maximum allowed spread at the time of the intended trade opening. This value is defined in pips. As the examples below demonstrate, further trades will only be opened if the spread is within this limit. To turn off this feature, enter 0 as the input value.

Configuration, Risk Manager, Maximum allowed spread, Example.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_crim_6_v_2_0.zip.