Appearance
Personalize your experience
Half-Slope Linear
MartingaleHalf-speed arithmetic martingale.
At a glance
marti_grid_halfsize(i) = base · (1 + 0.5·i)What this curve is for
Linear growth at half slope: 1.5×, 2×, 2.5× and so on. It exists because full is often exactly twice as expensive as an operator wants, and the slope is tunable, which makes this the simplest way to express "linear, but less".
How the sizing rule works
Size at level i is 1 + m·i with m defaulting to 0.5, so the is a straight line with an adjustable gradient. Unlike it is single-order: one entry and one take-profit per level.
| Level | Per-order size | Orders | Level total | Cumulative | Entry price | Take-profit |
|---|---|---|---|---|---|---|
| L1 | 1.50× | 1 | 1.50× | 1.50× | 99.00 | 99.99 |
| L2 | 2.00× | 1 | 2.00× | 3.50× | 98.00 | 98.98 |
| L3 | 2.50× | 1 | 2.50× | 6.00× | 97.00 | 97.97 |
| L4 | 3.00× | 1 | 3.00× | 9.00× | 96.00 | 96.96 |
| L5 | 3.50× | 1 | 3.50× | 12.5× | 95.00 | 95.95 |
| L6 | 4.00× | 1 | 4.00× | 16.5× | 94.00 | 94.94 |
| L7 | 4.50× | 1 | 4.50× | 21.0× | 93.00 | 93.93 |
| L8 | 5.00× | 1 | 5.00× | 26.0× | 92.00 | 92.92 |
| L9 | 5.50× | 1 | 5.50× | 31.5× | 91.00 | 91.91 |
| L10 | 6.00× | 1 | 6.00× | 37.5× | 90.00 | 90.90 |
The ladder, as the engine builds it
Below is the 's own ladder and the trading terminal's chart engine, both driven by buildLadderPlan for this . Change the level count, spread or target and the rung prices, sizes, and chart lines recompute exactly as they would in the .
Ladder shape — Half-Slope Linear
LONG · base 100.00 (illustrative) · 10 levels stepping down · 1% apart
Targets are stacked above the opening buy because a long grid exits higher than it enters.
Entry ladder
Limit buys below the base · L1 nearest, L10 deepest · every amount in USDT
| Level | Size curve | Entry buyUSDT | Exit sellUSDT | From base% | Sizebase lots | Orders | NotionalUSDT | MarginUSDT | Cum. capitalUSDT | Profit at exitUSDT |
|---|---|---|---|---|---|---|---|---|---|---|
| L1 | 25% | 99.00 | 99.99 | 1.00% | 1.50× | 1 | 150 | 150 | 350 | 1.5 |
| L2 | 33% | 98.00 | 98.98 | 2.00% | 2.00× | 1 | 200 | 200 | 550 | 2 |
| L3 | 42% | 97.00 | 97.97 | 3.00% | 2.50× | 1 | 250 | 250 | 800 | 2.5 |
| L4 | 50% | 96.00 | 96.96 | 4.00% | 3.00× | 1 | 300 | 300 | 1,100 | 3 |
| L5 | 58% | 95.00 | 95.95 | 5.00% | 3.50× | 1 | 350 | 350 | 1,450 | 3.5 |
| L6 | 67% | 94.00 | 94.94 | 6.00% | 4.00× | 1 | 400 | 400 | 1,850 | 4 |
| L7 | 75% | 93.00 | 93.93 | 7.00% | 4.50× | 1 | 450 | 450 | 2,300 | 4.5 |
| L8 | 83% | 92.00 | 92.92 | 8.00% | 5.00× | 1 | 500 | 500 | 2,800 | 5 |
| L9 | 92% | 91.00 | 91.91 | 9.00% | 5.50× | 1 | 550 | 550 | 3,350 | 5.5 |
| L10 | 100% | 90.00 | 90.90 | 10.00% | 6.00× | 1 | 600 | 600 | 3,950 | 6 |
What depth costs
Linear with a gentler gradient — roughly half the ladder cost of full at the same depth, and exactly predictable because there is no curvature to model.
| Levels | Ladder cost | Deepest rung | Entry orders | Cost vs 5 levels | Coverage |
|---|---|---|---|---|---|
| 5 levels | 12.5× | 3.50× | 5 | 1.00× | 5% |
| 10 levels | 37.5× | 6.00× | 10 | 3.00× | 10% |
| 20 levels | 125× | 11.0× | 20 | 10.0× | 20% |
| 40 levels | 450× | 21.0× | 40 | 36.0× | 40% |
Read the cost vs 5 levels column as the escalation test. A flat ladder doubles when the depth doubles; anything materially above that is a whose coverage has to be bought rather than simply configured.
| Capital budget | Levels affordable | Adverse move covered |
|---|---|---|
| 10× base | 4 levels | 4.0% |
| 25× base | 7 levels | 7.0% |
| 50× base | 11 levels | 11.0% |
| 100× base | 17 levels | 17.0% |
| 250× base | 29 levels | 29.0% |
Averaging and recovery
With every rung , the volume-weighted average entry is 93.40 against a base of 100 and a deepest rung of 90.00 — so the average sits 66% of the way down the covered range. Getting back to flat from the bottom therefore needs a 3.78% , against 5.00% for a flat ladder of the same depth — 1.22% less work.
| Excursion | Levels filled | Deployed | Average entry | Mark | Unrealised | Bounce to flat |
|---|---|---|---|---|---|---|
| Shallow dip | L1–L3 | 6.00× | 97.83 | 97.00 | -0.05× | 0.86% |
| Half the ladder fills | L1–L5 | 12.5× | 96.60 | 95.00 | -0.20× | 1.68% |
| Full ladder | L1–L10 | 37.5× | 93.40 | 90.00 | -1.34× | 3.78% |
Linear growth at half slope: 1.5×, 2×, 2.5×… Predictable and gently rising, roughly half the capital of full .
Where the exposure sits
The last row is the metric that separates modes. Profit for a full cycle is the target of deployed capital in every , so it cannot discriminate. What differs is how much capital has to sit reserved to earn one shallow cycle: this mode 37.5× base to collect 4.0 bps of it when the first rung completes.
Which market pays this curve
Moderate mean-reversion where 's is but its capital is not.
Linear growth at half the slope: 1.5×, 2×, 2.5×… A middle ground between additive and full linear, giving moderate averaging with predictable, gently rising capital.
The shape of the risk
Linear in depth, so the tail is heavy but not convex. The absence of multi-order behaviour also means fewer moving parts than , and no order-slot pressure.
Run it over real history
This is the product's grid backtester, not a summary of one. It fetches public candles for the you pick, rebuilds the ladder on the first candle of the , then applies the engine's own fill, take-profit, and stop-loss rules bar by bar. The caveat block inside the is part of the output — read it before trusting a number.
Instrument
BTCUSD
delta-india
Half-Slope Linear · 10 levels @ 1% · target 1% · 100 USDT / level · 1× · long · no stop
What this does not model
- Exact intrabar ticks. Bullish/doji candles use open → low → high → close; bearish candles use open → high → low → close. Finer timeframes reduce sensitivity to this deterministic assumption.
- Queue position. Limit orders are assumed filled when touched, which flatters a maker grid in fast markets.
- Margin rejection and liquidation. Deep rungs fill here even if the account could not fund them — check the capital requirement.
- Slippage and funding. Only the fee you set above is charged; funding, borrow and slippage are absent.
Run the ladder over real history
The grid is rebuilt anchored on the first candle of the window, then the engine's own fill, exit, refill and stop-loss rules are applied bar by bar. You get the real fill sequence for this configuration on this instrument.
Measured against other modes
First the arithmetic, then the market. The below is computed from the size curves alone; the underneath replays every one of those ladders over the same real candle , with grid_mode as the only variable.
| Mode | Ladder cost | Deepest rung | Break-even bounce | Entry orders | Shallow cycle |
|---|---|---|---|---|---|
| Half-Slope Linear (this mode) | 37.5× | 6.00× | 3.78% | 10 | 4.0 bps |
| Fixed | 10.0× | 1.00× | 5.00% | 10 | 10.0 bps |
| Capped Linear | 40.0× | 5.00× | 4.03% | 10 | 2.5 bps |
| Linear Martingale | 55.0× | 10.0× | 2.38% | 55 | 1.8 bps |
| Exponential Martingale | 2046× | 1024× | 1.10% | 10 | 0.1 bps |
Nothing is precomputed here. Press run and the backtester fetches one candle window and replays 5 ladders across it — identical settings, identical bars, grid_mode as the only difference.
When to use it
- Moderate mean-reversion where you want linear behaviour at a lower cost.
- You want a single-order ladder — no multi-order or order-slot pressure.
- You need the capital number to be trivially predictable while still growing.
When to avoid it
- You need the partial-exit granularity of .
- You want faster-than-linear recovery.
Tuning
- The slope m is the dial: m = 0.25 gives a very gentle ramp, m = 1 reproduces without its multi-order structure.
- Because cost is linear in m, halving the slope halves the ladder cost exactly — the easiest capital trade in the .
This is parametric. The and the settings show only the dial(s) it actually uses, and changing one is a structural — the resting ladder is cancelled and re-placed at the new sizes.
Running it in production
- Watch the deepest level, not the P&L. Depth is the leading indicator; P&L is the lagging one.
- peak committed against the account, weekly. A growth that has never been deep has never been tested.
- Treat every level increase as a capital : adding levels to a growth is not a linear cost.
How it fails
- 1Slope creepRaising m toward 1 doubles the ladder cost without changing the name. Record m in the .
- 2Trend absorptionLinear growth in a trend still puts the largest orders at the worst prices. The stop remains the only bound.
Claims worth correcting
“Half-slope is the same as with a smaller .”
Not quite: shrinking scales the whole ladder including level 1, while lowering the slope only flattens the growth. The shallow rungs keep their weight.
Interaction with the rest of the configuration
- Spread sets how fast the ladder consumes depth. Widening it buys coverage for the same level count at the cost of fewer .
- Target sets what each cycle books. Below -trip fees plus slippage, a grid is a fee generator regardless of the .
- The is the only bound on the tail. Without it, the 's worst case is whatever the market does, not what you planned.
Questions this mode raises
- 1Why is this not multi-order like linear martingale?Because the multi-order behaviour is a property of the `marti_grid`/`marti_grid_linear` values specifically. Half-slope places one order per level, which is usually what operators want when they are trying to reduce as well as cost.
Where these numbers come from
- Sizes and capital:
levelMultiplier/gridModeCurveinlib/grid/gridModes.ts, fromgrid_modes.hppand the Python engine's lot calculator. - Rung and exit prices, , init targets and the stop line:
buildLadderPlan— the same builder the and use. - Backtest , cycles and P&L:
runBacktest/runBacktestSweepover public broker candles, applying the engine's fill, exit, and stop rules. - Price charts: the trading terminal's chart engine, with the ladder drawn through its own price-line API.
Related
- 1.Grid Modes — Overview — The full taxonomy and how to choose
- 2.Martingale family — What every curve in this family has in common
- 3.Capital Allocation — Sizing an account to a Half-Slope Linear ladder
- 4.Stop Loss — Bounding this curve's tail
- 5.Reading the Ladder Plan — Verifying the curve before deploying
- 6.Grid Structure — Levels, init batch and base size
Related articles
Related to Half-Slope Linear
- Additive Martingale
Automation / Grid Modes / Martingale
Additive Martingale explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Martingale reference.
- Square-Root Martingale
Automation / Grid Modes / Martingale
Square-Root Martingale explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Martingale reference.
- Staircase Martingale
Automation / Grid Modes / Martingale
Staircase Martingale explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Martingale reference.
- Exponential Martingale
Automation / Grid Modes / Martingale
Exponential Martingale explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Martingale reference.
- Fibonacci Martingale
Automation / Grid Modes / Martingale
Fibonacci Martingale explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Martingale reference.
- Geometric Martingale
Automation / Grid Modes / Martingale
Geometric Martingale explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Martingale reference.
- Linear Martingale
Automation / Grid Modes / Martingale
Linear Martingale explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Martingale reference.
- Logarithmic Martingale
Automation / Grid Modes / Martingale
Logarithmic Martingale explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Martingale reference.
- Martingale (default)
Automation / Grid Modes / Martingale
Martingale (default) explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Martingale reference.