Ilan Advisor - the father of martingale, and his children. Theory and practice of averaging on Forex
Hello, dear traders! You often ask about the Forex advisor Ilan (Ilan) 1.6 Dynamic. Since this robot won an advisor championship back in 2007, it has never left the discussion on forums. The holy grail of profit? Or a scam for suckers? It is time to dot all the i's.
Today we will examine the principles of trading using averaging (martingale): basic concepts and little-known facts, historical roots and modern methods, as well as why it is theoretically possible and how it is practically profitable to trade using the averaging method when losing. As a sample, we will consider the trading robot (advisor) Ilan (Ilan), widely known in the trading community, which became a "role model" for later martingale advisors.
Historical Background

Martingale (under its modern name) as a stake management system in gambling has been known since the middle of the 18th century. There is a version that the system was named after a lucky 19th-century card player who was a regular at the casinos of the French Riviera. Possibly, the name goes back to the jargon of Occitan card players, where a la martengalo meant " in an absurd way." In turn, the word martengalo referred to the inhabitants of the town of Martigues, who served in anecdotes as images of naive simpletons.
The Essence of the System

The essence of the system in general is to recover losing trades by increasing the size of the stake or a series of stakes.
In the simplest case (in gambling), the martingale method works as follows:
- The game begins with some preselected minimum stake.
- After each loss, the player must increase the stake so that in case of a win all previous losses in this series are recovered, with a small profit. (For example 1-2-4-8-16-32-64 and so on). If the sequence is followed, the player's profit on a win will be equal to the initial stake.
- In case of a win, the player must return back to the minimum stake.
In roulette, martingale is used mainly for bets on "even chances": red/black, even/odd. In this case, after a loss each subsequent stake is equal to double the previous one. By the way, the internet is full of sites with this "secret" method for winning at roulette. Don't fall for it)
How to Win With Classic Martingale?

In a long game, it is impossible to win at all. Seriously, no way. Theoretically, winning is possible only with an infinite amount of money and no limits on the maximum stake size. In practice, stake sizes are always limited, not to mention a bottomless wallet.
Using Martingale in Modern Systems

- In modern interpretations, a series of stakes increasing not by 2 times, but more smoothly, is often used. This makes it possible to withstand a long series of losing bets, and, in order to exit such a series with a profit, there is no need to win as often as to lose: fewer winning trades are required than losing ones. When using a series of smoothly growing stakes, there is no rigid dependence on the only positive stake in the whole series, and it often happens that a large series of losing trades increases the chances of a "pullback" and closing in profit (frequent "pullbacks" from the trend are a known feature of the currency markets);
- Forex price movements do not have levels corresponding to a normal probability distribution, which can increase the chances of success;
- Unlike classic martingale, technical indicators and statistical calculations are used, the release of news is taken into account, and other methods are used, increasing the probability of making the right choice;
- Periodic withdrawal of earned funds is used, this makes it possible to earn profit over a long period of the system's operation.
An Example of an Advisor With Martingale:
Ilan 1.6 (Ilan 1.6 Dynamic)
Specifications of the Ilan 1.6 Dynamic Advisor
Platform: Metatrader 4
Advisor version: 1.6
Currency pairs: GBPUSD
Timeframe: M5
Operating time: around the clock
Recommended broker: Roboforex, Forex4You
Installation Guide
Install the advisor as usual. If this is your first time dealing with robots on Forex and you have a lot of questions, download and watch the course Forex on Autopilot.
Attention! Since the advisor is potentially dangerous, be sure to read the article on the basic principles of trading robots based on averaging.
Advisor strategy

The Ilan 1.6 advisor uses the martingale strategy. A series of orders with a proportionally increasing lot is used. With an infinite time of using the strategy, a theoretical gain is impossible; however, with periodic withdrawal of investments, probability theory works in our favor. After the withdrawal of the initial investments, the dangerous martingale strategy immediately becomes break-even and highly profitable.
Backtest of the Ilan 1.6 advisor
A typical backtest of the Ilan 1.6 advisor always looks roughly like this:
Description of settings

- FirstOrder - option for opening the first order. When false, the first order is not opened
- LotExponent - the lot multiplication coefficient when placing the next leg. Example: the first lot is 0.1, the series: 0.16, 0.26, 0.43 ...
- DynamicPips - option for enabling dynamic mode
- DefaultPips - the size of the grid step in pips
- Glubina - the number of recent bars for calculating volatility
- DEL - a parameter for calculating the order grid. It is used in calculations together with DynamicPips and DynamicPips .
Calculation example.
DefaultPips = 30
First, the mode is enabled (if FirstOrder=true) in which the 1st leg is placed at 1/3 of DefaultPips, that is 10 pips.
The 2nd leg is placed at 2/3 of DefaultPips, that is 20 pips.
The 3rd leg equals DefaultPips.
From the 4th leg, the "Dynamic" mode is enabled, in which "DefaultPips" works together with the "DEL" parameter (usually has a value of 3 ) and calculates the distance between the legs as follows:
depending on market volatility over the last, for example, 30 (the "Glubina" parameter) bars, the pip step can be set in the range:
from DefaultPips/DEL - this is the minimum pip step (in this case 10),
and up to DefaultPips*DEL - this is the maximum pip step (in this case 90).
That is, in a flat market the pip step is smaller, and in a volatile market it is larger.
- slip - the size of the allowable price slippage in points
- Lots - the lot size for starting trading
- lotdecima l - how many decimal places in the lot to calculate: 0 - standard lots (1), 1 - mini lots (0.1), 2 - micro (0.01)
- TakeProfit - after reaching how many points of profit to close the trade
- Drop - determines the value of the CCI indicator with period 55 built into Ilan 1.6 dynamic. When the "CCI" indicator exceeds the numeric value of the parameter, the robot closes all open orders in order to avoid large losses.
- RsiMinimum - the lower RSI boundary. Relative Strength Index is a technical indicator whose readings are taken into account when opening orders in Ilan 1.6 dynamic. More details about RSI can be read in the Meta Trader terminal help. The robot opens orders within the specified numeric values.
- RsiMaximum - the upper RSI boundary
- MagicNumber - the magic number (helps the advisor distinguish its own trades from others')
- MaxTrades - the maximum number of legs of open orders in a series
- UseEquityStop - this option enables the loss-limiting function when the value is true
- TotalEquityRisk - the percentage of account funds for limiting loss. When the specified value is reached, all trades are closed.
- UseTrailingStop - use of trailing stop. When the value = true, it sets a floating stop-loss for orders located in the break-even zone.
- UseTimeOut - use a timeout (close trades if they "hang" too long)
- MaxTradeOpenHours - after how many hours to close a hanging series of trades
Recommended money management
No less than 1000 units of currency per 0.01 lot for each pair used.
Download the Ilan 1.6 Dynamic advisor
Important! Nuances of installation in new builds of Metatrader 4
Advisors with martingale on our forum

On the forum of the TradeLikeaPro.ru site, several advisors based on martingale and their promising modifications, which have proven themselves in practice, are presented:
- Forex Setka Trader (improved Ilan 1.4) with a review, as well as its ForexSetka Trader Mod, developed by forum member ApMSoft
- Forex Hack with a review and its "big brother" Forex Hack Pro with a review
- Zerg with a review, as well as its Zerg EA MOD, developed by forum member Shmuma
- FE_MOD and its "big brother" ApMGriD, developed by forum member ApMSoft
These advisors outperform most paid advisor-"monkeys", not to mention free ones.
Attention! Since the advisors are potentially dangerous, be sure to read the article on the basic principles of trading robots based on averaging.
The scheme of a risk-free working strategy with dangerous financial instruments, which serious traders and investors successfully use, will also be useful. It looks as follows:
So, you are an investor. You have a sum significant to you for investments, and you want to manage it reasonably. Investments with consistently high profit and small amounts of costs attract your attention. What is the goal of investing? There are two of them: 1) preservation of capital; 2) multiplication of capital. Moreover, the first task is a higher priority (otherwise the capital will be lost). Therefore, it is necessary to maintain a balance between reliability and profitability. What does this mean in the context of high-risk investing? Increased profitability almost always also has the reverse side - increased risk, and risk is the probability of getting losses. To neutralize the probability of losses, they need to be reduced as much as possible or removed altogether, and such an opportunity exists. Since profitability is high, one should adhere to a risk-free strategy, which consists in returning what was invested in the asset, leaving the amount of accumulated profit to "spin" in it. This can be done in different ways: 1) You invest money, and after the investment grows by 100% (doubles), you withdraw the initial investment amount. Thus, you will have no losses from any cataclysms at all. The advantage of this method is a psychologically calm transition to break-even, the disadvantage is the need to wait for doubling. 2) You invest money, knowingly more than you plan to leave in the account, for example, you plan to leave 500$ in the asset, so you deposit 1000$ there, and when the balance is 1500$, you withdraw your 1000$, leaving 500$. The advantage of this method is a faster transition to break-even, the disadvantage is increased risk. 3) You invest money and regularly (for example, once a week or once every two weeks) withdraw the accumulated profit. The advantage of this method is that you will always have some amount of funds free from trading, the disadvantage is that it is a slower way to achieve a risk-free state.
Conclusion

Martingale-based advisors are profitable robots based on averaging, which successfully work on traders' real accounts. However, observing the rules for working with dangerous advisors is of crucial importance.
Important!!!
For the correct operation of the advisors, the trading terminal must be turned on from the market opening on Sunday evening until its closing on Friday evening. If you do not have the opportunity to keep the computer running 24/5, then it is recommended to use a VPS server service.
Forum Topic
Respectfully, Alexey aka Merlin TradeLikeaPro.ru
Today we will examine the principles of trading using averaging (martingale): the basic concepts and little-known facts, historical roots and modern methods, as well as why it is theoretically possible and how it is practically profitable to trade using the averaging method after a loss.
