← notes

A trailing stop whose distance is a function of realized profit

Sep 28, 2025

A trading bot for Zora markets where the risk management, not the signal, is the product.

It watches roughly 200 pools on volume, trade count, engagement and price momentum, holds up to ten concurrent positions, and alerts to Slack and Telegram. Anything can generate an entry signal; what decides the outcome is what happens after you are in.

So the mechanism is a progressive stop loss. The trailing stop tightens as profit tiers are crossed, converting an unrealized gain into a floor rather than letting it round-trip. Every tick moves the stop up and never down, which is the invariant that an ordering bug breaks when several positions update in one pass.

The honest part is the reporting. It tracks P&L, Sharpe and win rate, and across 200 thin pools those mean much less than they appear to. Sharpe assumes a return distribution these markets do not have, and win rate is trivially gamed by taking small wins and holding losers.

Signal thresholds live in .env rather than in code, which made tuning fast and made every historical result unreproducible, because nothing recorded which thresholds produced which trades.