Skip to content

How the system works

Position management

What happens after a trade opens: emergency exit, break-even, profit ratchet and partial close — the shipped defaults, and the two rules we ship disabled.

Last reviewed: 25 August 2026

Who owns a trade once it is open

Position management does, and it runs in the C++ trading core on every tick with no involvement from the AI, the console or the database. The model that proposed the trade has no say in when it closes.

This is the part of the system that keeps working when everything above it is down. It needs nothing but live prices.

The rules, in priority order

Evaluated in this order on every tick, so a protective rule always resolves before a profit-taking one:

Position management rules, defaults and enabled state
PriorityRuleShipped defaultState
1Emergency exitCloses the position at 5% unrealized lossOn
2Profit lockArms at 1% profit, gives back 0.3% of equityOff
3Break-evenMoves the stop to entry at 0.3% profitOn
4Trailing stopArms at 0.5% profit, trails by a fixed price distanceOff
5Profit ratchetArms at 5% profit, gives back 75% of the peakOn
6Partial closeCloses half the position at 0.8% profitOn

Emergency exit

A hard stop on unrealized loss, evaluated before every other rule, on each position independently. It cannot be outvoted by a strategy signal or a confident model, and it does not consult the AI layer — which is the point of running it first and separately.

Break-even and partial close

Break-even moves the resting stop to your entry once the trade is modestly ahead, converting a winning position into one that cannot become a losing one at the broker level. Partial close takes half the position off at a configured profit, which reduces the size at risk while leaving the remainder to run.

The profit ratchet

A resting broker-side stop that steps up behind peak profit. Once armed it can never sit at a losing level. It arms at 5% profit and gives back 75% of the peak — which sounds generous until you read it the other way round: it locks a quarter of the best the trade ever showed, and only starts doing so once the trade is substantially ahead.

Those two numbers were measured, not chosen

The intuitive settings — arm early, lock most of the peak — were tested and lost money out of sample in every variant tried. They cut short exactly the large winners this kind of system depends on for its return. Arming at 5% and giving back 75% survived the same test. We publish the counter-intuitive numbers because they are the ones that held up, not because they are the ones that sound reassuring.

Two rules ship switched off

Both remain in the code and can be enabled. Neither is on by default, and the reasons are worth stating plainly rather than hiding behind a config file.

Profit lock is off because the share of peak profit it surrenders shrinks as the peak grows — it gives back a fixed percentage of equity, not a proportion of the gain — and because it closes the position at market rather than moving a stop. Tested across ten symbols of history with costs applied, that combination lost money out of sample at every setting tried. The profit ratchet replaces it with a proportional, broker-side version.

Trailing stop is off because its distance is an absolute price distance, and no single value is correct across instruments. A distance that is a hair-trigger on an instrument priced in the thousands computes a stop below zero on one priced near 1.00 — a stop that can never tighten. The ratchet expresses the same idea in basis points, which is scale-independent.

Stops rest at the broker

Every level these rules set is placed on the broker's own order, not merely tracked in memory. That is what makes them survive a dropped connection — see Connecting MetaTrader 5.

A stop level is not a guaranteed fill

None of these rules can promise the price you see. A resting stop becomes an order at the next available price when it triggers, and in a gapping or fast market that price can be materially worse than the level set. These rules bound intent, not outcome.

Changing the defaults

All of these are configurable per account, and every change is version-stamped into the record alongside the decisions made under it, so a trade from months ago can still be read against the policy that was actually in force — Audit trail covers how.