In the world of digital technologies, automatized trading systems (also known as expert advisors (EA), or trading robots) gain more and more popularity. While a decade ago Forex traders looked cautiously at the expert advisors, nowadays you can hardly find an experienced trader not interested in those. Let us find out what expert advisors are and why they are so popular.
Any trader on the market has their own trading system, in accordance with which they make operations, otherwise, profit on Forex becomes random because in any point of the chart the price has an equal possibility of moving upwards or downwards. If there were no spreads or fees for trades, the chances for the profit would be fairer; however, as long as it is not possible to trade without expenses, it is necessary to have a trading system that generates at least 55% of profitable trades — then the trader has all chances for making a profit; and the higher the profitability of the trading system, the more the trader can earn on the market. Anyway, the trader cannot keep an eye on the market 24 hours a day, as any person needs to sleep, not to say eat, go out and breathe some fresh air. What is more, there are force majeure situations: internet connection failures, power cuts, etc. All the aforementioned impede the work of the trading system, as there is always a possibility of the signal to appear the very moment when you are not watching the terminal; as a result, your good trading history differs dramatically from what you actually get. All the aforementioned led to the creation of trading robots that can watch the market 24 hours a day and open or close the positions at the most suitable moment.
Today we are going to discuss one of the most popular robots called System CCI.
- Description of the work and parameters of the System CCI
- Opening a position using System CCI: one-level method of analysis
- Opening a position using System CCI: two-level method of analysis
- Testing System CCI expert advisor
Description of the work and parameters of the System CCI
The System CCI expert advisor works on the basis of the well-known indicator Commodity Channel Index (CCI hereafter), included in the standard list of indicators of the MetaTrader 4 terminal. For opening a position, the signal line of the CCI and the default levels of the EA are used. The levels are customizable for a more precise opening of positions.
To begin with, let us discuss the parameters of the EA.
r is the mode of the EA, where True means the advisor is on, and False — the advisor is off.
Exit_mode regulates the opening of positions; True — the expert advisor may open positions, False — the EA finishes work with the positions already open and does not open new ones.
Lot sets up the size of the lot for the first positions.
MaxL limits the maximal order volume in the position.
LotMultiplicator sets the multiplier for the Lot. Becomes valid from the third position opened in the same direction.
Take Profit is the size of the Take Profit for the first trade. If another position is opened in the same direction, the Take Profit is no longer valid.
Stop Loss is the size of the Stop Loss for the first trade. For subsequent trades in the same direction, this Stop Loss is not valid.
hSETKY is the parameter defining the distance (in points) between orders in the network.
Uvel_SETKI allows to make the size of the grids in the network dynamic or fixed.
0 means that the distance between the orders in the network will be equal to hSETKY.
1 — the distance between orders will increase in proportion with the number of open orders. The distance is calculated as hSetky+ShagUvel_SETKY*the number of orders.
2 — in this case, the distance between the orders of the network will decrease in proportion with the number of open orders. The formula is hSetky-ShagUvel_SETKY*the number of orders.
ShagUvel_SEYKY — the parameter influences the speed of increasing or decreasing the distance between the orders in the network.
Trailing_mode sets up the work mode of TrailingStop.
1 — in this case, one level of TrailingStop for all positions opened in one direction.
2 — the trading robot will follow three closing levels of orders:
- the closing level of orders of the same type,
- the closing level of the most losing and the most profitable orders (a series of two orders),
- the closing level of the most losing order out of two latest orders in a series of 3 orders.
3 — here the principle is the same as in Trailing_mode-2, but the dynamics of the TrailingStop parameter is also added, the latter becoming dependent on the ratio of all Buy orders to all Sell orders, i.e. if there are more Buy orders, TrailingStop grows for the Sell orders, and vice versa.
Protection TP defines minimal profit in points from the price, recommended settings are 5 to 15 points. This parameter helps close the series of orders when the price moves in a positive direction.
TrailingStop defines the distance (in points) from the current price to the StopLoss in profit. Valid for all open orders.
CCI_sing_mode defines the principle of analysis for opening the positions.
1 is a one-level CCI analysis. In this case, the robot analyzes the moments of the crossing of the CCI signal line and UB_2 for a buying position or US_2 for the selling one.
2 — two-level CCI analysis, when the indicator waits for the signal line to cross UB_1, then UB_2 and only then opens a buying position. For selling positions the lines will be US_1 and US_2.
3 — the two-level method of CCI analysis with the simplified signal for the contrary positions. In other words, if there are 5 orders open for Buy in a currency pair, but no Selling positions, the conditions for selling orders simplify: for a selling position to open, it is enough for the price to cross the CCI signal line US_1, US_2 or 0. For buying positions, the second method of analysis will be valid.
CCIperiod — the period of the CCI indicator.
UB_1 is the first CCI level for buying.
UB_2 is the second CCI level for buying.
US_1 is the first CCI level for selling.
US_2 is the second CCI level for selling.
Min_Proс_SV_Sr defines the limits of free capital on the account in percents. In this case, when the size of the free capital becomes less than the Min_Proc_SV_Sr setting, the advisor starts working in one direction only, i.e. if there are many orders to Sell, the robot will only open orders to Buy.
Magic is the label, by which the expert advisor distinguishes its orders from other ones.
ShowTableOnTesting switches the info screen on the chart on and off.
The System CCI EA may be used on other timeframes, apart from M1 — on this timeframe there will be plenty of signals, but the profit will be mostly spent on the fees and spreads, so the robot may turn out poorly efficient or even losing. Weekly or monthly timeframes may yield good results, but trades may be too scarce, which means low profitability. Most often the advisor is used on H1 or H4
Opening a position using System CCI: one-level method of analysis
Let us have a look at an example of opening a position with CCI_sing_mode set up as 1, i.e. with the one-level method of analysis used.
As soon as the signal line of the CCI crosses the level of -100 (UB_2) upwards, a trade for buying opens. Accordingly, a trade for selling opens, when the signal line of the indicator crosses the level of 100 (US_2) downwards.
Next, when the price on the first order becomes negative, the expert advisor, if all conditions are fulfilled, opens another position in the direction of the losing trade, thus averaging the losing position.
Opening a position using System CCI: two-level method of analysis
Now, let us have a look at how positions open by the two-level method of analysis, where the entry point lies at the crossing of the levels UB_1, UB_2 or US_1, US_2 by the signal line of the CCI indicator.
In this case, the signal line of the CCI indicator crossed the levels of -150 (UB_1) and -100 (UB_2) upwards, and only then the position for buying opened.
With selling, it is vice versa: first, the signal line of the CCI broke through 150, then 100, and then a position for selling opened.
Testing System CCI expert advisor
And now let us test the System CCI on the currency pair EURUSD, starting January 2019. In testing, standard parameters of the expert advisor for H1 and the first method of analysis are used (i.e. CCI_sing_mode is 1). The deposit is 10,000 USD, the volume of the initial position open is 0.1.
Now let us test EURUSD with the same parameters and the same period on H1, but with CCI_sing_mode set as 2. The deposit is 10,000 USD, the volume of the initial position open is 0.1.
Now, let us check the third method of market analysis, when the CCI_sing_mode parameter is 3, on the same currency pair during the same period, with the volume of the initial position open amounting to 0.1.
In all three cases, on H1 the System CCI showed positive profitability: the third method of analysis would yield some 25% of profit, the worst result would be with the second method with the profitability about 10%, while the first method demonstrated the lowest slump with the profitability of 15%.
Testing on M5 did not turn out significantly more advantageous than on H1. In this case, the number of trades grew up to 200, but the profitability of the same period remained under 15%. M5 may be used in the cases when you get a rebate, i.e. a return of part of your capital, or when you have a bonus you need to realize in order to withdraw the capital. A large number of trades will let you get more rebate payments, or you will be able to realize the bonus conditions quicker, automatically turning your bonus into net profit.
Testing of the System CCI expert advisor demonstrated positive profitability of the currency pair EURUSD with any method of analysis, provided by the trading robot; however, it should be kept in mind that the advisor averages losing trades, i.e. uses the martingale principle, which is quite a risky strategy, possibly leading to a large slump on the deposit. You can test the System CCI expert advisor on other currency pairs yourself, but the results of testing feature a certain error, so it is better to try the advisor on a demo or a cent account during several weeks, and only after that make your decision about using it on a larger real deposit.