VOL - Volume Calculation
Volume per trade
The Custom Expert Advisor can execute a fully automated trading system based on multiple timeframes and symbols. It eventually utilizes various trading modules with risk and money management parameters to adapt to the current market conditions. These modules can be designed to balance each other out, with less risky strategies compensating for higher-risk ones, ensuring the overall risk remains moderate throughout the operation. Generally, an internal decision-making process determines the volume size per order. This process considers the risk profile of each trading module, resulting in trades with varying volume sizes. Some trades may have a small volume, while others may have a relatively large volume.
There's no need for manual adjustment as the volume size is calculated automatically. Risk and money management are a part of the SET file for each trading module. However, two calculation models are available: the automatic mode and the limit mode. The automatic method determines the optimal volume size based on predefined risk and money management measures, while the limit method allows you to set a maximum volume size per trade.
This is facilitated by the input parameters > (VOL) Volume size calculation and > (VOL) Max. volume size per trade. These parameters and examples of their usage will be explained in the subsequent sections.
Input variable within MetaTrader (Identifier in SET file) | Default value | Comment |
---|---|---|
> (VOL) Volume size calculation (IN_nVolSelection) | AUTOMATIC | Numeric values usable in SET files: 0 - AUTOMATIC 1 - LIMITED |
> (VOL) Max. volume size per trade (IN_dVolMaximumVolume) | 0.01 | If the precise value cannot be utilized due to the minimum lot size constraint, the system will default to using the minimum lot size instead. The input value cannot be smaller than 0. |
> (VOL) Volume size calculation = AUTOMATIC
In automatic mode, the volume per trade can fluctuate to adhere to the risk and money management measures set for the trading modules. The overall performance and drawdown are indicators to ensure that the trading module operates within its defined limits. The image below shows how the volume size can vary per trade.
This behavior can be attributed to the different stop loss levels used for individual trades. Unlimited use of each module's configured risk and money management preferences can be achieved by initiating the Custom Expert Advisor in automatic mode, which is also the default setting. When using this option, the input parameter > (VOL) Max. volume size per trade is not in use at all.
> (VOL) Volume size calculation = LIMITED
The second option for the volume size calculation sets a maximum limit for the volume per trade, as defined by the input parameter > (VOL) Max. volume size per trade. As illustrated in the image below, no trade will be opened with a larger volume than the value set by this parameter.
However, it's important to note that while this parameter sets an upper limit, it does not guarantee that each trade will have the exact volume size. Some trading modules may require smaller volume sizes than the defined limit. In such cases, the smaller value will be used. Therefore, the volume size is calculated dynamically but limited to the specified value.
Consider that symbols usually come with a broker-defined minimum or maximum lot size.