What the martingale trading strategy changes
Martingale changes position sizing, not the entry signal or the chance of winning. In the closed-trade version used here, a loss multiplies the next stake and a win resets it to the initial stake. Averaging down an open position is a different process: its unrealized loss, combined exposure and margin must be tracked together. This calculator does not model that process.
Let b be the initial stake, m the multiplier, and n the number of losses already incurred. The next stake is b × mⁿ. Losses already paid total b × (mⁿ − 1) / (m − 1). At m = 2 and a 1:1 payoff, a subsequent win earns b before costs. At m = 1.5, three losses on $10, $15 and $22.50 total $47.50; the next $33.75 win still leaves a $13.75 loss before costs.
A finite-bankroll and cost stress test
Assume $1,000 cash, a $10 first stake, doubling after each loss, a reset after a win and a 1:1 gross payoff. For this separate worksheet, charge 1% of each stake per completed trade, whether it wins or loses. This hypothetical cost is measured against the amount at risk, not market notional, and is not a broker fee quote. The calculator above excludes this cost.
| Round | Stake | Cumulative loss + cost if all lose | Cash remaining if all lose | Net cycle P/L if this round wins |
|---|---|---|---|---|
| 1 | $10 | $10.10 | $989.90 | +$9.90 |
| 2 | $20 | $30.30 | $969.70 | +$9.70 |
| 3 | $40 | $70.70 | $929.30 | +$9.30 |
| 4 | $80 | $151.50 | $848.50 | +$8.50 |
| 5 | $160 | $313.10 | $686.90 | +$6.90 |
| 6 | $320 | $636.30 | $363.70 | +$3.70 |
| 7 (unfunded) | $640 | $1,282.70 | Not affordable | −$2.70 |
Through round k, total stakes equal $10 × (2ᵏ − 1). An all-loss path costs 1.01 times that sum. A win on round k instead gives net cycle profit $10 − 0.01 × $10 × (2ᵏ − 1). After six losses, $363.70 remains, but the next $640 stake plus its $6.40 cost cannot be funded. The account has not reached zero; the progression has stopped.
A hypothetical $250 maximum stake stops the sequence sooner: after five losses, the required $320 exceeds that limit despite $686.90 remaining. Do not silently reduce the stake and keep claiming full recovery. A $250 win after those five losses earns $250 − $310 − $5.60 = −$65.60 for the cycle. Raising leverage does not remove the loss; it introduces margin and liquidation constraints.
Martingale versus anti-martingale on the same trades
For a reproducible comparison, start each rule at $10, use a $40 stake cap, reset after the opposite outcome, and ignore costs. Classic martingale doubles after losses; this anti-martingale strategy doubles after wins and resets to $10 after a loss. A fixed $10 stake is the baseline. These are defined examples, not claims about every variation.
| Outcome order | Martingale stakes / net | Anti-martingale stakes / net | Fixed stake / net |
|---|---|---|---|
| L, L, W | $10, $20, $40 / +$10 | $10, $10, $10 / −$10 | $10 each / −$10 |
| W, W, L | $10, $10, $10 / +$10 | $10, $20, $40 / −$10 | $10 each / +$10 |
| W, W, W | $10, $10, $10 / +$30 | $10, $20, $40 / +$70 | $10 each / +$30 |
Anti-martingale limits escalation during losing streaks but can give back a run of gains on the larger next loss. Neither sizing rule creates an edge: for an independent even-money trade with win probability p and stake s, expected profit before costs is s × (2p − 1). At p = 50%, that expectation is zero; the worksheet cost makes it −0.01s. Different paths can still produce very different drawdowns.
Read the simulation without confusing streaks and ruin
The calculator assumes independent trials, a constant chosen win probability, a 1:1 payoff, zero fees and a reset after every win. Schedule Length sets the number of displayed stakes and a simulation horizon of 20 times that number. It does not impose a maximum losing streak. At the default length of 10, a path stops at 200 rounds, its profit target, zero cash, or inability to fund the next stake.
The funding stop rate counts zero cash and unaffordable next stakes. Paths that reach neither a target nor a funding stop before the horizon remain in the average. The displayed drawdown is the mean of each simulated path's maximum percentage drawdown, not the worst of all paths. The base-bet expected value applies only to the initial stake.
For p = 50%, six losses in one specified block have probability 0.5⁶ = 1.5625%; ten have probability 0.5¹⁰ = 0.09765625%. These numbers do not give the chance of a streak anywhere in 200 trades, nor lifetime ruin. Repeated opportunities and losses that cluster change the question. Increasing the trial count reduces sampling noise within this model; it does not validate the assumed win rate or independence.
Record the input values and displayed seed to reproduce a run. Reloading starts at seed 1; each Run Simulation click advances it by one. The ten plotted paths are the first ten trials for that seed. Changing an input refreshes the summary and clears the old chart.
Define the rules before a TradingView backtest
- Freeze an entry signal, exit rule and date range. A sizing rule alone does not define a trading strategy.
- Specify whether size increases after a closed loss or while a losing trade remains open. Set a hard stake cap, capital stop, maximum consecutive losses and reset rule explicitly.
- Set initial capital, commission, slippage and margin assumptions. TradingView's broker emulator models hypothetical fills; gaps and liquidity can make live losses exceed the intended risk.
- Compare the same signals with fixed stakes and anti-martingale. Inspect stopped sequences and drawdown alongside net profit, then test the frozen rules on a separate period that was not used for parameter selection.
Browse the TradingView strategy guides for rule definitions, or use the position size calculator to connect a cash-risk amount to an entry and stop distance.
Sources and boundaries
TradingView strategy properties documents initial capital, order size, commission, slippage and margin. The Pine Script strategies documentation explains the broker emulator, simulated orders and testing limitations. Sources checked October 17, 2026. The tables on this page are arithmetic scenarios under the stated assumptions, not observed trading results.
Educational analysis only, not investment advice. This page does not recommend doubling positions or promise recovery. Finite capital, changing payoffs, transaction costs, gaps and trading limits can stop a progression. The calculator does not model real execution or margin calls.