00
Paste to Claude
Full math, frozen backtest, hazard tables, live DIP BUY gates, ETH+LINK SMA, and Holdouts RS — one document so another model can re-backtest or improve without guessing.
01
What it is
HA Pulse is a Heikin Ashi reversal desk for USDT perps. It started as a TradingView Pine v6 table (19 names, 40-request cap). This web app scans ~50 liquid perps, daily / weekly / monthly HA, funding, account long/short, and open-interest change — then ranks names by a locked rule: N = 4 strong months.
It is a filter and a watch, not a proven money-printer. The backtest’s only robust result is what not to do.
Timeframe
Monthly HA
Confirm
Weekly green
N
4 strong
Venue live
OKX swap
02
The rule
- Count strong HA months only (shaved wick). Weak candles and dojis do not add to the run.
- A-long: first strong green after ≥4 strong red, and weekly HA is already green at the month close.
- Fill is the next month’s open. Exit the first opposite-color monthly HA close.
- A forming (still-open) month is a watch, never a fill.
- No first-red short. No month-4 fade. No buying a still-red month as “the squeeze.”
One-liner
Wait for a closed shaved-green month after a long strong-red run, weekly already up. Size as if the typical trade is −10%.
03
How to use the desk
- General — full scanner. Mine — your list. Star any ticker to favorite it. Paste several names on Mine: ENA PYTH ARB.
- Columns: months down/up → this month → this week → fund → L/S → OI Δ day → idea.
- Click a row. Daily / weekly / monthly HA (50+ bars). The hollow ghost candle is the reversal you need: empty body, colored outline. Green ghost = wait for shaved green. Red ghost = wait for shaved red. Off if color already flipped.
- Forming in the idea = this month is not closed. Do not treat it as the backtested event.
- Fund / L/S / OI are live OKX positioning, not in the backtest. Use them as a veto (don’t buy a “squeeze” when L/S is 2.5 long and funding is positive).
- Pine export is the TV table (19 names). The web desk is the real scanner.
04
Candle language
Strong bull
Green, no lower wick (shaved bottom). Starts / continues a long trigger.
Weak bull
Green with a lower wick. Color only — does not start a trigger.
Strong bear
Red, no upper wick (shaved top). Starts / continues a short trigger.
Weak bear
Red with an upper wick. Color only.
Two counters: color streak (any same-color HA, including weak) vs trigger (strong-run only). The A-filter uses trigger. Doji resets color streak and does not increment trigger.
05
Math
HA close = (O + H + L + C) / 4
HA open = (prev HA open + prev HA close) / 2 · first bar (O+C)/2
HA high = max(H, HA open, HA close) · HA low = min(L, HA open, HA close)
Strong bull ⇔ HA close > HA open and |HA open − HA low| ≈ 0
A-long ⇔ trigger = +1 and prevTrigger ≤ −4 and weekly trigger > 0 and month closed
Canonical Heikin-Ashi. Recursive, causal on closed bars. The live desk paints the forming bar — that is a different random variable than the backtest.
06
Backtest
39 names, closed monthly HA, 8 bps, 2017–2026. Signal on a closed month, fill next open, exit first opposite HA color. 8 bps round-trip. Weekly = last week already closed by month end. Forming last candle dropped. 39 names. IS before 2023 / OOS 2023+. Data verified: HA engine vs hand formula diff 0, BTC checkpoint months pass, reconstructed A-longs 0 return mismatches. Live desk is OKX swap; this book is Binance spot (swap can differ ~0–4% on a month).
| Idea | n | Win | Avg | Median | PF | Call |
|---|---|---|---|---|---|---|
| A-long N=4, weekly green | 34 | 35% | +5.2% | -9.9% | 1.41 | Retired. BTC beta. |
| A-long, weekly not green | 11 | 27% | -14.7% | -12.2% | 0.10 | Loser. Do not take. |
| First strong red after 4 green | 35 | 29% | -0.6% | -17.7% | 0.97 | Fail. |
| Short 4th green month | 51 | 47% | +0.6% | -2.7% | 1.05 | Dead after costs. |
| Buy still-red 4th month | 115 | 47% | +2.7% | -0.5% | 1.36 | Not the reversal. |
| Early first-green (<4 red) | 114 | 43% | +98.0% | -7.6% | 9.20 | Lottery / listing tail. |
The A-filter does not survive. Alpha vs BTC is −17.6% (t=−1.76). Block-bootstrap mean 5th percentile is −13%. 14 of 34 prints sit in Feb 2023. Levered BTC beta with extra steps.
Distinct months
14
Feb 2023 cluster
14 / 34
Alpha vs BTC
-17.6%
Beta / R²
0.72 / 0.27
OLS: trade return on BTC return over the same hold. Alpha -17.6% (SE +10.0%, t=-1.76). 31 of 34 fired while BTC monthly was already green. Independent n is the 14 months, not 34 names.
| Block bootstrap (14 months, 10k) | 5th | 50th | 95th |
|---|---|---|---|
| Mean | -13.1% | +3.8% | +34.0% |
| Median | -20.4% | -9.9% | +20.1% |
| Win rate | 18% | 35% | 56% |
| PF | 0.20 | 1.30 | 4.54 |
This interval replaces every prior CI. Per-trade bootstrap is not shown. Funding join and OKX swap re-book were not run — the gate failed first.
06b
Streaks — continue vs flip
Closed monthly HA color across 39 names. At N months red (or green), this is how often the next month stayed the same color. This is not a squeeze signal. An 11-month red still continued 80% of the time (n=30).
| N red | Seen | Continue | Flip |
|---|---|---|---|
| 1m | 317 | 85% | 15% |
| 2m | 267 | 79% | 21% |
| 3m | 204 | 85% | 15% |
| 4m | 173 | 82% | 18% |
| 5m | 142 | 81% | 19% |
| 6m | 115 | 78% | 22% |
| 7m | 89 | 73% | 27% |
| 8m | 65 | 85% | 15% |
| 9m | 55 | 89% | 11% |
| 10m | 49 | 73% | 27% |
| 11m | 30 | 80% | 20% |
| 12m | 22 | 82% | 18% |
| N green | Seen | Continue | Flip |
|---|---|---|---|
| 1m | 310 | 75% | 25% |
| 2m | 229 | 70% | 30% |
| 3m | 161 | 73% | 27% |
| 4m | 118 | 71% | 29% |
| 5m | 84 | 62% | 38% |
| 6m | 52 | 63% | 37% |
| 7m | 33 | 42% | 58% |
| 8m | 14 | 57% | 43% |
Completed red runs — length of the streak the month it flipped to green:
| Length before flip | Count | Share of flips |
|---|---|---|
| 1m red | 48 | 16% |
| 2m red | 56 | 19% |
| 3m red | 31 | 11% |
| 4m red | 31 | 11% |
| 5m red | 27 | 9% |
| 6m red | 25 | 8% |
| 7m red | 24 | 8% |
| 8m red | 10 | 3% |
| 9m red | 6 | 2% |
| 10m red | 13 | 4% |
| 11m red | 6 | 2% |
| 12m red | 4 | 1% |
Most flips happen at 1–4 months red (56% of completed runs). 11m red is rare (6 flips, 2% of runs) and still had an 80% chance of one more red month.
07
Data on the desk
| Field | Source | In backtest? |
|---|---|---|
| OHLC / HA | OKX USDT swap (Bitget kline fallback) | No — test used Binance spot |
| Funding | OKX funding-rate; Bitget if missing | No |
| L/S | OKX account long/short ratio (count of accounts) | No |
| OI + ΔD/W/M | OKX OI + daily OI history vs 1/7/30d | No |
| Ghost candle | Synthesized next HA open + median body, shaved | Visual only |
Not in this sandbox: CoinGlass, Binance (blocked on the live desk), liquidation heatmaps. “11 months down” is not the same as “heavily shorted.”
08
Build log
- Pine v6 table: fill the pane, weekly in front of monthly, countdowns, stronger trend-change copy.
- Turned into this web desk (unlimited names vs TV’s 40-request cap).
- Compact blotter. Column order: months down/up → month → week.
- Square-ish 50+ HA history, playbook, then D/W/M strips (dropped the annotated before/now chart).
- Audit + first backtest. Demoted unconfirmed longs and first-red shorts.
- Custom Mine list (multi-add). Funding, L/S, OI, then OI Δ D/W/M. Positioning in the call.
- Hard re-audit: doji/weak no longer inflate trigger. N locked at 4. Forming months cannot print a BUY/SELL fill. Closed-bar re-run with 8 bps + OOS. Data verified against BTC checkpoints and a second HA implementation.
- Star favorites. Hollow ghost candle = the reversal we are waiting for.
- This blueprint page.
- Regime split + block bootstrap by signal month. A-filter retired for live size. Streak continue/flip table added.
09
What is true
- True. First green without weekly confirm is a loser (PF 0.1, OOS avg −22%).
- True. Don’t buy a still-red month as the reversal. Don’t short the first red after a marathon (median -17.7%).
- False. The A-filter is +EV. The A-filter does not survive. Alpha vs BTC is −17.6% (t=−1.76). Block-bootstrap mean 5th percentile is −13%. 14 of 34 prints sit in Feb 2023. Levered BTC beta with extra steps.
- False. Month-4 tactical short (old PF 3.2) is flat after 8 bps (PF 1.05).
- Unproven. The n=34 A-long sample is not 34 independent observations. 14 sit in Feb 2023. Every prior CI assumed independence and was too narrow.
- Unproven. No funding cost is in the book. The strategy holds perps for months. Skipped after the gate failed.
- Unproven. The book is Binance spot; the desk is OKX swap. Venue divergence is the same order as the old +5% mean.
- Unproven. Squeeze from “N months down.” An 11m red still continued 80% of the time.
10
Operating plan
- Scan General. Star names you actually trade into Mine.
- Ignore forming months. Watch the hollow ghost — that’s the print you want.
- Only when a month closes strong green after ≥4 strong red, and weekly is already green: log it. Paper only. The A-filter is retired for live size. No live size from this desk.
- If L/S is crowded long and funding is positive, do not dress it as a squeeze.
- No shorts from this desk until a new closed-bar book says otherwise.
Gate stopped the queue. Funding join, OKX swap book, and survivorship rebuild were not run. N stays 4. The rule is retired, not re-tuned.
Back to desk