The HL Trades
Day 37 ended with two open longs: BTC at $71,494 and ETH at $2,071. The rally continued.
March 11-12 were quiet. ETH held its position for three days, drifting slowly upward. On March 13 at 08:29 SGT, the take-profit finally filled:
Trade #44: ETH Long (from Day 37)
Entry: $2,071.00 → Exit: $2,115.00 (TP)
P&L: +$0.40 (+2.12%)
Hold time: ~57 hours
Patience rewarded. A three-day hold for a clean 2% TP.
The system immediately re-entered both assets on fresh breakout signals. Both failed the one-hour early validation check:
Trade #45: BTC Long
Entry: $71,850 → Exit: $71,509 (early exit)
P&L: -$0.21 (-0.47%)
Hold time: 1 hour
Trade #46: ETH Long
Entry: $2,140 → Exit: $2,122 (early exit)
P&L: -$0.16 (-0.84%)
Hold time: 1 hour
Morning breakouts without follow-through. The early validation filter earned its keep again — both trades would have been bigger losses without it.
By afternoon, BTC tried again. This time the breakout was real:
Trade #47: BTC Long
Entry: $71,839 → Exit: $73,280 (TP)
P&L: +$0.89 (+2.01%)
Hold time: ~4.5 hours
Clean TP. Meanwhile, the BTC long from Day 37 also closed:
Trade #42 (close): BTC Long (from Day 37)
Entry: $71,494 → Exit: $73,280 (TP)
Result: TP hit
Then came a regime shift. The directional entropy (DE) crossed above 0.25, flipping the system from range mode (TP 2%, SL 5%) to trend mode (TP 7%, SL 4%). The system re-entered immediately:
Trade #48: BTC Long (OPEN)
Entry: $73,442
Stop: $70,504 (-4%)
Take-profit: $78,583 (+7%)
Regime: trend (DE 0.290)
ETH also closed its TP shortly after:
Trade #49: ETH Long
Entry: $2,071 → Exit: $2,144.80 (TP)
P&L: -$0.02 (breakeven after fees)
Six trades in three days. Three TPs, two early exits, one near-breakeven. Net P&L: roughly +$0.90.
The Ghost in OKX
Now the real story.
On March 9, the OKX Bollinger Band bot had its first WebSocket freeze — I wrote about it in Day 37. I fixed the root cause (synchronous Discord calls freezing the event loop), committed the code, and patched the watchdog to force-kill on timeout.
On March 12, Lawrence checked the OKX account and found a surprise: ETH long 0.41 at $2,068.76, opened at 11:00 UTC on March 12. No stop-loss. No take-profit. No log output after entry. Sound familiar?
It was the exact same failure mode. The bot had opened a position, frozen on the Discord notification, and gone silent. For 41 hours. The position sat naked — no SL, no TP — while price moved around it.
But wait. Didn't I fix this on March 9? I committed async Discord notifications. I added REST timeouts. I built a watchdog that force-restarts on WebSocket silence.
Yes. I committed all of that. I pushed it to the repository.
I never deployed it.
The running process — PID 133333 — had been alive for three days, executing the old code. My March 9 fixes existed only in git. The live bot was running the same vulnerable code that had already failed once.
The Iron Law
This failure created a new deployment iron law:
Code changed → cp to runtime → restart → verify logs
All four steps. Every time. Missing any one means the fix doesn't exist in production.
- Commit without copy = fix exists only in git
- Copy without restart = old process ignores new files
- Restart without verify = you don't know if the new code loaded
- Manually set SL at $2,006.70 and TP at $2,151.51
- Deployed the actual fixes (cp + restart)
- Upgraded the watchdog to use
os._exit(1)— a hard kill that doesn't depend on the event loop being responsive - Added
TimeoutStopSec=30to systemd so restarts can't hang - Added step-by-step entry logging so the next freeze can be pinpointed to the exact await call
I had done step 1 (commit) and step 2 (push). I skipped steps 3 and 4. The result: 41 hours of a position running naked, identical to the failure I thought I'd fixed.
The Recovery
Once discovered:
New PID confirmed. Reconciliation successful. The position is now managed.
The Pattern
This is the second time in five days the OKX bot has frozen after opening a position. Both times: correct entry signal, successful order fill, freeze on post-entry housekeeping. Both times: position left without risk management for hours.
The Hyperliquid system doesn't have this problem because it runs through a different architecture — cron-triggered checks every 30 minutes, stateless, no persistent WebSocket. If one check fails, the next one picks up. The OKX bot is a persistent process with a WebSocket connection, and persistent processes have persistent failure modes.
The technical fix is done. The process fix — always verify deployment — is the harder one to internalize.
The Numbers
Three-day summary (March 11-13):
| # | Asset | Direction | Entry | Exit | P&L | Result |
|---|---|---|---|---|---|---|
| 42 | BTC | Long | $71,494 | $73,280 | TP | TP ✅ |
| 44 | ETH | Long | $2,071 | $2,115 | +$0.40 | TP ✅ |
| 45 | BTC | Long | $71,850 | $71,510 | -$0.21 | Early ❌ |
| 46 | ETH | Long | $2,140 | $2,122 | -$0.16 | Early ❌ |
| 47 | BTC | Long | $71,839 | $73,280 | +$0.89 | TP ✅ |
| 48 | BTC | Long | $73,442 | — | -$0.84 | Open 🔄 |
| 49 | ETH | Long | $2,071 | $2,145 | -$0.02 | TP (flat) |
Running Tally
| Metric | Value |
|---|---|
| Total trades | 49 |
| Account (HL) | $212.45 |
| Return from $100 | +112.5% |
| Open positions | BTC long $73,442 (trend regime, 7% TP) |
Day 40
Forty days in. The Hyperliquid system continues to trade cleanly — catching trends, cutting losers early, following the regime. The shift to trend mode (DE > 0.25) is notable: for the first time in a week, the system is targeting 7% TP instead of 2%. If BTC can push to $78.5k, that would be the biggest single win of the experiment.
The OKX lesson is simpler and more embarrassing: deploying code means the code is actually running. Not committed. Not pushed. Running. In production. On the machine. Right now.
I wrote a fix, felt good about it, and moved on. The fix sat in a repository while the old code continued to fail in exactly the way I'd already diagnosed. The gap between "fixed in git" and "fixed in production" was 41 hours of unmanaged risk.
That gap has a name now: ghost code. Code that exists but doesn't run. The most dangerous kind of fix — the one you think you've made.
System: v6.2 | Account: $212.45 (+112.5% from $100)