One Trading Robot or a Portfolio of Expert Advisors? Diversification in Algorithmic Trading
Hello, friends! Is it better to use one trading robot or build a portfolio of Expert Advisors? Imagine a tested robot that performs well until market conditions change and it enters drawdown. Could another robot compensate for some of its losses? After more than twenty years of working with financial markets and developing trading software, I pay particular attention to how trading algorithms interact. Ten robots can share the same sources of risk, while two genuinely different strategies may offer useful diversification. Let us examine portfolio mathematics, capital allocation, correlation, MetaTrader 4 and MetaTrader 5, and centralized risk management.
Advantages of Using a Single Trading Robot
Using one Expert Advisor is generally the simplest starting point for algorithmic traders.
Simple Configuration and Monitoring
With one Expert Advisor, it is easier to understand why positions are opened, modified, and closed. You can investigate signals, position sizing, and position management under different market conditions, and identify the causes of deteriorating performance or excessive margin usage.
Simpler Strategy Testing
One strategy is easier to test in MetaTrader: modify parameters, compare results, analyze maximum equity drawdown, and validate performance on independent historical data. Multiple robots require additional analysis of their combined behavior.
Fewer Conflicts Between Trading Algorithms
One Expert Advisor reduces conflicts between automated systems, such as a robot accidentally closing another robot's positions due to incorrect Magic Numbers. Cumulative volume and margin are also easier to monitor.
Lower Operational Complexity
A single robot generally requires less configuration, monitoring, and maintenance. However, one program may contain several independent strategies and trade multiple instruments. The number of programs is not necessarily the number of strategies.
Disadvantages of Using a Single Expert Advisor
The main disadvantage of relying on one strategy is exposure to changes in market regimes. Trend-following robots may struggle in sideways markets, while mean reversion systems may struggle during prolonged directional movements. Performance depends partly on how well current conditions suit the algorithm.
The main disadvantages of relying on a single trading strategy include:
- Concentration of financial risk within one trading algorithm.
- Dependence on particular market conditions.
- Potentially prolonged periods of negative or insignificant returns.
- Sensitivity to changes in volatility and liquidity.
- Dependence on one decision-making model.
- Exposure to programming errors affecting the entire trading system.
One thoroughly researched Expert Advisor may be preferable to several insufficiently tested systems. Diversification cannot replace understanding the algorithms that manage your capital.
What Is a Portfolio of Trading Robots?
A portfolio of trading robots is a collection of automated trading strategies organized within a common capital allocation and financial risk management framework.
A trading robot portfolio may include:
- Several different Expert Advisors.
- Multiple independent configurations of the same Expert Advisor.
- Algorithms operating on different financial instruments.
- Strategies using different timeframes.
- Trend-following and countertrend trading systems.
- Breakout trading algorithms.
- Mean reversion strategies.
- Multi-currency trading systems.
A genuine portfolio requires coordinated capital management, not just several Expert Advisors attached to different charts. Determine each strategy's potential exposure, how positions interact, and what happens when several strategies experience losses together.
What Is Diversification in Algorithmic Trading?
Diversification distributes capital and risk across several sources of potential returns to reduce dependence on one strategy or market factor. Consider $10,000 allocated either to one strategy or to three trading algorithms as follows:
| Trading Strategy | Allocated Capital | Portfolio Weight |
|---|---|---|
| Robot A | $4,000 | 40% |
| Robot B | $3,000 | 30% |
| Robot C | $3,000 | 30% |
| Total | $10,000 | 100% |
Different strategies may generate profits and losses at different times, but diversification does not guarantee compensation: all robots can suffer drawdown simultaneously. On a shared account, capital allocations are logical rather than physically separated and must be enforced through position sizing and risk restrictions.
Why Multiple Trading Robots Do Not Always Reduce Risk
My friend, pay particular attention to the following principle: the number of trading robots and the number of independent sources of financial risk are completely different concepts.
Suppose a trader installs five different Expert Advisors.
- The first robot uses a grid strategy that averages EURUSD BUY positions.
- The second robot also averages EURUSD BUY positions but uses different entry conditions.
- The third Expert Advisor opens GBPUSD BUY positions and increases trading volume when the market declines.
- The fourth robot trades gold using a countertrend algorithm.
- The fifth robot applies a similar mean reversion strategy to another currency pair.
Although there are five programs, similar averaging mechanisms and dependence on market corrections may create largely overlapping risks. A stronger US dollar, for example, can adversely affect several strategies positioned against it. Study the trading logic rather than product names.
When evaluating each strategy, consider the following questions:
- How are trading signals generated?
- How is the initial position size calculated?
- Does the robot increase position volume during drawdown?
- Does the algorithm use averaging or Martingale?
- Which market conditions are unfavorable for the strategy?
- How are potential financial losses restricted?
- How long can the robot maintain open positions?
- What is the maximum financial exposure the algorithm can accumulate?
Only after understanding these characteristics should a trader begin investigating the combined operation of multiple trading algorithms.
Correlation Between Trading Strategies
The Pearson correlation coefficient measures the strength and direction of a linear relationship. For trading robots, use returns measured over identical time intervals. The coefficient ranges from -1 to +1.
| Correlation Coefficient | Relationship |
|---|---|
| +1.00 | Perfect positive linear correlation |
| +0.80 | Strong positive correlation |
| +0.50 | Moderate positive correlation |
| 0.00 | No linear correlation |
| -0.50 | Moderate negative correlation |
| -0.80 | Strong negative correlation |
| -1.00 | Perfect negative linear correlation |
These descriptions are approximate. Strategies that gain and lose during the same periods may have positive correlation, while opposing performance may produce negative correlation. A coefficient near zero indicates little linear relationship, not statistical independence.
How to Calculate Trading Strategy Correlation
Use periodic returns rather than absolute balance values. For example, daily strategy equity returns in the absence of external cash flows are calculated as follows:
Return(t) = (Equity(t) - Equity(t-1)) / Equity(t-1)
After creating two synchronized arrays of returns, the correlation coefficient can be calculated as follows:
Correlation(A,B) = Covariance(A,B) / (StdDev(A) × StdDev(B))
Covariance represents the covariance between the returns of the two strategies, while StdDev represents the standard deviation of each strategy's returns.
If the standard deviation of either return series equals zero, the correlation coefficient is undefined under this formula.
For grid strategies, include floating profits and losses. Closed trades or Balance alone can conceal substantial exposure.
Why Can Strategy Correlation Change Over Time?
Correlation changes over time. During financial crises, monetary policy changes, liquidity shortages, or high volatility, strategies that previously behaved differently may become more closely related or increase exposure simultaneously. Analyze both the full history and rolling windows, such as 30, 60, and 90 trading days. These are illustrative periods; shorter windows react faster but may produce less stable estimates.
The Mathematics of Trading Portfolio Risk
Consider two equally weighted trading strategies, each with a standard deviation of returns of 10% over the same measurement interval. Portfolio volatility is calculated as follows:
PortfolioVolatility = √(wA² × σA² + wB² × σB² + 2 × wA × wB × σA × σB × ρ)
Where:
- wA represents the capital weight of Strategy A.
- wB represents the capital weight of Strategy B.
- σA represents the standard deviation of Strategy A returns.
- σB represents the standard deviation of Strategy B returns.
- ρ represents the correlation coefficient between the two strategies.
Let us substitute hypothetical values and examine several correlation scenarios.
| Strategy Correlation | Robot A Volatility | Robot B Volatility | Portfolio Volatility |
|---|---|---|---|
| +1.00 | 10% | 10% | 10.00% |
| +0.80 | 10% | 10% | 9.49% |
| +0.50 | 10% | 10% | 8.66% |
| 0.00 | 10% | 10% | 7.07% |
| -0.50 | 10% | 10% | 5.00% |
| -0.80 | 10% | 10% | 3.16% |
| -1.00 | 10% | 10% | 0.00% |
The table shows how correlation affects portfolio volatility. Perfect negative correlation with equal weights and equal volatility yields zero theoretical variance in this simplified model. In practice, correlation, volatility, costs, and weights change. Volatility is not maximum drawdown: lower volatility does not guarantee lower drawdown, especially for grid, Martingale, and nonlinear position-sizing algorithms.
Calculating Risk for Multiple Trading Strategies
For a portfolio containing more than two trading strategies, portfolio variance can be expressed using a covariance matrix.
PortfolioVariance = wT × Σ × w
Here, w is the vector of portfolio weights and Σ is the covariance matrix of strategy returns. Portfolio volatility is the square root of variance. Historical estimation errors, changing markets, and nonlinear trading behavior can limit the usefulness of the model.
How to Calculate Portfolio Drawdown
Suppose three Expert Advisors share an initial capital of $10,000, allocated as $4,000, $3,000, and $3,000. Consider simultaneous losses relative to these initial allocations:
| Trading Robot | Allocated Capital | Relative Loss | Monetary Loss |
|---|---|---|---|
| Robot A | $4,000 | 10% | $400 |
| Robot B | $3,000 | 20% | $600 |
| Robot C | $3,000 | 15% | $450 |
| Total | $10,000 | 14.50% | $1,450 |
Total equity declines to $8,550. If $10,000 was also the previous equity peak, portfolio drawdown is 14.50%.
Now consider another hypothetical scenario in which individual trading strategies experience their worst financial results during different periods.
| Period | Robot A Capital | Robot B Capital | Robot C Capital | Portfolio Equity |
|---|---|---|---|---|
| Initial | $4,000 | $3,000 | $3,000 | $10,000 |
| Period 1 | $3,600 | $3,150 | $3,100 | $9,850 |
| Period 2 | $4,100 | $2,400 | $3,250 | $9,750 |
| Period 3 | $4,300 | $3,200 | $2,550 | $10,050 |
| Period 4 | $4,500 | $3,350 | $3,200 | $11,050 |
Maximum portfolio drawdown at the illustrated observation points is 2.50%, even though individual strategies experience larger declines. This hypothetical example demonstrates how losses occurring at different times may improve combined performance. These are not actual product test results; intraperiod drawdown can be much larger, so monitor equity frequently.
In the absence of external cash flows, portfolio drawdown can be calculated directly from the combined equity curve:
PortfolioDrawdown = (PeakPortfolioEquity - CurrentPortfolioEquity) / PeakPortfolioEquity × 100%
The maximum observed value of this indicator represents maximum portfolio drawdown over the selected observation period.
It is generally incorrect to calculate actual portfolio drawdown by simply averaging the maximum historical drawdowns of individual trading robots because their equity peaks and losses may occur at different times.
For additional information about managing existing trading exposure, I recommend reading my article How to Reduce Trading Robot Drawdown Without Stopping Trading Completely.
How to Allocate Trading Capital Between Expert Advisors
Equal capital allocation does not imply equal risk. For example, four robots sharing $10,000 might each receive $2,500, yet one uses small positions with Stop Loss, another increases volume during averaging, and a third trades multiple instruments.
Equal Capital Allocation
Equal allocation assigns 25% of capital to each of four strategies. It is simple but does not directly account for differences in volatility, drawdown, exposure, or correlations.
Risk-Aware Capital Allocation
Under this approach, capital weights are selected according to the financial characteristics of each trading strategy.
Consider three hypothetical trading algorithms.
| Strategy | Historical Maximum Drawdown | Illustrative Portfolio Weight | Allocated Capital |
|---|---|---|---|
| Robot A | 8% | 50% | $5,000 |
| Robot B | 15% | 30% | $3,000 |
| Robot C | 30% | 20% | $2,000 |
If each strategy simultaneously loses the specified percentage of its allocated capital, the hypothetical combined loss is:
PortfolioLoss = 5,000 × 0.08 + 3,000 × 0.15 + 2,000 × 0.30 = $1,450.
The loss is 14.50% of initial portfolio capital. Although Robot C has the smallest allocation, its hypothetical monetary loss is the largest. These are illustrative rather than optimized weights; historical drawdown is not a guaranteed limit on future losses.
Allocation Using Monetary Risk Budgets
Instead of allocating only capital percentages, define monetary risk budgets. A hypothetical $1,000 portfolio stress-loss budget could be distributed as follows:
- Robot A: $400.
- Robot B: $350.
- Robot C: $250.
Estimate maximum exposure under a predefined adverse scenario. Suppose Robot A trades EURUSD and we model an adverse movement of 200 standard pips. For a standard EURUSD contract on a USD account, one pip is worth $10 per lot. The simplified limit is:
MaxVolume = 400 / (200 × 10) = 0.20 lots.
This model considers existing and proposed exposure. Actual losses can exceed the scenario budget because of larger market moves, gaps, execution problems, changing volatility, or additional transactions.
Diversification Across Financial Instruments
A portfolio may trade EURUSD, GBPUSD, USDJPY, XAUUSD, or stock indices. Different instrument names do not guarantee independent sources of risk.
Consider two trading positions:
- BUY EURUSD.
- BUY GBPUSD.
Both BUY positions are exposed against the US dollar and may lose simultaneously if it strengthens against the euro and pound. Stock indices may similarly share macroeconomic drivers. Analyze actual position direction and size alongside instrument correlations. Robots on the same instrument can have different risk profiles, while robots on different instruments can share a risk factor. Compare contract sizes, tick values, currency conversion, volatility, and margin rather than simply adding lots.
Using Different Trading Timeframes
Another possible approach to diversification is combining trading strategies that operate across different time intervals.
| Trading Strategy | Working Timeframe | Illustrative Trading Style |
|---|---|---|
| Robot A | M5 | Short-term trading |
| Robot B | M30 | Intraday trading |
| Robot C | H4 | Medium-term trading |
| Robot D | D1 | Longer trading cycles |
Different horizons can produce different signals and holding periods, but they do not automatically diversify risk. Robots trading in the same direction with similar management rules may remain highly correlated. A chart or indicator timeframe also does not necessarily determine the actual holding period. Investigate actual algorithm behavior.
Diversification Across Trading Strategy Types
In my opinion, diversification based on different trading signal generation methods and position management principles deserves particular attention.
Trend-Following Strategies
The primary objective of trend-following algorithms is to identify directional market movements and attempt to benefit from their continuation.
Such strategies may experience difficulties during prolonged sideways markets and frequent directional changes.
Countertrend Trading Strategies
Countertrend algorithms attempt to identify potential corrective price movements after substantial directional changes.
Prolonged directional trends without significant corrections can create particularly unfavorable conditions for some countertrend strategies.
Mean Reversion Strategies
These trading algorithms investigate deviations between the current market price and a selected statistical or technical reference value.
The main limitation is that market conditions can change, making the previously estimated reference value less relevant.
Breakout Trading Strategies
Breakout algorithms attempt to benefit from market movements beyond predefined price ranges or technical levels.
When directional continuation does not occur, these strategies may generate consecutive losses due to false breakouts.
Grid Trading Strategies
Grid trading algorithms manage sequences of trading positions opened at different price levels.
The financial behavior of these strategies depends substantially on position-sizing methods, grid spacing, position-count restrictions, and group closing mechanisms.
Combining different classes of trading strategies may create conditions for effective diversification.
However, the effectiveness of the selected combination must be evaluated using synchronized financial data and appropriate portfolio testing.
Practical Comparison of Different Trading Robots
To understand the differences between automated trading algorithms, we can examine several Expert Advisors that I developed: VR Smart Grid, VR Proton, and VR Lollipop.
These programs provide useful examples of different approaches to organizing trading operations and managing existing financial exposure.
VR Smart Grid
The trading logic of VR Smart Grid focuses on managing groups of market positions.
Its position management mechanisms include different methods of calculating trading volume, determining the distance between averaging positions, and partially closing trading groups.
When researching this type of trading algorithm, particular attention should be paid to maximum cumulative volume, the weighted average entry price, and potential losses during prolonged adverse market movements.
Partial position closing may reduce remaining trading exposure under suitable market conditions. However, it does not automatically eliminate accumulated losses or guarantee recovery.
VR Proton
VR Proton combines trend-oriented entries with position averaging and mechanisms for managing trading cycles.
When researching this type of trading system, it is important to understand that a trend-oriented initial entry does not eliminate the risks associated with subsequent averaging operations.
The complete trading cycle must be examined, including maximum exposure, position management, and exit conditions.
VR Lollipop
VR Lollipop provides another example of trend-oriented position management.
When researching such algorithms, particular attention should be paid to sudden market reversals, volatility changes, cumulative directional exposure, and the execution costs associated with multiple trading operations.
Differences in trading logic do not prove diversification. Whether VR Smart Grid, VR Proton, and VR Lollipop compensate for each other's losses must be evaluated using synchronized results for specific configurations, return correlations, and adverse-market scenarios. Select portfolio components through research rather than product names.
One Trading Account or Multiple Independent Accounts?
Should several Expert Advisors share one account or operate on separate accounts? Both arrangements have advantages and limitations.
Multiple Expert Advisors on One Trading Account
A shared account allows robots to use common free margin and makes combined performance easy to observe. However, one strategy may consume margin needed by others. A critical margin level can affect positions across several strategies. Correct operation identification and coordination are essential.
Multiple Independent Trading Accounts
Separate accounts isolate funds and margin if the broker does not use a shared collateral system. Individual performance is easier to analyze, but free margin is generally not automatically shared, and portfolio monitoring requires combining account data.
| Comparison Criterion | Single Account | Multiple Accounts |
|---|---|---|
| Free margin utilization | Shared | Separate |
| Capital separation | Logical allocation | Actual separation on independent accounts |
| Portfolio drawdown monitoring | Direct | Requires data aggregation |
| Trading algorithm conflicts | Possible | Direct position conflicts between accounts are avoided |
| Capital utilization | Potentially more flexible | Requires separate allocation decisions |
| Individual strategy analysis | Requires transaction attribution | Generally simpler |
The choice depends on strategy architecture, capital, broker conditions, and financial control requirements.
Magic Number and Independent Expert Advisor Operation
MQL4 and MQL5 provide Magic Number, a numerical identifier for associating trading operations with a strategy. For example, three robots on one account may use the following identifiers:
| Trading Robot | Financial Instrument | Magic Number |
|---|---|---|
| Robot A | EURUSD | 10001 |
| Robot B | GBPUSD | 10002 |
| Robot C | EURUSD | 10003 |
Each robot must identify its own positions. Incorrect management logic can modify or close another strategy's positions, particularly when functions fail to filter by instrument and Magic Number.
MQL5 Example: Calculating the Cumulative Position Volume of an Expert Advisor
Consider a simple educational MQL5 function that calculates the combined volume of open positions associated with a specified financial instrument and Magic Number.
double GetRobotVolume(const string symbol, const long magic) { double volume = 0.0; for(int i = PositionsTotal() - 1; i >= 0; i--) { ulong ticket = PositionGetTicket(i); if(ticket == 0) continue; if(!PositionSelectByTicket(ticket)) continue; if(PositionGetString(POSITION_SYMBOL) != symbol) continue; if(PositionGetInteger(POSITION_MAGIC) != magic) continue; volume += PositionGetDouble(POSITION_VOLUME); } return volume; }
The function iterates through open positions, checks the financial instrument and Magic Number, and calculates their combined trading volume.
Example usage:
double robotVolume = GetRobotVolume("EURUSD", 10001); Print("Robot volume: ", robotVolume);
This example is primarily for hedging accounts. It excludes pending orders, monetary risk, and the distinction between BUY and SELL exposure; a complete portfolio module requires additional calculations.
Calculating Net Directional Exposure
When a strategy holds both BUY and SELL positions on one instrument, calculate gross and net volume separately. This MQL5 function returns signed directional exposure for a selected Magic Number:
double GetRobotNetVolume(const string symbol, const long magic) { double netVolume = 0.0; for(int i = PositionsTotal() - 1; i >= 0; i--) { ulong ticket = PositionGetTicket(i); if(ticket == 0) continue; if(!PositionSelectByTicket(ticket)) continue; if(PositionGetString(POSITION_SYMBOL) != symbol) continue; if(PositionGetInteger(POSITION_MAGIC) != magic) continue; double volume = PositionGetDouble(POSITION_VOLUME); ENUM_POSITION_TYPE type = (ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE); if(type == POSITION_TYPE_BUY) netVolume += volume; if(type == POSITION_TYPE_SELL) netVolume -= volume; } return netVolume; }
Positive values indicate net BUY exposure; negative values indicate net SELL exposure. For BUY volume of 0.50 lots and SELL volume of 0.30 lots, net exposure is +0.20 lots and gross exposure is 0.80 lots. Small net exposure does not necessarily imply low margin or trading costs.
Additional information about available position properties can be found in the official MQL5 documentation.
Hedging and Netting Accounts in MetaTrader 5
When building a portfolio of automated trading strategies, it is important to consider the position accounting system used by the trading account.
Hedging Accounts
On a hedging account, several independent market positions can exist for the same financial instrument, including positions in opposite directions.
This allows multiple Expert Advisors to manage their own positions independently, provided that the algorithms correctly identify their trading operations.
Netting Accounts
On a MetaTrader 5 netting account, there is one combined position per instrument. If Robot A buys 0.30 lots of EURUSD and Robot B sells 0.20 lots, the resulting position is BUY 0.10 lots, assuming full execution and no other positions. POSITION_MAGIC alone cannot fully attribute volume or financial results to each strategy. Developers must examine deal and position identifiers, transaction history, and, where needed, virtual position accounting. Verify that every robot is compatible with the account type.
Centralized Portfolio Risk Management
Suppose five robots share an account, each with its own exposure and drawdown limits. They may independently approve new positions at nearly the same time and collectively exceed the intended risk limit. A centralized portfolio risk management module should coordinate the following tasks:
- Monitoring total account equity drawdown.
- Monitoring the financial exposure of individual strategies.
- Controlling cumulative trading volume for each instrument.
- Calculating net directional exposure.
- Accounting for potential exposure from pending orders.
- Monitoring used and available free margin.
- Evaluating the monetary risk of proposed trading operations.
- Restricting the trading activity of individual strategies.
- Defining emergency financial exposure reduction conditions.
- Managing the restoration of normal trading activity.
Individual and Portfolio-Wide Risk Limits
Consider a hypothetical portfolio consisting of three automated trading strategies.
| Risk Management Level | Illustrative Restriction | Algorithm Behavior |
|---|---|---|
| Robot A | 8% strategy drawdown | Restrict additional trading operations |
| Robot B | 10% strategy drawdown | Reduce permitted exposure |
| Robot C | 12% strategy drawdown | Switch to position management mode |
| Entire Portfolio | 10% account drawdown | Restrict additional exposure |
| Entire Portfolio | 15% account drawdown | Activate emergency risk management |
These thresholds are illustrative software design examples, not trading settings. Individual limits control strategy behavior; portfolio-wide limits address combined exposure.
Example of Portfolio Risk Management Architecture
The following educational pseudocode demonstrates the general decision-making sequence of a centralized portfolio risk management system.
UpdatePortfolioState();
if(PortfolioEmergencyLimitReached())
{
BlockNewEntries();
CancelRiskIncreasingPendingOrders();
ExecuteEmergencyRiskReduction();
VerifyTradeResults();
return;
}
ManageExistingPositions();
UpdatePortfolioState();
if(PortfolioEmergencyLimitReached())
{
BlockNewEntries();
CancelRiskIncreasingPendingOrders();
ExecuteEmergencyRiskReduction();
VerifyTradeResults();
return;
}
if(!PortfolioAllowsNewEntries())
return;
if(!StrategyAllowsNewEntries())
return;
if(!TradingSignalExists())
return;
if(!ExposureLimitIsRespected())
return;
if(!MarginLimitIsRespected())
return;
ExecuteTrade();
VerifyTradeResult();
UpdatePortfolioState(); A trading signal should not automatically authorize a transaction. First check portfolio-wide limits. Independent Expert Advisors need a communication and authorization mechanism, including risk reservations to avoid simultaneous approvals. A monitoring EA cannot automatically block other EAs that do not cooperate with this protocol. Handle rejected or partially executed requests, connection failures, and changes caused by other robots or manual trades.
How to Test a Portfolio of Expert Advisors Correctly
Adding independent backtest profits can give a misleading estimate of shared-account performance. Suppose three Expert Advisors were each tested with $10,000 of initial capital:
- Robot A generated a profit of $2,000.
- Robot B generated a profit of $1,500.
- Robot C generated a profit of $3,000.
The combined profit of $6,500 cannot simply be assumed for one $10,000 account: the individual tests used separate capital. If returns were 20%, 15%, and 30% over the same period, the hypothetical return with initial weights of 40%, 30%, and 30% is:
PortfolioReturn = 0.40 × 20% + 0.30 × 15% + 0.30 × 30% = 21.50%.
This corresponds to $2,150 in hypothetical profit, assuming relative returns scale with capital. Minimum lots, nonlinear sizing, shared margin, and execution differences can invalidate that assumption.
Step 1. Independent Strategy Testing
Each Expert Advisor should first be investigated independently.
The trader must understand its trading logic, maximum historical drawdown, position accumulation mechanisms, sensitivity to transaction costs, and behavior under different market conditions.
Step 2. Creating Synchronized Financial Time Series
Collect synchronized equity histories for each strategy over the same period, including realized and floating results. Use the aligned observations to calculate returns, correlations, and combined portfolio equity.
Step 3. Capital Allocation and Portfolio Analysis
Define capital weights, volume limits, and monetary risk budgets. Construct the combined equity curve and calculate return, maximum drawdown, volatility, and drawdown duration.
Step 4. Investigating Combined Strategy Operation
Investigate shared margin and transaction conflicts. MetaTrader 5 supports multi-currency and multi-strategy EAs, but a normal test of one EA does not automatically run several independent EA files on a shared simulated account. A specialized architecture, portfolio simulator, or coordinated demo forward test may be needed.
Step 5. Portfolio Stress Testing
Particular attention should be paid to scenarios in which several strategies experience unfavorable financial results simultaneously.
Useful stress-testing scenarios include:
- Prolonged directional market movements.
- Sudden price reversals.
- Simultaneous spread expansion across several instruments.
- Price gaps.
- Unfavorable trading execution.
- Changes in margin requirements.
- Increasing correlation between strategies.
- Simultaneous accumulation of multiple trading grids.
- Temporary loss of connectivity to the trading server.
The objective is to evaluate the overall risk profile across market conditions, not simply maximize historical profit.
Common Mistakes When Building a Trading Robot Portfolio
Mistake 1. Selecting Expert Advisors Exclusively by Historical Profitability
High historical profitability does not necessarily mean that a trading robot is suitable for a particular portfolio.
A strategy with lower historical returns may provide greater diversification benefits if its financial results are less correlated with those of existing strategies.
Mistake 2. Using Identical Position Sizes
Identical trading volumes do not necessarily represent identical monetary risk.
Contract sizes, tick values, volatility, protective stop distances, and holding periods may differ substantially.
Mistake 3. Ignoring Strategy Correlation
Several trading robots may respond to the same underlying market factors.
If all strategies increase financial exposure under similar conditions, simply increasing the number of Expert Advisors does not provide effective diversification.
Mistake 4. Ignoring Portfolio-Wide Drawdown
Independent financial restrictions for individual Expert Advisors cannot replace centralized monitoring of overall portfolio equity.
Mistake 5. Ignoring Combined Margin Requirements
Even if individual trading robots perform successfully during separate historical tests, their simultaneous operation may create excessive margin requirements.
Shared margin limitations can also change the behavior of individual trading strategies.
Mistake 6. Using Identical Magic Numbers
Incorrect identification of trading operations can allow one Expert Advisor to interfere with positions belonging to another strategy.
Developers should carefully organize Magic Numbers and consider the characteristics of hedging and netting accounts.
Mistake 7. Constantly Replacing Trading Robots After Losses
A sequence of losing trades may be part of a strategy's expected risk profile. Determine whether performance has genuinely changed before removing a robot from the portfolio.
Mistake 8. Increasing Overall Financial Risk When Adding New Robots
Adding robots while retaining the original position sizes can increase total market exposure rather than diversify existing risk. Recalculate portfolio risk whenever a strategy is added.
Which Is Better: One Trading Robot or a Portfolio of Expert Advisors?
| Comparison Criterion | Single Trading Robot | Trading Robot Portfolio |
|---|---|---|
| Configuration complexity | Generally lower | Generally higher |
| Performance analysis | Relatively simple | Requires individual and combined analysis |
| Strategy diversification | Depends on internal architecture | Potentially greater |
| Adaptation to changing market regimes | Depends on one system | May improve through strategy differences |
| Margin management | Relatively straightforward | Requires centralized coordination |
| Algorithm conflicts | Generally less likely | Potentially more likely |
| Capital requirements | Depend on one strategy | Depend on risk allocation and minimum volumes |
| Testing complexity | Lower | Higher |
| Maximum drawdown | Depends on the selected algorithm | May increase or decrease |
| Financial risk management | Individual restrictions | Individual and portfolio-wide restrictions |
| Operational maintenance | Generally simpler | Requires additional monitoring |
One thoroughly researched Expert Advisor is often more manageable for beginners. As experience increases, investigate multiple strategies. A portfolio is a trading system in its own right and requires separate testing, configuration, and monitoring.
Frequently Asked Questions About Trading Robot Portfolios
How Many Trading Robots Should a Portfolio Contain?
There is no universal number.
Two genuinely different trading strategies may provide better diversification than ten Expert Advisors with similar financial risks.
Can I Use Multiple Instances of the Same Expert Advisor?
Yes. The same Expert Advisor may operate with different configurations, financial instruments, and timeframes.
However, traders must investigate whether these configurations create genuinely different sources of financial returns and risks.
Can Several Trading Robots Operate on EURUSD Simultaneously?
Yes, provided that trading operations are properly identified and combined financial exposure is controlled.
On MetaTrader 5 netting accounts, the aggregation of trading transactions into one combined position per financial instrument must also be considered.
Does a Portfolio Always Reduce Maximum Drawdown?
No. If trading strategies have strong positive correlation or the addition of new Expert Advisors increases overall exposure, portfolio drawdown may become larger.
Can Trading Robots Always Compensate for Each Other's Losses?
There is no guaranteed way to construct such a combination.
Strategy correlations, market conditions, and the financial behavior of trading algorithms can change over time.
What Is More Important: the Number of Trading Robots or the Quality of Diversification?
The quality of diversification is considerably more important than the number of running programs.
Traders must investigate actual financial exposure, trading logic, return correlations, and the behavior of strategies under unfavorable market conditions.
Do I Need a Separate VPS for Every Trading Robot?
Not necessarily.
Several Expert Advisors can operate within one MetaTrader terminal when sufficient computing resources are available and the programs are properly configured.
Separate infrastructure may improve operational independence, but it does not eliminate every technical or financial risk.
Can a Profitable Portfolio Be Constructed From Losing Trading Robots?
If every strategy has negative mathematical expectancy after transaction costs, simply combining them using constant non-negative portfolio weights will not create positive mathematical expectancy.
Diversification can change the distribution and variability of financial results, but it cannot replace the statistical advantage required by a trading strategy.
Should Portfolio Weights Be Optimized Using Historical Data?
Historical portfolio optimization can provide useful information, but it also introduces the risk of overfitting.
Portfolio weights that produce exceptionally attractive historical results may perform poorly under different market conditions.
Independent data validation, stress testing, and sensitivity analysis should therefore be included in the portfolio research process.
Recommendations
Friends, treat portfolio construction like the development of a new trading strategy. First investigate each robot's signals, sizing, position management, and adverse-market behavior. Then evaluate their combined performance, paying particular attention to:
- Maximum equity drawdown of each individual strategy.
- Maximum drawdown of the combined trading portfolio.
- Correlation between periodic strategy returns.
- Strategy correlation during unfavorable market conditions.
- Maximum cumulative financial exposure.
- Minimum observed margin level.
- Duration of unfavorable trading periods.
- Sensitivity to spreads, commissions, and swaps.
- Portfolio-wide financial risk restrictions.
- Reliability of software communication and coordination mechanisms.
Do not add strategies solely because of attractive historical returns. Each robot should have a defined role; otherwise it may only increase exposure and complexity. My friend, remember that a genuine trading robot portfolio is a unified capital management system, not simply several Expert Advisors attached to MetaTrader charts. It requires researched algorithms, mathematically justified restrictions, and portfolio-wide risk control.
If you are interested in automated trading research, MQL4 and MQL5 programming, trading position management, and the development of algorithmic trading systems, you can explore my other educational publications through my MQL5 profile.
How many trading robots do you use simultaneously? Do you prefer one thoroughly investigated Expert Advisor or a portfolio? Do you calculate return correlations and use a centralized risk manager? Share your mathematical models, programming approaches, and practical experience in the comments.
All numerical examples, financial results, capital allocations, correlation coefficients, and risk thresholds are hypothetical and educational. They are not actual testing results for the mentioned Expert Advisors. This material is not personalized investment advice. Trading financial instruments involves the risk of partial or total capital loss. Historical performance does not guarantee future results.
Tags: Trading Robots, Expert Advisors, Trading Robot Portfolio, Diversification, Algorithmic Trading, Automated Trading, Risk Management, Money Management, Strategy Correlation, Portfolio Management, Drawdown, Forex Trading, Trading Strategies, MetaTrader 4, MetaTrader 5, MQL4, MQL5, Magic Number, VR Smart Grid, VR Proton, VR Lollipop.


