TradingView strategy guides

Martingale Trading Strategies: Losing Sequences and Capital Limits

A martingale trading strategy increases the next stake after a loss. Doubling can recover earlier losses at a 1:1 payoff before costs, but a finite account can run out of funding before that win occurs. Use this free calculator to inspect the stake schedule and sampled bankroll paths.

Martingale strategy calculator. No sign-up. Hypothetical outcomes, not a recommendation to increase risk after losses.

%

Classic Martingale = 2×

Schedule length (1 to 30). Simulation horizon is 20 times this value; this is not a stop after consecutive losses.

Risk Summary
Last Scheduled Bet$5,120
All-Loss Schedule Total$10,230
All-Loss Block Probability0.1%

Educational stake model, not a market backtest. Fees, slippage, margin liquidation and trade-size limits are excluded. The worked cost and limit table below tests those constraints separately.

Funding Stop Rate
15.9%
Simulated over 1,000 trials
Target Reached
84.1%
Target: +$100
Average Profit
$-8.94
Avg across all simulations
Max Drawdown
18.06%
Average peak-to-trough

Simulation Statistics

Avg Rounds to Target19
Avg Rounds to Stop16
Base-Bet EV+$0
All-Loss Block0.1%

Bet Escalation After Consecutive Losses

RoundBet SizeCumulativeProfit if Win
1$10$10+$10
2$20$30+$10
3$40$70+$10
4$80$150+$10
5$160$310+$10
6$320$630+$10
7$640$1,270+$10
8$1,280$2,550+$10
9$2,560$5,110+$10
10$5,120$10,230+$10
Seed: 1. The same inputs and seed reproduce the estimates. Run Simulation advances the seed and redraws the ten paths. Inputs refresh the summary and clear old paths. Outcomes are independent, wins pay 1:1, and costs are zero. A funding stop means the next stake cannot be funded, even if cash remains. The probability chart is (1 − p)^n for one specified block, not lifetime ruin probability.

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.

All preceding rounds lose. The last column assumes the current round wins instead. Round 7 is a counterfactual requiring more cash.
RoundStakeCumulative loss + cost if all loseCash remaining if all loseNet 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.70Not 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.

Three trades with a 1:1 payoff; W = win, L = loss
Outcome orderMartingale stakes / netAnti-martingale stakes / netFixed 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

  1. Freeze an entry signal, exit rule and date range. A sizing rule alone does not define a trading strategy.
  2. 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.
  3. 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.
  4. 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.

Frequently Asked Questions

Assumptions, stopping rules and what the calculator does not model.

    • Can a martingale trading strategy guarantee recovery?

      No. Doubling recovers earlier losses plus the base stake only when the next trade wins at a 1:1 payoff before costs and the full stake can be funded. Finite capital, position limits, fees and different payoffs break that calculation. A winning trade can still leave the cycle at a loss after costs.

    • How many losses can a $1,000 account fund at a $10 base stake?

      With doubling and no costs, the first six losing stakes total $630, leaving $370. The next $640 stake is unaffordable. This is a funding stop with cash remaining, not a zero account balance. A trade-size limit can stop the progression earlier.

    • Is the probability chart an account ruin forecast?

      No. It shows (1 − p)^n, the probability that every trade in one specified block of n independent trades loses. It does not count every possible streak over a longer history, model account capital, or predict lifetime ruin. The simulated funding stop rate is a separate result.

    • Does Schedule Length stop the model after that many losses?

      No. It controls the displayed schedule and sets the simulation horizon to 20 times that value. Simulations stop at the target, zero cash, an unaffordable next stake, or that horizon. A loss-count stop, costs and trading limits must be tested separately.

    • How does an anti-martingale strategy differ?

      Anti-martingale raises the stake after wins and reduces it after losses. The example here doubles after a win up to $40 and resets to $10 after a loss. It avoids escalating into a losing streak, but a loss at the larger size can erase preceding gains. It does not create a positive expected return.

    • Can I reproduce the calculator results?

      Yes. The same inputs and displayed seed produce the same pseudorandom trials. Reloading starts at seed 1; each Run Simulation click increments the seed. This makes the calculation reproducible, but the assumed probabilities and payoffs remain hypothetical.

Turn a defined sizing rule into a testable strategy

Give Pine Script AI Coding Agent the entry, exit, reset, stake cap and capital-stop rules. Review its generated strategy before testing. Use Strategy Optimizer to compare explicit parameter ranges, then validate the selected rules on a separate period. Parameter selection does not establish future profitability.

Strategy Optimizer compares TradingView backtest parameters. After exporting supported trade data, use Backtest Deep Report to examine available metrics such as drawdown and profit factor. These tools do not guarantee recovery or execute this calculator's hypothetical trades.