Anti-martingale: adding to a winner
A martingale adds to a position that is losing, so that a small bounce is enough to come out ahead. The anti-martingale does the opposite. It adds only to a position that is already winning, and it gets out as soon as the move gives back a set amount from its best point. Exposure grows only while the market is proving the trade right.
How a cycle runs
A9's anti-martingale trades spot, long only, on 15-minute bars by default.
- It buys a first order, an amount you choose.
- Each time a bar closes 0.61% above the last buy, it adds another order, 1.4 times the size of the one before. Up to four adds.
- It tracks the highest close since the cycle began. When a bar closes 1.02% below that peak, the cycle ends.
- A new cycle starts straight away. Rather than sell everything and buy the first order back, the bot sells down to the size of the next cycle's first order and keeps that, which saves one fee and one spread on each turn.
With the defaults the four adds cover a rise of about 2.5% from the first buy, and a fully built position is about 11 times the first order.
What the record looks like
The shape of the results follows from the rules. Three examples with the defaults, a first order of 10 USDT and a starting price of 100:
- The price ticks up to 100.5 and turns. No add has filled. The bot exits at about 99.48 holding only the first order: a loss of about 0.05 USDT, plus fees.
- The price climbs to 103. All four adds fill, at 100.61, 101.22, 101.84 and 102.46, for an average cost of about 101.62 on 109.46 USDT in all. The exit comes at about 101.95: a gain of roughly 0.33%, or 0.36 USDT before fees, and about 0.14 after them.
- The price runs to 110 before it stalls. The same position exits near 108.88, about 7% above its average: close to 7.8 USDT before fees.
Many cycles end like the first, some like the second, and a few like the third. The few pay for the many, when they come. A win rate well under half is normal for this strategy and says little on its own.
Where it struggles
- Chop. In a market that rises a little, falls a little and repeats, the bot buys the rise and sells the dip, again and again. Each cycle loses a small amount.
- Fees. The default step is 0.61%, and a round trip at the standard spot taker rate is 0.20%. A move that fills all four adds and exits early can hand a large share of its gain to the exchange. A lower fee tier helps this strategy more than most.
- Gaps between bars. The trail is checked on bar closes. If the price drops sharply within a 15-minute bar, the exit comes at that bar's close, which can be well below the 1.02% line.
- Tokenized stocks at the open. A stock token can reprice several percent in the first minutes of US trading, in either direction, which can skip straight past the trail.
Anti-martingale and martingale side by side
- The martingale adds on the way down and exits at a profit over its average. It wins often and its rare loss is large.
- The anti-martingale adds on the way up and exits on a trailing stop. It loses often and its rare win is large.
- The martingale's risk is a ladder stuck at the bottom of a long fall. The anti-martingale's risk is a slow bleed of small losses and fees in a market with no direction.
Neither is safer in general. They fail in opposite markets, which is why some people backtest both on the same symbol before choosing.
The settings
- First order: everything else scales from it. The launch panel shows the full commitment, about 11 times the first order with the defaults.
- Price step: how far above the last buy the next add waits. Larger steps add less often and need a stronger move.
- Trailing stop: how far below the peak close the cycle ends. Tighter stops exit sooner and are shaken out more often; looser ones give back more of a gain.
- Multiplier and number of adds: how quickly the position grows while it wins.
- Step widening: off by default here, because demanding a larger rise for each add blunts the pressing of a winner, which is the strategy's whole idea.
Reading a backtest of it
Look at how many trades it made and at the win rate together with the total return, and remember that the return is already net of fees. A handful of large wins can carry a good-looking result that a slightly different window would not repeat. Compare with buy and hold over the same window, and read the drawdown: a long run of small losses shows there.