Appearance

Personalize your experience

Mode
Accent Color
Direction
Logarithmic Decay

Logarithmic Decay

Anti-Martingale

Very slow, shallow taper.

At a glance

Engine value
anti_marti_logarithmic
Size at level i
size(i) = base / (1 + ln(i+1))
Family
— Size shrinks deeper into — capital protection first.
Risk band
Low risk
Capital profile
total ≈ base × n/(1 + ln n).
Best for
Very mild trends; near- de-risking.
Orders per level
One entry order and one take-profit per level.
Ladder cost @ 10 levels
3.80× base lot
Versus a flat ladder
0.38× the capital
Deepest rung
0.29× base (0.50× the first rung)
Entry orders resting
10 at 10 levels
Break-even bounce
5.67% from the deepest fill (flat ladder: 5.00%)

What this curve is for

The shallowest taper available: size is divided by 1 + ln(i + 1), so exposure declines only marginally with depth. It is a nearly — a slight bias toward protection layered on top of what is essentially flat .

How the sizing rule works

The divisor grows logarithmically, so even at level twenty the size is a meaningful fraction of base. More of the configured ladder above the minimum lot than in any other decay .

LevelPer-order sizeOrdersLevel totalCumulativeEntry priceTake-profit
L10.59×10.59×0.59×99.0099.99
L20.48×10.48×1.07×98.0098.98
L30.42×10.42×1.49×97.0097.97
L40.38×10.38×1.87×96.0096.96
L50.36×10.36×2.23×95.0095.95
L60.34×10.34×2.57×94.0094.94
L70.32×10.32×2.89×93.0093.93
L80.31×10.31×3.20×92.0092.92
L90.30×10.30×3.51×91.0091.91
L100.29×10.29×3.80×90.0090.90
Reference configuration: 10 levels, 1% apart, 1% target, base price 100, long. Sizes are in base-lot units.

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 .

base lot 100 USDT · long · no stop

Ladder shape — Logarithmic Decay

LONG · base 100.00 (illustrative) · 10 levels stepping down · 1% apart

Base positionEntry rung (buy)Init target
Opening position & init targets200 USDT
T2
target 2 sell @ 102.00
+2 USDT
T1
target 1 sell @ 101.00
+1 USDT
L0
Market buy · 2 lots @ 100.00
200 USDT

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

Entry ladder: one row per rung, showing entry and exit price, size, order count, notional, margin, running capital and profit at exit.
LevelSize curveEntry buyUSDTExit sellUSDTFrom base%Sizebase lotsOrdersNotionalUSDTMarginUSDTCum. capitalUSDTProfit at exitUSDT
L1100%99.0099.991.00%0.591×159.0659.062590.59
L281%98.0098.982.00%0.477×147.6547.653070.48
L371%97.0097.973.00%0.419×141.9141.913490.42
L465%96.0096.964.00%0.383×138.3238.323870.38
L561%95.0095.955.00%0.358×135.8235.824230.36
L657%94.0094.946.00%0.339×133.9533.954570.34
L755%93.0093.937.00%0.325×132.4732.474890.32
L853%92.0092.928.00%0.313×131.2831.285200.31
L951%91.0091.919.00%0.303×130.2830.285510.3
L1050%90.0090.9010.00%0.294×129.4329.435800.29
Levels 1–10 of 10
1 / 1
Ladder cost 3.80×Capital 580 USDTAvg entry 96.79Cycle profit 6.8
Loading the chart engine…

What depth costs

Slightly below a flat ladder at the same depth — close enough that flat-ladder capital planning applies with a discount.

LevelsLadder costDeepest rungEntry ordersCost vs 5 levelsCoverage
5 levels2.23×0.36×51.00×5%
10 levels3.80×0.29×101.71×10%
20 levels6.45×0.25×202.89×20%
40 levels11.0×0.21×404.92×40%
Ladder cost is Σ of every rung in base-lot units, excluding the opening L0 batch. At a grid size of 100 USDT, the 10-level ladder commits 380 USDT of notional at 1× leverage.

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 budgetLevels affordableAdverse move covered
10× base35 levels35.0%
25× base114 levels114.0%
50× base200 levels200.0%
100× base200 levels200.0%
250× base200 levels200.0%
How far price can move against the grid before it runs out of rungs, per capital budget, at 1% spacing. This is the question a funding decision actually turns on.

Averaging and recovery

With every rung , the volume-weighted average entry is 95.11 against a base of 100 and a deepest rung of 90.00 — so the average sits 49% of the way down the covered range. Getting back to flat from the bottom therefore needs a 5.67% , against 5.00% for a flat ladder of the same depth — 0.67% more work.

ExcursionLevels filledDeployedAverage entryMarkUnrealisedBounce to flat
Shallow dipL1–L31.49×98.1297.00-0.02×1.15%
Half the ladder fillsL1–L52.23×97.2595.00-0.05×2.37%
Full ladderL1–L103.80×95.1190.00-0.20×5.67%
Reference configuration: 10 levels, 1% apart, 1% target, base price 100, long. Sizes are in base-lot units. Deterministic arithmetic, not a simulation: no assumption is made about how price reached each depth.

The shallowest taper available: the denominator grows only logarithmically, so deep rungs keep meaningful size. Effectively a near- .

Where the exposure sits

Held by the shallowest quarter
39.1% of total size
Held by the deepest quarter
23.9% of total size
Unrealised loss at full fill
0.20× base (5.3% of deployed capital)
Profit if every rung books its target
0.04× base
One shallow cycle, against reserved capital
15.5 bps

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 3.80× base to collect 15.5 bps of it when the first rung completes.

Which market pays this curve

Very mild trends, and situations where you want to claim a de-risking policy without materially reducing .

Divides by a slowly growing log term, so size decreases only gradually — the least , keeping meaningful size deep in the ladder. Floored at 1 lot.

The shape of the risk

- risk with a marginal reduction at depth. The hazard is expectation: this is not meaningful de-risking.

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

Logarithmic Decay · 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.

ModeLadder costDeepest rungBreak-even bounceEntry ordersShallow cycle
Logarithmic Decay (this mode)3.80×0.29×5.67%1015.5 bps
Fixed10.0×1.00×5.00%1010.0 bps
Square-Root Decay4.32×0.30×5.85%1016.4 bps
Exponential Decay1.00×0.00×8.90%1050.0 bps
Linear Martingale55.0×10.0×2.38%551.8 bps
Reference configuration: 10 levels, 1% apart, 1% target, base price 100, long. Sizes are in base-lot units. Peers are chosen from this mode's own direction plus the flat baseline, so the comparison is meaningful rather than decorative.

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

  • Very mild trends.
  • You want a slight protective bias without giving up depth .

When to avoid it

  • You need genuine de-risking — this barely decays.
  • You are trying to bound the ladder cost tightly; use instead.

Tuning

  • If the is protection, step up to . If the point is , use and keep the simpler model.

Running it in production

  • Watch how quickly executed size hits the one-lot — beyond that extra levels add coverage but almost no averaging.
  • Track realised cycles per day. Decay curves earn from frequency, so a falling cycle count is the signal that the market has left the .
  • Check the gap between average entry and . Decay curves keep it wide by design, so recovery expectations must be set from it, not from hope.

How it fails

  1. 1
    Protection theatre
    The satisfies a de-risking requirement on while behaving as flat in practice. it against before relying on it.

Claims worth correcting

“It is a decay , so the tail is bounded.”

The tail is only marginally lighter than flat. Bounding requires geometric or , or a stop.

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

  1. 1
    When is this the right answer?
    When you want flat- behaviour and a documented, monotonically decreasing size rule. Those are the only two properties it reliably delivers.

Where these numbers come from

  • Sizes and capital: levelMultiplier / gridModeCurve in lib/grid/gridModes.ts, from grid_modes.hpp and 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 / runBacktestSweep over 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.
!
Caution:A backtest is evidence about one , not a . Fees are charged at the rate you set; slippage, funding, , margin rejection and are not modelled. For a growth especially, a profitable window mostly tells you the window did not contain the trend that would have tested it.

Related

  • 1.Grid Modes — Overview — The full taxonomy and how to choose
  • 2.Anti-Martingale family — What every curve in this family has in common
  • 3.Capital Allocation — Sizing an account to a Logarithmic Decay 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

  • Anti-Martingale

    Automation / Grid Modes / Anti-Martingale

    Anti-Martingale explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Anti-Martingale reference.

  • Exponential Decay

    Automation / Grid Modes / Anti-Martingale

    Exponential Decay explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Anti-Martingale reference.

  • Geometric Decay

    Automation / Grid Modes / Anti-Martingale

    Geometric Decay explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Anti-Martingale reference.

  • Half-Slope Inverse

    Automation / Grid Modes / Anti-Martingale

    Half-Slope Inverse explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Anti-Martingale reference.

  • Inverse Fibonacci

    Automation / Grid Modes / Anti-Martingale

    Inverse Fibonacci explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Anti-Martingale reference.

  • Linear Subtractive

    Automation / Grid Modes / Anti-Martingale

    Linear Subtractive explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Anti-Martingale reference.

  • Square-Root Decay

    Automation / Grid Modes / Anti-Martingale

    Square-Root Decay explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Anti-Martingale reference.

  • Anti-Martingale family

    Automation / Grid Modes / Families

    Size shrinks as the ladder deepens. Capital protection first, recovery second.

  • Harmonic

    Automation / Grid Modes / Harmonic

    Harmonic explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Harmonic reference.

Browse all knowledge base articles →