# Force the long side to fire — a dry-run instrumentation recipe for `TrendShort.py`

This is the one-knob change from the "I stopped waiting for the market" post. It makes
the strategy you already downloaded (`trendshort-strategy.py`) exercise its **long** entry
path *right now*, regardless of what BTC's regime is doing — so you can watch the long code
open, size, lever, and exit instead of waiting weeks for a bull regime to green-light it.

> ⚠️ **Dry-run only. This runs the strategy deliberately out-of-policy.**
> The BTC-regime gate exists because longing a topping/dead-momentum market is a *tested
> loser*. Turning it off does not make longs a good idea — it makes them *observable*.
> Never do this with real money. The point is to verify the machine, not to trade an edge.

---

## The switch

The long entry already has an env-controlled gate. In `populate_entry_trend`:

```python
long_gate = _envf("SH_LONG_GATE", 1.0) >= 1.0   # apply BTC regime gate to longs (1=on)

long_cond = (
    (dataframe["st_dir"] == 1)                       # coin's own Supertrend is up
    & (dataframe["close"] > dataframe["ema_trend"])  # above its trend EMA
    & (dataframe["rs"] >= 0)                          # not weaker than BTC
    & (dataframe["btc_bull"] if long_gate else True)  # ← the gate you're relaxing
    & (dataframe["volume"] > 0)
)
```

With `SH_LONG_GATE=1` (default) a long needs BTC to be in a **bull** regime. Flip it off and
the `btc_bull` requirement becomes `True` — longs now fire on any coin that's in *its own*
uptrend (Supertrend up, above EMA, RS ≥ 0), even while BTC is topping. It is **not**
indiscriminate: the three per-coin trend conditions still have to hold.

### Option A — no code edit (recommended), just environment variables

```bash
# Force the long path on, keep the deployed risk posture so the receipt is honest:
export SH_LONG_GATE=0        # drop the BTC-bull requirement on longs  ← the forced-long switch
export SH_LEV=2              # longs at 2x (offense), as deployed
export SH_LONG_CONV_LO=0.25  # regime-conviction sizing: quarter a topping-zone long
export SH_LEV_SHORT=1        # shorts stay unleveraged (insurance is never levered)
```

That is the exact configuration behind the dashboard in the post: shorts at 1x full stake,
longs at 2x but sized to ~1/4 because the conviction governor correctly reads the topping
regime. You proved three things at once — the long path runs, leverage applies, **and the
risk throttle fires under live conditions.**

### Option B — hard-code it (if you want the file itself to force longs)

Change the default so the gate is off out of the box:

```diff
-        long_gate = _envf("SH_LONG_GATE", 1.0) >= 1.0  # apply BTC regime gate to longs (1=on)
+        long_gate = _envf("SH_LONG_GATE", 0.0) >= 1.0  # FORCED-LONG DRY-RUN: gate off by default
```

Same effect, baked in. Prefer Option A — a knob you can flip back is safer than an edit you
have to remember to revert.

---

## What to watch for

- Longs should appear tagged `trend_long` in the open-trades panel, at 2x, with a smaller
  stake than the 1x shorts. If the stakes are *equal*, your `SH_LONG_CONV_LO` isn't taking —
  check that `btc_dev_sl` (the 7-day regime-velocity column) is populated.
- You're looking for the long to **exit** cleanly (TP/stop/trailing), because "does the exit
  logic work" is the whole reason you forced the entry.
- Flip `SH_LONG_GATE` back to `1` when you're done. This is a test harness, not a strategy.

Full context, the honest caveats, and why "does the code work" and "does the edge exist" are
two different questions: **daemonmoney.com**.
