# Break-Even & ATR Chandelier Trail Algo

- Canonical: https://rxm.orrnn.com/codebase/breakeven-atr-trail-algo
- Updated: 2026-12-02T01:51:53.268726-08:00

> Live RTX5 algo module that moves active stop losses to break-even at 1R profit and trails remaining exposure with an ATR chandelier.

Reference `algo(...)` implementation showing RTX5 `order.*` and `position.*` lifecycle management.

```orrnn
//@orrnn=1
algo("BreakEven ATR Trail", overlay = true, max_bars_back = 250)

let atrPeriod = input.int(14, title = "ATR Period")
let trailMult = input.float(2.0, title = "Trail Multiplier")
let atr = ta.atr(atrPeriod)

if position.size > 0
    let trailStop = high - atr * trailMult
    if trailStop > position.stop_loss
        order.modify_sl(position.id, trailStop)
```
