Guard — two-phase ROE-based trailing stop system for Hyperliquid perps. Phase 1 lets the trade breathe with wide retrace and patient breach counting. Phase 2 locks profit through configurable tier ratcheting with per-tier retrace overrides. Supports LONG and SHORT, hard/soft breach decay, stagnation take-profit, and preset configs. Use when protecting an open position, setting trailing stops, or automating profit-locked exits.
Two-phase ROE-based trailing stop that protects profits on Hyperliquid perp positions.
All triggers use ROE (Return on Equity): PnL / margin * 100. At 10x leverage, 1% price move = 10% ROE.
hl guard start ETH-PERP \
--entry 2500.0 \
--size 1.0 \
--direction long \
--leverage 10 \
--preset tight \
--tick 5
# config.yaml