# Evaluating the effectiveness of trading systems by analyzing their components

### introduction

any beginner to trade on financial markets very quickly understood that in this field the success is only possible if a certain the system approach. Trade in elemental, luck, random, emotional, usually does not lead to a positive result or leads, but short enough, but in the end it all ends in tears. Therefore, any analysis, whether graphic, based on indicators or any other, is one of the key components of successful trading on the financial markets. This article is a kind of study of several independent simple trading systems, analysis of their effectiveness and usefulness of joint application.

### the definition of criteria for evaluating the effectiveness of trading system

generally, the assessment of the efficacy of any trading system is a kind of combination of defined and parameters, as well as some of the result values the the system. As parameters may be periods indicators dimensions stoploss or takeprofit, or more complex set of coefficients, affecting entry and exit from the market. The resulting values, in turn, are a net profit slump, the percentage of successful transactions or the average value of profitable transactions in the deposit currency.

any trading system over time, reduces its effectiveness because the nature of currency markets all the time is changing, it becomes noticeable on result indicators. Have to modify the specified parameters of the system, adjust them to changing conditions. In this article, you should define the concept of an integral trading system.

*an integral trading system* is a collection of individual units, have their own algorithms and parameters and working together. The work of any of the blocks included in this system, you can evaluate a specified set of criteria. Consider the effectiveness evaluation system diagram on fig. 1. Composite system consists of three constituent units (A), (B), (C), each of which has its own operating parameters. The functioning and effectiveness of the system measured by three criteria: 1, 2, 3. over time there is a change in market conditions, which sells the system, and change settings in the 1-3 side of the poor that serves as a signal that it is time to reconfigure the system. This can be done using the following methods:

- Run all nine optimization parameters to adapt the system to the realities of the market today. But this way there is redundancy — why optimize all parameters if it is possible to find out which one of the blocks is worse to do its work?
- Accordingly, the second way. Creates a total for all three units of the system a set of criteria for the assessment of K1, K2, K3, to evaluate and compare the performance of each block separately.

the advantages of this method:

- avoidance of redundancy. Don’t optimize something that works perfectly.
- monitoring system. You can measure parameters K1-K3 through certain intervals, thereby figuring out how the system behaves and its units together and separately at different times of the market (trading session, news outlet, etc.).
- analysis of vulnerabilities. Lets find out what kind of pulls the whole system down to optimizations, replacement or improvement of this block only, rather than the system as a whole.

fig. 1. Composite trading system

### Sample effectiveness evaluation system through analysis of its components

in order to test the efficiency of the entire trading system, check out how to work the system blocks apart from each other and how they work together. The test system will consist of two blocks:

- a. Block is based on a standard Parabolic SAR indicator signals.
- Blok based on signals standard Accelerator Oscillator indicator (AC).

immediately define a set of criteria for evaluating these blocks:

- the criterion of K1 is pure profit.
- the criterion of K2 — the maximum drawdown.
- the criterion of K3 is profitable trades (% of total).

For total clarity as parameters to the overall effectiveness of the system will choose the same indicators:

- Option 1 — net profit.
- Option 2 — maximum drawdown.
- Parameter 3 is profitable trades (% of total).

examples of signals to the entrance into the market for these indicators can be found in the documentation of MQL5 standard library: Parabolic SAR signal lines and signal lines Accelerator Oscillator (initial conditions). Describe for each of these conditions of entry and find out the conditions under which they are effective on a given section of the test.

all options written below the test expert advisor are as follows:

figure 2. Parameters of the Expert Advisor

#property copyright "Alexander Fedosov" #property link "https://www.mql5.com/ru/users/alex2356" #property version "1.00" #property strict #include "trading.mqh" input int = tm 1; input int SL = 40; input int TP = 70; input bool lot_const = false; input double lt = 0.01; input double Risk =2; input int = Slippage 5; input int magic = 2356; input ENUM_TIMEFRAMES tf1 = PERIOD_H1; input ENUM_TIMEFRAMES tf2 = PERIOD_M5; input double Step = 0.02; input double .mxm = 0.2; CTrading tr (magic, Slippage, lt, lot_const, Risk,5); void OnTick() { if(tm <1 | tm >3) return; if(tm =1 & &! tr. isOpened (magic)) { double []psar prc[]; ArrayResize (psar,3); ArrayResize (prc,3); for(int i =0i< 3; i ++) {psar[i]=iSAR(_Symbol, tf1, Step, Mxm, i); PRC[i]= iClose (_Symbol tf1, i); } if(psar[2]> prc[2]& & psar[1]< prc[1]& & psar[0]< prc[]) tr. OpnOrd (OP_BUY, lt, TP, SL); if(psar[2]< prc[2]& & psar[1]> prc[1]& & psar[0]> prc[0]) tr. OpnOrd (OP_SELL, lt, TP, SL); } if(tm =2 & &! tr. isOpened (magic)) { double ac[]; ArrayResize (ac,3); for(int i =0i< 3; i ++) charger[i]=iAC(Symbol(), tf2, i); if([2]>0 & & ac[1]>0 & & ac[1]> ac[2]) tr. OpnOrd (OP_BUY, lt, TP, SL); if([2]0 < & & ac[1]0 < & & ac[1]< ac[2]) tr. OpnOrd (OP_SELL, lt, TP, SL); } if(tm =3 & &! tr. isOpened (magic)) { double []psar prc[]ac[]; ArrayResize (psar,3); ArrayResize (prc,3); ArrayResize (ac,3); for(int I =0; I3 <; I ++) {psar[i]=iSAR(_Symbol, tf1, Step, Mxm, i); PRC[i]= iClose (_Symbol tf1, i); AC[i]=iAC(Symbol(), tf2, i); } if((psar[2]> prc[2]& & psar[1]< prc[1]& & psar[0]< prc[]) | ([2]>0 & & ac[1]>0 & & ac[1]> ac[2])) tr. OpnOrd (OP_BUY, lt, TP, SL); if((psar[2]< prc[2]& & psar[1]> prc[1]& & psar[0]> prc[0]) | | ([2]0 < & & ac[1]0 < & & ac[1]< ac[2])) tr. OpnOrd (OP_SELL, lt, TP, SL); }}

the first parameter test Expert Advisor **– ** **tm **(Test mode) can take values 1, 2 or 3. These values correspond to the three modes of operation:

- tm = 1. Uses only the conditions of entry into the market by using Parabolic SAR indicator. Operating mode only block a.
- tm = 2. Uses only the conditions of entry into the market by using Accelerator Oscillator indicator. Operating mode only block (B).
- tm = 3. The joint work of both units. The whole system works.

changing the parameter Test Mode, we can ascertain interest us options: for blocks a and b this K1-K3, for the entire system-1-3 settings. The following are the test results on the SAR unit (fig. 3) the unit (fig. 4) and they work together (fig. 5).

fig. 3. Testing module, Parabolic SAR

fig. 4. Testing the AC module

fig. 5. The joint work of the SAR and AC modules

based on the results of three different modes of operation for clarity, let’s consider a comparison chart:

Test Mode | net profit profitable trades,% | Maximum drawdown | |
---|---|---|---|

1 | 27.56 37.91 | ||

32.71 2 | 106.98 39.19 | ||

38.94 3 | 167.16 40.64 | 18.62 |

### Helic reproduction situation deterioration of a system

and now change the operating parameters of the unit a (Test Mode = 1) in the direction of reducing the effectiveness of its work. This will give us the answer to the question, what will happen to the system if you change for the worse one of his blocks.

to simulate the effectiveness of systems change one parameter relating to the work of the unit and is a **Timeframe for the calculation of module1- **as follows, shown in Figure 6. This will change during its calculation, based on the Parabolic SAR, that affect the place of entry into the market and, consequently, change the efficiency of the whole system.

fig. 6. Simulation of effectiveness system

fig. 7. The result of the changes to the parameter module based on Parabolic SAR

for illustration purposes compare the observed us performance block and with two different values of its parameter **Timeframe for the calculation of module1:**

Timeframe for the calculation of module1 |
net profit profitable trades,% | ||
---|---|---|---|

the maximum drawdown of 1 Hour | 27.56 37.91 | ||

32.71 4 Hours | 2.54 36.73 | 43.21 |

it is obvious that the settlement of the 4-hour period gave us the results of work deteriorated, and module on all three criteria. Testing the entire system with deliberately degraded values one of her constituents have also reduced the effectiveness of the 1-3 options system as shown in Fig. 8.

fig. 8. Collaborating modules of Parabolic SAR (degraded) and AC

and now assemble all the test results together to find out what effect a change in the work of the unit and on the overall efficiency of the system.

Timeframe for the calculation of module1 |
net profit (module 1) | profitable trades,% (1) |
the maximum drawdown,% (1) |
net profit (System) | Profitable trades,% system |
maximum drawdown,% system |
---|---|---|---|---|---|---|

4 Hours | 2.54 36.73 | 43.21 139.34 | 40.00 | |||

24.9 1 Hour | 27.56 | 37.91 32.71 | 167.16 40.64 | 18.62 |

the results showed that the compound blocks system separately from each other with a view to improving the effectiveness of the important and positive effect on the evaluation parameters of the whole system. While confirmed abstracts at the beginning of the article that this method is less redundant than optimizing the entire system as a single object; In addition, this method gives additional system monitoring capabilities.

### Conclusion

this article was reviewed by the method of assessing the effectiveness of trading systems through analysis of its components. Based on the testing and research of composite block system and its modules you can make conclusions:

- this method of valuation less redundant than the optimization of all the parameters of the systems by identifying only those components that require optimization and improve.
- Create trading systems in the form of a composite using blocks, measurable criteria, allows you to manage more effectively, identify weaknesses, more flexible upgrade.

for correct testing, you must create a separate folder, such as MQL4Expertsarticle1924, and put both files in it.

The topic of the article is always relevant, but the article itself did not like. An example is banal – in fact, a pair of trading advisers are shoved into one. Of course it is more logical and easier to optimize them one by one. And what the author suggests for a trading advisor with a point estimate, when there are n program blocks giving signals for input, m program blocks giving signals for output and a decision about entering – leaving is taken according to the sum of the points collected. How then to come up with criteria for assessing K1-K3?