Appearance
Personalize your experience
Harmonic
HarmonicHarmonic series — classic 1/n decay.
At a glance
harmonicsize(i) = base / (i+1)anti_marti_gridanti_marti_grid. The engine computes identical sizes for both; the separate entry exists so and mandates can label the in their own vocabulary.What this curve is for
The 1/n taper, presented under its mathematical name. Identical in behaviour to `anti_marti_grid`; the separate exists so a desk that thinks in harmonic series and one that thinks in can both find and group the same .
How the sizing rule works
Size at level i is 1/(i+1) — the harmonic sequence. Cost grows with the harmonic series, which diverges in theory but so slowly that at any practical depth the ladder remains .
| Level | Per-order size | Orders | Level total | Cumulative | Entry price | Take-profit |
|---|---|---|---|---|---|---|
| L1 | 0.50× | 1 | 0.50× | 0.50× | 99.00 | 99.99 |
| L2 | 0.33× | 1 | 0.33× | 0.83× | 98.00 | 98.98 |
| L3 | 0.25× | 1 | 0.25× | 1.08× | 97.00 | 97.97 |
| L4 | 0.20× | 1 | 0.20× | 1.28× | 96.00 | 96.96 |
| L5 | 0.17× | 1 | 0.17× | 1.45× | 95.00 | 95.95 |
| L6 | 0.14× | 1 | 0.14× | 1.59× | 94.00 | 94.94 |
| L7 | 0.13× | 1 | 0.13× | 1.72× | 93.00 | 93.93 |
| L8 | 0.11× | 1 | 0.11× | 1.83× | 92.00 | 92.92 |
| L9 | 0.10× | 1 | 0.10× | 1.93× | 91.00 | 91.91 |
| L10 | 0.09× | 1 | 0.09× | 2.02× | 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 — Harmonic
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 | 100% | 99.00 | 99.99 | 1.00% | 0.500× | 1 | 50 | 50 | 250 | 0.5 |
| L2 | 67% | 98.00 | 98.98 | 2.00% | 0.333× | 1 | 33.33 | 33.33 | 283 | 0.33 |
| L3 | 50% | 97.00 | 97.97 | 3.00% | 0.250× | 1 | 25 | 25 | 308 | 0.25 |
| L4 | 40% | 96.00 | 96.96 | 4.00% | 0.200× | 1 | 20 | 20 | 328 | 0.2 |
| L5 | 33% | 95.00 | 95.95 | 5.00% | 0.167× | 1 | 16.67 | 16.67 | 345 | 0.17 |
| L6 | 29% | 94.00 | 94.94 | 6.00% | 0.143× | 1 | 14.29 | 14.29 | 359 | 0.14 |
| L7 | 25% | 93.00 | 93.93 | 7.00% | 0.125× | 1 | 12.5 | 12.5 | 372 | 0.13 |
| L8 | 22% | 92.00 | 92.92 | 8.00% | 0.111× | 1 | 11.11 | 11.11 | 383 | 0.11 |
| L9 | 20% | 91.00 | 91.91 | 9.00% | 0.100× | 1 | 10 | 10 | 393 | 0.1 |
| L10 | 18% | 90.00 | 90.90 | 10.00% | 0.091× | 1 | 9.09 | 9.09 | 402 | 0.09 |
What depth costs
Grows with the harmonic series: roughly in depth, which is why hundred-level ladders remain affordable.
| Levels | Ladder cost | Deepest rung | Entry orders | Cost vs 5 levels | Coverage |
|---|---|---|---|---|---|
| 5 levels | 1.45× | 0.17× | 5 | 1.00× | 5% |
| 10 levels | 2.02× | 0.09× | 10 | 1.39× | 10% |
| 20 levels | 2.65× | 0.05× | 20 | 1.82× | 20% |
| 40 levels | 3.30× | 0.02× | 40 | 2.28× | 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 | 200 levels | 200.0% |
| 25× base | 200 levels | 200.0% |
| 50× base | 200 levels | 200.0% |
| 100× base | 200 levels | 200.0% |
| 250× base | 200 levels | 200.0% |
Averaging and recovery
With every rung , the volume-weighted average entry is 96.05 against a base of 100 and a deepest rung of 90.00 — so the average sits 40% of the way down the covered range. Getting back to flat from the bottom therefore needs a 6.72% , against 5.00% for a flat ladder of the same depth — 1.72% more work.
| Excursion | Levels filled | Deployed | Average entry | Mark | Unrealised | Bounce to flat |
|---|---|---|---|---|---|---|
| Shallow dip | L1–L3 | 1.08× | 98.23 | 97.00 | -0.01× | 1.27% |
| Half the ladder fills | L1–L5 | 1.45× | 97.55 | 95.00 | -0.04× | 2.69% |
| Full ladder | L1–L10 | 2.02× | 96.05 | 90.00 | -0.13× | 6.72% |
Size shrinks with depth, so the deepest rungs barely move the average entry. Sitting through a sustained adverse move is cheap, and the total ladder cost is bounded no matter how many levels you add. The cost of that safety is recovery speed: there is little size down low to average with, so a deep unwinds slowly. The engine floors executed size at one lot, so past a certain depth the is flat in practice even though the formula keeps decaying. The harmonic series diverges, but so slowly that in practice the ladder cost is modest at any realistic depth.
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 2.02× base to collect 24.8 bps of it when the first rung completes.
Which market pays this curve
Trending and markets, exactly as .
Sizes follow the harmonic series 1, 1/2, 1/3, 1/4… A mathematically clean, gentle taper equivalent to but grouped as its own family. Floored at 1 lot.
The shape of the risk
Recovery risk rather than capital risk, as with every decay .
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
Harmonic · 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 |
|---|---|---|---|---|---|
| Harmonic (this mode) | 2.02× | 0.09× | 6.72% | 10 | 24.8 bps |
| Fixed | 10.0× | 1.00× | 5.00% | 10 | 10.0 bps |
| Square-Root Decay | 4.32× | 0.30× | 5.85% | 10 | 16.4 bps |
| Exponential Decay | 1.00× | 0.00× | 8.90% | 10 | 50.0 bps |
| Linear Martingale | 55.0× | 10.0× | 2.38% | 55 | 1.8 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
- Steady, mathematically clean de-risking.
- You prefer the harmonic framing to the one for reporting.
When to avoid it
- Range trading where averaging down is the .
Tuning
- Read the article: the dials and cautions are identical.
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
- 1Naming divergenceTwo dashboards can show the same under two names. Standardise on one per desk to keep coherent.
Claims worth correcting
“Harmonic and differ in the tail.”
They are the same function. Any observed difference is a configuration difference, not a difference.
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
- 1Which name should I deploy under?Whichever your groups by. Behaviour is identical, so the only criterion is human legibility.
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.Harmonic family — What every curve in this family has in common
- 3.Capital Allocation — Sizing an account to a Harmonic 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 Harmonic
- 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.
- Harmonic family
Automation / Grid Modes / Families
The classic 1/n taper — a clean, gentle, academically tidy decay.
- 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.
- Fixed DCA
Automation / Grid Modes / DCA
Fixed DCA explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / DCA 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.
- Logarithmic Decay
Automation / Grid Modes / Anti-Martingale
Logarithmic Decay explained: how it works in QuaTick, settings and worked examples. Part of the Automation / Grid Modes / Anti-Martingale reference.