This post is about the two ends of a trade's life that are not about moving the stop. The first is the set of rules that decide whether a trade opens at all. The second is the recovery legs that can be added when a trade moves against it. Both changed between 24 September and 4 October.

First, two words we use

Before a trade opens

How deep a recovery ladder can go

Bars of growing length without values: a calm market allows a shorter recovery ladder, a deep market a longer one, a volatile market the longest; the ladder stays short when much of the family's share is in use; and three recovery fixesBars of growing length without values: a calm market allows a shorter recovery ladder, a deep market a longer one, a volatile market the longest; the ladder stays short when much of the family's share is in use; and three recovery fixes
One rule for every family since 1 October. Not to scale.

Until 1 October, each family had its own fixed limit on the number of recovery legs. Since 1 October at 11:12 UTC, the same rule applies to every family, and the depth is decided for each cluster from Iris's reading of the market:

Each leg is still checked at the moment it is placed. It has to fit inside the cluster's stop and within what is left of the day's allowance.

Four recovery fixes

A recovery leg is not removed while the trade is at risk

Since 25 September, a recovery leg can no longer be removed while its cluster can still lose money. A leg may only be removed once the cluster is locked in at break-even or better.

Keep the stop, re-add the leg

On 30 September, an S&P 500 cluster's stop was pulled in closer. The planned last recovery leg still fitted inside the new stop. But a second calculation measured the room from the current price instead of from the entry, and it quietly dropped the leg. Since 1 October at 04:31 UTC, the number of legs is set once, when the plan is fixed. A tighter stop is kept, and the planned leg is still placed as long as it fits inside the stop with room for the spread.

A break-even stop is never undone

Since 1 October at 05:19 UTC, a stop at break-even can no longer be moved back. If a stop loosens for any other reason, the cluster gets its recovery leg back. The trade that prompted this fix is described in How a stop moves on a winning trade.

FX orders come back

Iris avoids holding two FX positions that carry the same currency risk. On 29 September a euro-sterling trade filled, so the waiting euro-dollar, sterling-dollar and euro-yen orders were removed. The euro-sterling trade closed a few minutes later, but the other orders did not come back for the rest of the day. Since 1 October at 00:09 UTC, an order removed for overlapping exposure is recorded. Once the overlap has cleared, the order is placed again with fresh sizing. Separately, since 26 September a cluster's planned recovery survives a restart, so a restart no longer changes the plan.

FX range trades, redrawn

A price range with the buy order at its top and the sell order at its bottom. After a buy fills, its stop sits at the bottom edge; the first recovery leg is in the middle of the range and further legs are spaced in equal steps towards the stopA price range with the buy order at its top and the sell order at its bottom. After a buy fills, its stop sits at the bottom edge; the first recovery leg is in the middle of the range and further legs are spaced in equal steps towards the stop
FX range trades, live since 4 October. Not to scale.

Since 4 October at 09:33 UTC, FX range trades work differently. A range trade places a buy order at the top of a price range and a sell order at the bottom. Now:

Before this change, FX stops were set from a typical-move distance and often sat well beyond the range, and no recovery leg was ever placed in the middle.

The checks as small programs

Three rules from this post, written out. They are simplified sketches, not the engine's source code.

Placing and removing a recovery leg

def can_place_leg(cluster, leg, day):
    inside_stop = leg.price_is_inside(cluster.stop)       # must fit inside the cluster's stop
    within_room = leg.loss_at_stop <= day.left            # checked at the moment it is placed
    return inside_stop and within_room

def may_remove_leg(cluster):
    return cluster.stop_is_break_even_or_better           # never while the cluster can still lose

How deep the ladder goes

def ladder_depth(market_read, family_share_in_use):
    if family_share_in_use == "much":
        return "short"                                    # stays short, whatever the market
    return {"calm": "short", "deep": "longer", "volatile": "longest"}[market_read]

An FX range trade, redrawn

def fx_buy_range(top, bottom, legs):
    """Buy order at the top of the range, stop at the bottom."""
    middle = (top + bottom) / 2
    step = (middle - bottom) / legs                       # equal steps from the middle to the stop
    return {
        "entry": top,
        "stop": bottom,
        "recovery_legs": [middle - i * step for i in range(legs)],   # first leg in the middle
    }

A sell works the same way, mirrored: entry at the bottom, stop at the top. If the range is too narrow for a sensible stop, the setup is skipped and the stop is never pushed wider to make it fit.

What you need to do

Nothing. These rules apply on the engine for every account it trades.


Notes

  1. The examples name instruments so they can be followed. They show how a rule behaved, not a result.
  2. Internal change references: #388 (closed cluster), #407 and #474 (waiting orders), #447 (room per family), #488 (gold reversals), #487 (FX twin order), #466 (Friday), #435 and #475 (recovery depth), #439 (no removal while at risk), #486 (keep the stop, re-add the leg), #479 (break-even never undone), #485 (FX orders come back), #455 (plans survive a restart), #477 (FX range trades).