# What is Martingale and how effective is this system?

Wednesday, 20 December 2017 15:17Martingale is a rate management algorithm, which was developed back in the 18th century. Since then, and to this day, there has been a lot of debate about the effectiveness of this system. Some argue that Martingale inevitably leads to a loss of deposit, others successfully build trading strategies based on this algorithm. So, what exactly is Martingale and how this system is effective for trading in financial markets, we will consider further.

## Scope pf application of the Martingale system

The main scope of application of the Martingale system is gambling, roulette gaming, where the probability of winning is about 50/50. The system operates follows:

- The game starts with a small bet.
- If a player loses, he does not stop, but increases the bet twice.
- After each winning, he comes back to the original bet.

Given that a player cannot endlessly lose even after a long series of losses, he wins all his losses back, and eventually remains in a small plus. However, with a small deposit, the use of Martingale can lead to bankruptcy before losses begin to win back.

Roulette gaming can be compared to the opening of a short or long position in trading, when the Stop-loss and Take-profit levels are at the same distance from the price. Since the transaction opens in an arbitrary direction, the probability of winning is also 50/50.

### Mathematical foundation of the Martingale system’s efficiency

To mathematically display the Martingale system, let’s enter the following parameters:

- Series – the number of bets, the last of which is winning;
- Q – initial deposit;
- q — the amount of the first bet;
- k — maximum number of losing bets in the series before the player’s deposit is at zero.

Therefore, the minimum amount of deposit, which is necessary for the player not to lose all the money before starting winning, can be calculated, using the following formula:

Given that at any bet, the probability of losing is 50/50, the number of bets in the series must be a multiple of 2. If we denote this indicator by N, then the probability that the player will not go bankrupt in this amount of deals is P (N). Taking into account that the average length of the series is N / 2, and the probability of winning is (1/2) ^ k-1, we derive the following formula:

To protect yourself from bankruptcy, it is not enough to know the total number of transactions, you need to relate them to the prospective winnings. Suppose a player wants to double his capital. Given that the amount of the possible profit is q = Q / (2 ^ k-1), the total amount of the winnings can be calculated using the compound interest rule:

After the mathematical transformation, we get the following formula for determining the required number of bets:

As a result, if we substitute Formula 2 in Formula 1 and convert it using the simplest properties of the logarithms, it turns out that P (N) is equal to ½ and does not depend on the value of k. That is, the probability of winning is still reduced to 50/50. With the same success, you can place one bet on the entire amount of the deposit (Q).

Therefore, the Martingale system does not give any advantages, and that is why its use is meaningless.

### How the trading advisor works based on Martingale

To create an advisor, which would entirely trade following the roulette gaming rules, is impossible. The fact is that the Forex bet must necessarily be a multiple of one tenth lot, and in the case of gambling, the amount of the bet is calculated by the formula:

However, if equate the value of q to 0.1 lot, you can write an advisor whose principle of operation will be as close as possible to Martingale. The algorithm of the robot is similar: loss - the bet doubles; winning - returns to the original amount. Open the order in an arbitrary direction and set the Stop-loss and Take-profit at the same distance from the price.

The obtained adviser, created on the basis of the Martingale system, shows results similar to those that were obtained as a result of mathematical calculations. As shown in the figure above, there are quite strong failures during the trade of the advisor. As a result, the robot leaves the game, because the remaining amount on the balance of the account is less than the one that is needed to double the bet. Thus, the advisor, created on the basis of Martingale, did not let go in the red, but also did not yield profit, which once again proves the uselessness of this system for trading.

Share

#### Related articles

- Previous article: Trading robots can crash the bitcoin price
- Next article: How to install OpenCL for MetaTrader 5