# The Martingale function description

The Martingale method was invented a long time ago. It was originally used in roulette to multiply the previous bet. Only many years later, traders realized that this technique can be effectively used for profitable trading in the financial markets. Initially, Martingale method was quite primitive. It consisted in the fact that each previous bet was doubled. It is a fairly aggressive version of Martingale, but somebody apply it now. But a more common version is using Martingale with different increase coefficients. This is especially common in trading robots.

**Let us consider the creating a trading bot with Martingale factor of 1.3 from our bot.**

Trading pair is USDT/BNB.

The value of the first order is 30 USDT.

A downside for placing a safety order (% of the initial order value) is 1%

The Martingale Coefficient is 1.3

Please note that when you activate Martingale, the option to place the volume of the Safety order is lost. In this case, each SO will calculate, based on the parameters of the martingale coefficient and the value of the initial order. In our version, the coefficient is set to the level 1.3. It means that each subsequent order following the initial order will be multiplied by 1.3 and increase in value.

Number of insurance orders per trade are 10

Just move the slider and select the desired rate:

**Example of calculating the cost of a Take Profit sales order:**

Primary date: 1 MNT = $50

The main advantage of Martingale is that it allows you to shift the Take Profit slightly lower when each subsequent order is triggered than when orders with a static value are triggered.

Martingale strategy works very well in a growing market, when trading pairs make small pullbacks from the main trend and return back. It also works very well in a flat when the price is in a narrow price range. It shows itself well during the market reduction, but the market should walk in waves and make strong pullbacks.

Martingale strategy can quickly withdraw from the drawdown with minor price pullbacks. If you get to the long-term trend without pullbacks you can spend the entire deposit or achieve the maximum of SO. It is necessary to be extremely careful using this method and the aggressive settings over 1.3 only if it’s necessary.

The screenshot below is an example of the bot operation without Martingale and with Martingale 1.5.

As we can see, we need 3.5% growth before the trade closing when 5 orders are triggered without martingale.

In the case of martingale, we need 1.5 % growth before closing the trade but we save 2.5 times more coins.