> For the complete documentation index, see [llms.txt](https://doc.lockerprotocol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.lockerprotocol.com/hyper-agentic-trader/how-it-trades.md).

# How it trades

The four ways the daily pilot builds and leaves a position, what the guard and the verdicts check, and why every figure comes from a measurement.

The model decides **where** and **what**: the side, the market, the entry, and for a grid or a range the borders it leans on. The code decides everything else, from your [charter](https://doc.lockerprotocol.com/hyper-agentic-trader/charter.md) and the [strategy](https://doc.lockerprotocol.com/hyper-agentic-trader/strategies.md) in use.

Two layers, and they answer two different questions.

| Layer                                                                             | What it holds                                                                                                                                                                                           |
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The [charter](https://doc.lockerprotocol.com/hyper-agentic-trader/charter.md)     | **how much**: the risk, the leverage, the room before liquidation, the positions at once, the shares of the costs and of the model, the day's budget, the brakes, the event rule, the markets, the hour |
| The [strategy](https://doc.lockerprotocol.com/hyper-agentic-trader/strategies.md) | **how**: where and when the pilot looks, which sides it opens, and how a position is built and left. A name, one sentence, and a JSON file `lpa` reads and never executes                               |

```sh
lpa pilot charter                                # the charter whole, and the strategy it plays
lpa pilot charter --set stepAtr=0.75 --preview   # the effect of one figure, written nowhere
lpa pilot charter --set stepAtr=0.75             # the same, written
lpa pilot strategy list                          # the eighteen shipped, and yours
```

A figure of the charter holds for every strategy. A figure that belongs to the strategy is kept in a strategy of **yours** rather than in a shipped one, which the command says before it writes:

```
Nothing was written: stepAtr would go from 0.5 to 0.75. The smallest account: $120 to $120. The charter is no longer the one two years of candles measured: measure it again with `lpa pilot calibrate`. The strategy's figures would be kept in your own strategy ladder-long-mine, then in use; ladder-long is unchanged.
```

{% hint style="danger" %}
**These are methods, not promises.** `lpa` runs a loop, bounds it, remembers what it learned and shows everything it does. Whether a method makes money is not something it promises, in simulation or for real. A strategy you write is a hypothesis until you have measured it.
{% endhint %}

## The four kinds, and how each one leaves

A strategy's kind is what decides the shape of a plan. A plan keeps the kind that opened it: putting another strategy in use never touches a position held, which is followed to its exit.

| Kind     | How it is built                                                                                                          | How it is left                                                                                                                                                                           |
| -------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ladder` | steps posted in advance under the price (or at moments, for a DCA), sized so the complete ladder engages the equity once | one limit at the average price plus the target, the whole position at once or in parts. **No stop**                                                                                      |
| `stop`   | one position sized so that the stop loses the charter's risk                                                             | at the target, or under a stop that trails, or a part first then the rest trailing. A time stop closes it at the market when the strategy sets one                                       |
| `grid`   | levels evenly spaced across a range, every order of one size, one side or both                                           | each order filled posts its opposite one level away, so a round trip inside the range pays one step less two maker's fees. Out of its range it holds, or closes everything at the market |
| `range`  | two entries resting just inside the borders of a range, the first filled cancelling the other                            | at a share of the range's width, or at a stop beyond the border. A session ends at the next day's hour                                                                                   |

### By steps (`ladder`)

There is **no stop loss on the order book**. The position is built in steps, each one posted in advance a measured distance below the last for a long, so a price that moves against the position fills the next step and improves the average. The whole position leaves on one limit order at the average price plus the target, and nothing closes it before that, however long it takes.

| Piece                       | Default                | What it is                                                                                                |
| --------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------- |
| The ladder                  | 1, 1, 2, 3, 5          | the steps, as multiples of a base stake                                                                   |
| The step                    | 0.5 daily ATR          | the distance between two steps, in daily volatility, never a fixed percent                                |
| The leverage                | 3                      | the same for every step                                                                                   |
| The base stake              | 2.78 % of the equity   | computed, not chosen: the whole engagement divided by the ladder's sum                                    |
| The room before liquidation | 100 %                  | with the ladder complete, the price can still move that far against the position before any liquidation   |
| The target                  | 10 % of the base stake | net of the fees and of the funding paid                                                                   |
| Positions at once           | 2, one per market      | each kept in its own plan file                                                                            |
| The margin of a fill        | 5 basis points         | how far through a step's price the market must go before the fill counts, in the measures and the replays |

Two variants change where the steps go. A **DCA** makes them moments instead of prices: the first step as a ladder does, then one step at the market every `dcaEveryDays` days whatever the price (`dca-time`), or, by the value, what the position lacks to be worth one more first step at that price, more when the price fell and nothing when it rose past the plan (`dca-value`). An **exit in parts** (`exitTiersPct`) rests two to four limits that reduce, at the average plus each percent, the last giving back all that is left; on the real account only the next part rests.

### With a stop (`stop`)

The trader names the side, the market, the entry, the stop and the target. The code sizes the position so that the stop loses `riskPct` of the equity, fees included, and the stop must sit between `stopAtrMin` and `stopAtrMax` daily ATRs from the entry. One position at a time.

How it leaves is the strategy's `stopExit`:

* **`target`**, the way of before: the take profit and the stop both rest on the venue.
* **`trail`**: no take profit is placed, and the stop follows `trailAtr` daily ATRs under the highest price since the entry, over the lowest for a short, moved by a tenth of an ATR at least and never back.
* **`partial`**: `partialShare` of the position is given back at `partialR` times the risk, the stop then goes to the entry with both legs' fees, and the rest trails the same way. A part worth less than the venue's $10 order floor could never rest: the day refuses it before anything is sent.

Under a trailing exit the target the trader names is still the aim the trade is judged on, and the review closes nothing. An entry may also be a trigger beyond the price, which goes out alone, its stop posted once the venue served it; if the price is already past the stop by then, the position is closed at the market, as the stop would have. A limit or trigger entry that never filled is no trade: no balance is written for it, and its plan goes once it no longer rests.

### A grid (`grid`)

`gridLevels` levels, 8 by default, evenly spaced across a range: the lowest low and the highest high of the dossier's range nearest `gridRangeHours` (168, the week; the dossier holds the last day, seven, thirty and ninety days), or a range the trader gives within `gridRangeTolerancePct` of it, edge by edge. Every order is one size, and a whole side's margin sits within the charter's room before liquidation, as a ladder's does.

Each order filled posts its opposite one level away. A long grid only buys under the price and gives back over it, never net short; a short grid is its mirror; a neutral grid trades both sides from the start. A grid whose round trip would pay less than `gridMinProfitBps` net of two maker's fees is refused before it rests.

Out of its range, `gridOutOfRange` decides: `hold` keeps what it holds and waits, `stop` closes everything at the market past `gridOutOfRangePct` beyond the border, which is what a short or a neutral grid ships with, since the losing side held through a move is what liquidates an account. On the real account a grid that stops keeps, while it holds, a stop of its position resting on the venue at its two exits, so it holds without the service, the computer or the key.

`lpa pilot follow` walks a grid every five minutes while one is held, and `lpa pilot end-grid --symbol <S>` ends one now: its resting orders cancelled, its balance written, its plan removed, and what it holds closed at the market (`--close`) or left on the account as yours (`--keep`).

### A range (`range`)

Two entries rest just inside the borders of a short range, `rangeEntryBps` over its low and as far under its high: the first filled cancels the other, since the venue has no order that cancels another. The position leaves at a target `rangeTargetShare` of the range's width from its entry, or at a stop `rangeStopPct` beyond the border, brought nearer when it sits farther than `rangeStopCap` times the target. It is sized so that the stop loses the charter's risk, fees there and back included.

The range is the extremes of the last `rangeHours` hours, or the bands of the last twenty hourly closes two deviations from their average. A range narrower than `rangeMinWidthPct` or wider than `rangeMaxWidthPct` arms nothing, and neither does a side whose target is nearer than `rangeMinTargetPct` or whose entry the price has already passed.

A session lasts until the next day's hour: while nothing is filled the range is read again every `rangeRefreshMinutes` and an entry that moved is posted again; after an exit the session waits `rangeCooldownMinutes` and arms again; at its end the entries resting are cancelled and a position held keeps its target and its stop. The follow runs every five minutes, and `lpa pilot end-range --symbol <S>` ends a session now, the same way `end-grid` ends a grid.

## A day of the measured ladder, step by step

This is `ladder-long`, the default and the **measured charter**: the one strategy whose figures two years of four-hour candles chose. Every other shipped strategy is said unmeasured until you measure it, and `lpa pilot strategy list` marks the difference.

{% stepper %}
{% step %}

### The strategy of the day

With a choice set (`lpa pilot strategy choice`), the pilot picks the strategy it plays among two to five before the day: by a table of the regime of the leading market, or by the model in one brief call that can only name a strategy allowed. Without a choice, it plays the one in use. The day then runs whole under that strategy, and says which it was and why.
{% endstep %}

{% step %}

### The trader decides

One deliberation, once a day, at 00:30 UTC unless the charter says otherwise. It names the side, the market, and the first entry, at the market or as a limit with its price, with its confidence and its thesis. **No size, no stop, no target**: the charter and the strategy hold those.
{% endstep %}

{% step %}

### The code checks the levels

The verdicts run, each with its name, its yes or no and its figures. One `no` and nothing is opened.
{% endstep %}

{% step %}

### The first step goes out

Sized from the charter at 3x. The other steps are written in the plan at their prices, each one step further against the position. A replay fills each of them when a candle goes through its price. The hourly follow does the same on the real hourly candles for a simulated position, and reads the venue's own executions for a position on the real account, where the steps rest on Hyperliquid as limits.
{% endstep %}

{% step %}

### The market moves against it

Each step the price reaches fills and lowers the average. The exit limit moves with the average. This is what replaces a stop: the position gets bigger and its break-even gets closer, instead of being cut.
{% endstep %}

{% step %}

### The exit fills

One limit order takes the whole position out, at the average plus the target: 10 % of the base stake, after the fees and the funding paid. The realized gain joins the equity the next stake is sized on.
{% endstep %}

{% step %}

### Or it waits

Nothing closes the position before its exit. The charter tells the trader that after `reviewDays` it notes what it sees of the regime, for its own memory. The code does nothing at that term and closes nothing.
{% endstep %}
{% endstepper %}

## What the guard checks, before any model

The cheap checks come first, so that a day which cannot trade costs nothing.

| Check                             | What it does                                                                                                                                                                                                                                                                             |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The follow                        | each position, grid or range already held is followed first, in case the hour that passed missed an exit                                                                                                                                                                                 |
| A plan in progress                | with a stop, one position at a time: anything already held ends the day there. By steps, under a grid and under a range, the day goes on while there is room under `concurrentPositions` and a market free                                                                               |
| A foreign position                | a position on the account this pilot did not open ends the day as `foreign`, with the advice to give this account to the pilot alone                                                                                                                                                     |
| A resting limit of the day before | cancelled, if it is the pilot's: an order on a market one of its plans names, or an entry a range left resting when its session ended. An order on a market the pilot knows nothing of is yours, and stays                                                                               |
| The circuit breaker               | `lossStreak` losing trades in a row (3) pause the pilot for `pauseHours` (72), lifted on its own. It runs under the kinds that place a stop, `stop` and `range`                                                                                                                          |
| The dossier                       | the day's facts, frozen with a fingerprint and measured against the model's context                                                                                                                                                                                                      |
| No stop on a fall                 | since lpa 2.4.0 no fall of the equity stops the pilot and no loss in percent refuses an order: a position may sit below its entry for weeks, and the pilot waits. By steps and under a grid the room before liquidation is the bound                                                     |
| Too small an account              | under the equity at which the first step, or a level of a grid, cannot buy the venue's smallest order, the day asks no model and says the equity that would do                                                                                                                           |
| No market on the table            | by steps, a day on which no market can reach its entry zone, even by a limit `limitMaxDistancePct` from the price, ends before any model is asked and names each market with where it sits in its week. A day whose markets the policy allows none of is refused by name, under any kind |

## What the verdicts check

The code judges what the model proposed. Each verdict carries its figures, and all of them must pass.

| Verdict         | What it checks                                                                                                                                                                                                                                                                                                                   |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `decision`      | the trader proposed no trade, so there is nothing else to check                                                                                                                                                                                                                                                                  |
| `market`        | the market is allowed, and the dossier has a reading of it                                                                                                                                                                                                                                                                       |
| `regime`        | the market's regime is one the strategy opens in, when it names any                                                                                                                                                                                                                                                              |
| `figures`       | the prices are figures, not words                                                                                                                                                                                                                                                                                                |
| `order`         | for a long, stop below the entry below the target; for a short, the other way                                                                                                                                                                                                                                                    |
| `limit`         | a limit entry is at most `limitMaxDistancePct` from the price                                                                                                                                                                                                                                                                    |
| `trigger`       | a trigger entry goes with a stop and a trailing exit only                                                                                                                                                                                                                                                                        |
| `side`          | the side is one the charter opens                                                                                                                                                                                                                                                                                                |
| `zone`          | the entry sits in the share of the seven-day range this side may open in. It runs while that side's zone is under 100: the measured ladder's 33, where the shipped strategies with a stop and the grids put 100, which is no zone                                                                                                |
| `position`      | no position in construction on that market, and room under `concurrentPositions`                                                                                                                                                                                                                                                 |
| `breakout`      | the entry is past the high of the last `breakoutDays` days, or past their low for a short                                                                                                                                                                                                                                        |
| `rsi`           | the hourly RSI 14 is past the excess the strategy names                                                                                                                                                                                                                                                                          |
| `funding`       | the funding of the last seven days pays the side being faded, by `fundingFadePct` a year at least                                                                                                                                                                                                                                |
| `pullback`      | the entry is within `pullbackAtr` daily ATRs of the daily EMA 20, on the side of the EMA 50                                                                                                                                                                                                                                      |
| `leaders`       | the top accounts of the leaderboard lean the side being opened, when the strategy asks it                                                                                                                                                                                                                                        |
| `stop`          | the stop sits between `stopAtrMin` and `stopAtrMax` daily ATRs from the entry                                                                                                                                                                                                                                                    |
| `gain-risk`     | the gain over the risk, before costs, is at least `minRiskReward`                                                                                                                                                                                                                                                                |
| `events`        | no high-impact event of the charter's currencies within `eventWindowHours`, **and** a calendar known far enough ahead                                                                                                                                                                                                            |
| `ladder`        | the ladder of steps holds together                                                                                                                                                                                                                                                                                               |
| `grid`          | the grid holds together: its levels, the venue's minimum, and a round trip that pays more than its fees                                                                                                                                                                                                                          |
| `grid-range`    | a range the trader gave is within `gridRangeTolerancePct` of the measured one, edge by edge                                                                                                                                                                                                                                      |
| `grid-side`     | the side the trader leans is one this grid may take                                                                                                                                                                                                                                                                              |
| `range`         | the borders read now leave at least one entry to arm                                                                                                                                                                                                                                                                             |
| `leverage`      | the leverage is within the market's own and the policy's                                                                                                                                                                                                                                                                         |
| `notional`      | today's notional, plus what this plan starts, is under the mandate's ceiling                                                                                                                                                                                                                                                     |
| `orders`        | the orders this plan starts fit what is left of the orders of the day                                                                                                                                                                                                                                                            |
| `size`          | the size the code computed holds together                                                                                                                                                                                                                                                                                        |
| `costs`         | the whole cost of the trade, said in figures                                                                                                                                                                                                                                                                                     |
| `model-price`   | the model has a price set, so its cost can be counted                                                                                                                                                                                                                                                                            |
| `cost-share`    | the costs are at most `costShare` of the gain aimed at by steps, of the risk with a stop. By steps the first step is weighed, the later ones paying for themselves through the exit; a DCA, whose later steps are bought at market whatever the price, says beside it what they pay there and back and their share of the target |
| `model-share`   | the model is at most `modelShare` of the gain aimed at                                                                                                                                                                                                                                                                           |
| `net-gain-risk` | the gain over the risk, **after every cost**, is still at least `minRiskReward`                                                                                                                                                                                                                                                  |

Which of them run depends on the kind: the zone and the ladder belong to the steps, the stop and the gain over risk to a position with a stop, the three grid verdicts to a grid, the range's to a range. The market, the figures, the limit, the events, the costs and the three money verdicts run every time.

{% hint style="warning" %}
**The calendar can refuse a day on its own.** The public feed publishes one week, Sunday to Saturday in New York. A window that runs past the end of what is published refuses the opening, and so does a calendar that could not be read.
{% endhint %}

## The rules around the measured ladder

* **Longs only, by default.** Over two years of four-hour candles, one account that also opened the shorts of the upper third made more and fell further at its worst, 40 to 49 % against 10 to 15 % (the figures are under [Longs only](https://doc.lockerprotocol.com/hyper-agentic-trader/charter.md#longs-only)). A charter that writes `"sides": "both"` opens shorts too, in the upper third of the week's range (`shortZonePct`, 33: measured, 98 % of targets reached from there against 95.7 % from anywhere, and a tenth of the positions opened anywhere stayed stuck).
* **A long opens in the lower third of the week's range.** Over 207 days of hourly candles a zone cost entries and protected nothing; over two years of four-hour candles, which do hold a falling market, a long in the lower third halved the worst fall for 70 % of the return. The default follows the longer measure (`longZonePct`, 33; 100 is no zone). A day on which no market can reach its zone, even by a limit 3 % from the price, ends before any model is asked: with this charter those are the usual days, and they cost nothing.
* **Two positions in construction at once, one per market.** Measured over 200 days: two positions returned 12.0 % against 9.8 % for one, for a worst fall of 28 % against 25.6 %.
* **No opening within twelve hours of a high-impact release** in the charter's currencies, USD by default. The releases of other currencies are shown and do not bind. Without a readable calendar, nothing opens at all. The rule binds the sides `eventSides` names, the shorts alone by default. Measured on 3 October over the official schedule, longs opened near a release reached their target as often as the others while shorts stayed stuck 6 % of the time against none.
* **One deliberation a day.** Measured on the fifteen runs of 2 October: of the twelve moments that were voted on, eleven were unanimous and the twelfth took the first deliberation's trade anyway. The vote never changed a decision and tripled the trader's cost.
* **The costs are weighed before the order.** The first step's two legs, the funding over the three days a position is expected to wait, the slippage and the model's own dollars. If the costs eat the target, the trade is refused after the model has spoken.

## A day without a model at all

A strategy with a stop whose signal is a breakout and whose exit trails can be decided by the code alone (`decider: "code"`). `donchian` ships that way: each day the code arms one trigger, on the market whose trigger sits nearest its price in daily ATRs, five basis points past the high or the low of the last thirty days and on the side of the daily EMA 50, its stop two daily ATRs away and its target three times the risk. The verdicts, the size, the order and the follow are a trader's.

```
Day 2026-10-11_1209 in simulation with the code's rule, no model: order-refused.
the order was refused: The policy refuses this order: $210.91 is above the $100 per order.
Steps: guard, dossier, decision, vote, verdicts, sizing, order.
```

The day's first line says `with the code's rule, no model` where another day names the provider and the model, and `lpa pilot day` reads back `Strategy: donchian.` with every verdict it passed. No model is asked, no brain is read and nothing is spent: `lpa pilot run-now`, `lpa pilot replay` and `lpa pilot schedule --on` need no model set, and nothing the pilot reads leaves the computer for one.

## Why the figures come from a measurement

Every number above was measured on past candles, not guessed. The tool that measures them is part of the product:

```sh
lpa pilot calibrate --symbol BTC,ETH --interval 4h
lpa pilot calibrate --symbol BTC,ETH --strategy grid-long --starts 6
```

It walks past candles with the venue's own funding, asks nothing of the model and places nothing. By steps it reports, for each candidate step, ladder and entry zone, the share of targets reached within 7, 30, 90 and 365 days, the median delay, the steps it took, the worst excursion from the average and the capital blocked. With `--strategy` it measures any strategy by its own kind, from one or several starting days: a return measured from one day says little. See [Measuring the method](https://doc.lockerprotocol.com/hyper-agentic-trader/calibrate.md).

What you measured yourself can be told to the trader, in your words, through the charter's `notes`: at most five lines, each read to the model as *Measured by the person: ...*.

{% hint style="warning" %}
**How each kind loses.** A ladder built against a trend that has room to run: the steps improve the average, they do not make a falling market stop falling. A trailing stop in a market that chops: it is taken out and the move goes on without it. A grid whose price leaves the range: it holds the losing side, which is why the short and the neutral grids close out at the market. A range that breaks instead of coming back: the stop beyond the border is what bounds it. The zones, the event window, the ceiling on positions at once and a leverage of 3 are there for the first of those, and no kind promises a profit.
{% endhint %}

## Learn more

* [The strategies](https://doc.lockerprotocol.com/hyper-agentic-trader/strategies.md), the eighteen shipped, your own, and the choice of the day.
* [The charter](https://doc.lockerprotocol.com/hyper-agentic-trader/charter.md), every field with its default and its bounds.
* [Measuring the method](https://doc.lockerprotocol.com/hyper-agentic-trader/calibrate.md).
* [Replaying the past](https://doc.lockerprotocol.com/hyper-agentic-trader/replay.md).
* [The brain and the lessons](https://doc.lockerprotocol.com/hyper-agentic-trader/brain-and-lessons.md).
