A bet is by definition risky : you bet and you can lose your bet or win, and earn a profit proportional to the bet placed. We are talking about ONE bet here.

A martingale is a betting strategy upon several moves, taking each time into account the previous results. Matingales are a kind of staking plan.
The main goal is of course to increase its (chances of) gain. The ultimate goal is to win every time.

The martingale betting system is one of the most controversial staking plans a bettor can follow. You have to be careful, even suspicious, about the martingales you can find: not all of them work.

Example of an ineffective martingale

To win the lottery, some say that it is wise to play numbers that have not come up much recently: as the probability of each number coming up is the same, numbers that have not come up very often "will have to catch up" and therefore in the days to come their expected probability will therefore be greater.
This reasoning is erroneous and false. We can adapt it to a simpler case: heads or tails, with a balanced coin and the following martingale: I systematically wait until three successive Tails draws have taken place, after which I bet on Heads. (Of course I can change these three draws, by 10, or 100, draws). Since Heads and Tails have the same probability, they must come up on average equally often, and so after a certain number of consecutive heads tossed, the toss of heads becomes more likely. This reasoning is false, and this martingale (the game strategy) absolutely does not change the mathematical expectation: on average my gain will be zero.

Classic (or doubling) martingale

Actually, previous example is quite general: in a game of chance, using a martingale does not change the probabilities and the mathematical expectation.
You have to adapt the bets for this.

The classical martingale (or doubling martingale) is a betting strategy for a game where you bet and, if you win, you double your bet (odds = 2), and you totally lose your stake when you lose.
I bet at the very beginning for example 1 euro, then at each game:

This yields: As soon as I win, my net profit is 1 euro, and since, if the game is not rigged, I will inevitably end up winning at some point, this gain is assured. In other words, with this strategy, I definitely win 1 euro.
Unfortunately, this strategy is a dangerous one because my total bet increases very quickly (after 10 bets for example, I will have invest total bets of more than 1000 euros...), and if I stop before having postponed my euro of net profit, I ultimately simply lost all my investment.
Full mathematical details can be found for example on this page and where we see (after complicated mathematical calculations of probabilities) that the sum to invest to respect our martingale and finally win can not only quickly become astronomical, but also that the probability of this happening is not so low.

Building a winning martingale

We must be clear, a martingale, like any bet, any strategy, involving chance remains risky !
However, the classic martingale can be adapted to make it effective.
Two parameters make the classic martingale particularly risky: In order not to increase too much the total stake invested in the successive rounds of a martingale, it is therefore necessary to focus on these two parameters.
Here are several possibilities as examples: