Ilan 1.6 Dynamic: Martingale Beneath
10 minutes for reading
Welcome to the RoboForex blog! Today, I will tell you about my impressions from the Ilan 1.6 Dynamic robot. I will describe its idea and work principles, settings, effectiveness, testing and optimizing. Of course, we will discuss the longevity of the expert advisor.
I may be mistaken but I presume that every trader that at least once tried using expert advisors has heard about a robot called Ilan. Many call the family of Martingale-based expert advisor - the Ilan family. People's experience and guesses create a lot of myths around expert advisors that use the Martingale money management system. Some had a positive experience, some, however, were less fortunate. Each person has their reasons for being happy or disappointed by an expert advisor.
In this post, I will try to figure out and enumerate the reasons for negative feedback from Ilan, as well as demonstrate the peculiarities of its work principles and settings that yielded negative results by not being accounted for.
Ilan 1.6 Dynamic and Martingale
Ilan became popular after it won the expert advisor championship in 2007. It became the most disputed robot on traders' forums. Some called it Holy Grail, others blamed it for draining out the deposit, anyway, it was undoubtfully famous.
Historically speaking, Martingale has become known as the system of managing stakes in gambling since the middle of the 18th century. Some say that the system was named after a famous gambler from the 19th century who frequented a casino. Also, the name might be derived from a jargon saying of Occitan gamblers "a la martengalo' which meant "to gamble absurdly".
The idea underlying the Martingale system is to play back losing positions by increasing the size of stakes or series of stakes.
The simplest example of using Martingale in gambling goes as follows:
- The game starts with a certain minimal stake.
- After each loss, the player increases the stake size so that the potential profit covered for all previous losses and yielded a small income. For example, if the first stake was 1 dollar, the second will be 2 dollars, then 4, etc. (1-2-4-8-16-32-64), i.e. the size of each stake doubles. If the player sticks to this sequence and reaches their goal (wins), their net profit will equal to the first stake.
- If the player wins, they must return to their primary stake.
In roulette, Martingale is chiefly used when playing "equal odds": red/black, even/odd.
The question is, how to play classical Martingale?
If the game is lengthy, the number and size of stakes are limited, no winning situation emerges, and your budget is also limited - you may not win.
Using Martingale in the market for trading
The modern trading method implies a series of trades the size of which is not doubled but increased more smoothly - 1.2, 1.4, 1.5 times. This allows for withstanding a longer sequence of losing trades, which you may end with a profit with a smaller number of profitable than losing trades. When you use a series of smoothly increasing volumes, there is a chance for a pullback and closing of the whole series with a profit as pullbacks are usual in the market.
The only problem is the fact that price movements on Forex are chaotic, which may either increase your chances for success or deteriorate them. If you support classical Martingale by technical indicators and calculations, keep an eye on the news and use other tricks, your chances for choosing the right starting point for a trade increase.
The work principle and algorithm of the Ilan 1.6 Dynamic expert advisor
The Ilan expert advisor is based on a simple trading system based on two standard technical indicators - the RSI (Relative Strength Index) and CCI (Commodity Channel Index). The first one gives you the direction for opening a position and the second one limits losses.
A selling situation forms if the closing price of the previous candlestick is below that of the one before it, and the RSI values are above RsiMinimum (the oversold area).
A signal to buy appears when the closing price of the candlestick preceding the actual one is higher than that of the candlestick before it, and the RSI values are under the RsiMaximum (the overbought area).
If the price goes against us, the robot opens additional orders at lower levels and waits for a movement in the direction of the trades: upwards for buying and downwards for selling. By increasing the volume of the next orders the expert advisor nears the breakeven level and tries to close the whole series of orders with a profit.
The developers and traders presume that with such Martingale averaging trades must close either after passing a certain number of points to the Take Profit or after reaching an overall profit in a series of trades, set by the trader themselves. Also, a series of losing trades may be cut down to avoid draining out the deposit if the price goes without pullbacks.
Such a model per see may be called perfect. The only important condition is an unlimited deposit. Most beginner traders come to this algorithm sooner or later. As long as this strategy belongs to "risk-safe" ones, we may get an almost perfect profitability chart and an exorbitant profit at tests if we set up all parameters right. However, practice is very different from testing.
Parameters and settings of Ilan 1.6 Dynamic
- Platform: chiefly MetaTrader 4, MT5 versions also exist
- Currency pairs: any, but GBP/USD is a priority
- Timeframe: any, but the developer recommends M5. Profitability may change depending on the timeframe.
- Working hours: 24h.
The peculiarity of Ilan 1.6 Dynamic is that the range of the researched trend period changes dynamically depending on market volatility.
LotExponent is the multiplication factor for the lot size in a series of trades (a series is over when their general position closes with a profit, after which a new series begins). The lot is calculated based on the initial trade volume - the parameter called Lots. Each next order in the series is calculated as the trade size multiplied by the LotExponent factor.
You should be very cautious altering this parameter: if the factor is too large, the position may acquire critical volume very quickly depriving you of control over the situation. A small price movement against your position will be enough to lose the account at once.
DynamicPips switches on dynamic changing of the distance between the trades. If this parameter is "true", Ilan decides independently where to place the next order (based on the DEL parameter). If it is "false", the distance between the trades will always equal DefaultPips. This function makes the expert advisor flexible.
DefaultPips is the distance between trades in points. The smaller it is, the more often will trades open. A larger value of the parameter helps withstand long trends. And vice versa, a smaller value helps make a larger profit in flats.
Glubina is the number of candlesticks for analyzing volatility. The expert advisor calculates how many points the price has passed during a certain number of candlesticks (the difference between the high and low of the price in the chosen period) and divides the values received by DEL. The minimal distance is limited by DefaultPips divided by DEL and the maximal - by DefaultPips multiplied by DEL.
DEL works only if DynamicPips is on. It changes the initially set step in DefaultPips.
Slip is the largest possible slippage in points.
Lots is the size of the lot of the first trade in a series. This is the main trading lot to which the expert advisor returns each time a series closes with a profit.
Setting the initial size of the lot, estimate the potential aggregate volume of subsequent trades. An excessive value is not recommended, along with too large LotExponent and small range size. In such a case, the position will acquire critical volume too fast.
Lotdecimal is the number of digits after the dot in the lot value. For example, if your lot size is 0.01, Lotdecimal must be 2. When Lots is 0.5, Lotdecimal is 1.
TakeProfit is the number of points needed for closing the series of trades; i.e., the series closes when the profit reached the TakeProfit value. This parameter should not be too large because the main aim of the expert advisor is to close the series with a profit as quickly as possible and start a new one.
Drop closes positions automatically if the quotations leap. For the analysis, the CCI on M15 with the calculation period of 55 bars is used. To switch this function off, set an extremely high value, such as 10,000.
RsiMinimum is the value of the lower border of the RSI (the oversold area) for opening selling trades.
RsiMaximum is the value of the upper border of the RSI (the overbought area) for opening buying trades.
MagicNumber is the unique number of the expert advisor. It helps distinguish between the trades opened by different advisors.
MaxTrades is the maximal number of trades opened simultaneously. Set the maximal size of a series of orders based on your starting capital.
UseEquityStop switches on the Stop Loss by equity.
TotalEquityRisk: when the set percentage of a drawdown by equity is reached, all trades close automatically.
UseTrailngStop enables Trailing Stop for all orders. By default, the value is 10 and incorporated in the code.
UseTimeOut closes positions after a certain time. Regardless of the financial result, all positions close if they remain in the market longer than set by the parameter.
MaxTradeOpenHours is the time in hours after which all positions close.
Testing the expert advisor
For the first test of Ilan 1.6 Dynamic we use EUR/USD and GBP/USD on M5 with default settings:
During the test period from January 1st, 2019 till January 31st, 2020 the expert advisor did not yield any remarkable results or astonishing profitability. Due to this, it needs not only testing but optimization. A change in the timeframe is also important.
After regulating certain parameters for the M15 of EUR/USD, it showed the following results during the same period:
The result was decent, however, the relative drawdown was also rather large, which is characteristic of Martingale-based systems. When I tried to get the maximum of the expert advisor, I customized certain parameters and got the following:
Summary
At the very beginning of testing, I had the impression that the logic of the expert advisor worked in some unexpected way. However, I figured everything out by the error-and-trial method. To get such smoothly ascending charts, I had to switch off all loss-limiting instruments. With those instruments on, the charts were not as nice.
What my complaints about and wishes to the expert advisor would be? I would like to have an instrument of regulating the RSI parameters - this could help to find better entry points. What is more, it would become possible to close the previous knees before opening new ones.
As for the longevity of the expert advisor, it depends on the price dynamics only. In other words, if the price is growing or falling incessantly while your position is the opposite, you have very little chance for long-term successful work. However, this is valid for any other trading system.
So, before starting to use Ilan 1.6 Dynamic, test it on a long period with the instruments you are planning to trade. Do not try to outplay the market, control your greed, and keep your blood cold.
I wish you success and large profits!