Skip to content

feat(sl-hunting): v5n + SLH-020 - the second seller is the random seller (+ 30 Sep note) - #192

Merged
DoRmAmMu1997 merged 4 commits into
mainfrom
feat/sl-hunting-v5n
Sep 30, 2026
Merged

DoRmAmMu1997 merged 4 commits into
mainfrom
feat/sl-hunting-v5n

Conversation

@DoRmAmMu1997

@DoRmAmMu1997 DoRmAmMu1997 commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Most of this PR comes from the 29 Sep session: IH's live video (6zppfK_n4yg) compared with this book's two trades.

  • v5n is a knowledge-only rule.
  • SLH-020 (operator-approved addendum) is a small runtime change. It only adds information for the agent and never refuses an order.
  • The 30 Sep pre-open note (addendum).
  • The 26 Sep weekly (addendum): doc only. Its one new idea failed a data check, so nothing was added to the prompt.

This was also v5m's first live day: the runner started at 09:14:46, after #190 merged, and logged the injected note.

IH agent
first leg sold from 09:20, booked 09:30 09:22 → 09:32, +6,246.75 (the same trade)
second entry none 10:02 into the range the first leg left behind, cut 10:35 with NIFTY flat, −1,504.50

The agent contradicted itself three minutes apart:

  • 10:00:51, holding: "that first leg already played out… consolidating in a tight ~50pt range".
  • 10:02:57, entering: "declined continuously… no major retracement".

None of the day's 80 recorded decisions cited v5m.

v5n: THE SECOND SELLER IS THE RANDOM SELLER

  • Placement: a sub-bullet of MOVE-EXHAUSTION, right after v5m.
  • What it adds: IH explains why v5m's losses happen. On a follow-the-market day, the sellers who arrive late are "random sellers" who cut at the first candle that goes against them, and the next retracement exists to remove them. So a second same-side entry after a winning leg joins exactly that crowd.
  • What it doesn't say: IH also said "opportunity comes, in an hour or two, but at the right place", about his own late entry. So the rule is not "never re-enter".

Re-measured (tested, not enforced)

  • After a winning exit: 36 re-entries, −10,807.25. After a losing exit: 43 re-entries, +33,714.25.
  • Both halves of the after-win set are now negative (−9,312.50 and −1,494.75), but it still isn't robust:
    • the most recent third made +139.50;
    • without its two worst sessions the set would total +1,414.75;
    • the gap to after-loss re-entries is p = 0.056, before correcting for the other splits tried.
  • So this stays a default, not an enforced gate.

SLH-020 (addendum): tell the agent about today's last close when it re-enters the same side

The prompt rule didn't hold on its first day, and the numbers don't support an enforced gate, so this is the middle option. It refuses nothing.

  • Worker: records each finished trade at the moment the NIFTY + BankNIFTY basket goes flat. Every close path passes through that point: the agent's EXIT, stop/target, max-loss, square-off, and closing a lone mirror leg. The record holds:
    • direction and close time;
    • booked_pnl: the change in realized_pnl since entry, both legs (the same basis as SLH-019);
    • nifty_when_flat: read from the shared store only, so there's never a broker call on the exit path.
      It's recorded even when the post-exit cooldown is turned off, and last_closed_trade_today() only returns today's record.
  • Executor: while flat, position_state carries last_closed_trade_today. An accepted entry on the same side as a winning close from earlier today carries same_side_after_winning_exit, and it logs an SLH-020: line so flagged entries can be counted later. The existing SLH-005 cooldown and SLH-016 already-breached-stop refusals are unchanged.
  • Descriptions: the tool descriptions and the v5n rule both name the two fields and state that they refuse nothing.

Addendum: pre-open note for 30 SEP 2026

Source: NrPmCbzrzSY, uploaded 29 Sep 21:25 IST. The branches flipped from 29 Sep:

  • Flat to a small gap-down → BUY. The buyers that the recovery drew in have already been retraced out, and the market is trying to go up again.
  • Gap up → SELL. No sellers' stops sit above to fuel a rise, and others may buy the gap reading it as positive.
index resistance support
NIFTY 22900 / 23000 22650 / 22560 (same lines as 29 Sep)
BANKNIFTY 54650 / 55000 54000 / 53790
SENSEX 73130 / 73450 72000 / 71500

Two support pairs were garbled by the transcript, so I read them off the 1080p chart:

  • BankNIFTY "5453 790" is 54,007.90 / 53,787.80.
  • SENSEX "7271500" is 72,000.23 / 71,510.61.

There's no expiry today.

Addendum: the 26 Sep weekly — one candidate, not encoded (doc only)

Source: dVCXZ1PXVYI, 13:32, read in full. Nearly all of it is already in the knowledge:

  • his buyer chart is RECRUITMENT HISTORY;
  • "flat, gap-up, even a small gap-down, same plan" is A SMALL GAP DOES NOT RESCUE A SEATED CROWD;
  • his 25 Sep loss is already in v5l.

The one new idea is a split between two kinds of seated sellers:

  • sellers from one sudden fall would flee an adverse gap-up "in one or two candles", so that branch is not a hunt;
  • sellers seated through a multi-day fall that already retraced would stay huntable in every open.

Measured on five years of NIFTY spot 1-minute data, the gap-ups did the opposite:

prior session gap-ups median rise left after 09:16 mean net to 10:30 net up
one sudden fall 10 65.65 pts +6.59 60%
multi-day fall that retraced 21 37.00 pts −13.96 38%

The result held in five threshold variants. The samples are small and the definitions are rough stand-ins, so it doesn't prove the reverse either. But I wasn't willing to put a rule the data contradicts into a live prompt. The doc records the lecture, the idea and the measurement, plus a transcript workaround this video needed.

Test plan

  • test_v5n_the_second_seller_is_the_random_seller pins seven clauses, plus the SLH-020 wiring. Nine deliberate mutations of the rule were all caught, and a control rewording passes. The first mutation run found one phrase the test wasn't checking, so I tightened the test and re-ran the full set.
  • SLH-020, on stand-in workers (six tests):
    • the flat snapshot reports the close;
    • a same-side entry after a win still reaches the worker and carries the flag;
    • no flag for the opposite side, a losing close, a break-even close, a non-numeric P&L, or when nothing has closed today;
    • a broken hook changes nothing;
    • a cooldown-refused entry is refused exactly as before;
    • the tool descriptions name the fields.
  • SLH-020, on the real worker (three tests):
    • a mechanical AI_TARGET close is recorded with the basket's booked figure. An earlier P&L is already booked that day, so the running total can't pass for this trade's figure. The next same-side entry is flagged (cooldown off);
    • a losing close is recorded but never flagged;
    • a record from another session is never reported.
  • Nine deliberate code mutations were all caught, and a control passes.
  • Pre-open note: the note test was retargeted to 30 Sep. Seven deliberate mutations of the note were all caught (wrong date, un-flipped branches, each branch's reason, a stale BankNIFTY support, a garbled SENSEX support, yesterday's source id), and a control rewording passes. SL Hunting suite: 283 passed; pre-commit passes.
  • Full local gates, run after the 15:15 square-off: master suite 639 OK; market-data-health 28 OK; pytest 1701 passed; ruff, mypy (82 files) and compileall pass; bandit 0 findings; pre-commit passes. Coverage is left to CI, per CLAUDE.md. These gates ran before the two addenda, which change only the note, its test and the doc.

🤖 Generated with Claude Code

DoRmAmMu1997 and others added 2 commits September 29, 2026 15:00
29 Sep, the first session with v5m in the prompt (the runner started 09:14:46,
after #190 merged at 09:08). The note's flat -> SELL branch was right for both
books again. IH sold from 09:20 and booked at 09:30: "if a retracement comes
here it will not be small, because random sellers can come in, and when the
market removes them, sometimes the retracement is just as big."

The agent took the same first trade (09:22 -> 09:32, +6,246.75). At 10:00 its
own HOLD read was "that first leg already played out... consolidating in a
tight ~50pt range"; three minutes later it sold into that box on "declined
continuously... no major retracement" and was cut half an hour later with NIFTY
flat (-1,504.50). None of the day's 80 recorded decisions cited v5m. Day
+4,742.25.

v5n is a sub-bullet of MOVE-EXHAUSTION, right after v5m, giving it the
mechanism it lacked: the late seller on a follow day is IH's "random seller",
and whoever joins the same move a second time is that crowd. It carries IH's
counterweight too ("opportunity comes, in an hour or two, but at the right
place" -- said of his own late entry), so it does not read as "never re-enter".

RE-MEASURED with today's trade (36 after-win re-entries): -10,807.25, 39% win,
vs +33,714.25 over 43 after a loss. Both halves now negative (-9,312.50 /
-1,494.75), but the latest third is +139.50, dropping two sessions makes it
+1,414.75, and p = 0.056 before multiple-comparison correction. STILL NOT A
GATE. Offered in the doc instead (not built): state the earlier winning exit in
the order-tool response when the agent re-enters the same side -- the SLH-019
pattern, a fact at the tool boundary that refuses nothing.

Knowledge-only: no runtime change. Marker test pins seven clauses; nine
mutations all caught (the first run found an unpinned phrase and the test was
tightened), control passes.

Local checks (market still open, so the full suite was left to CI): ruff
clean; SL Hunting tests 277 passed; pre-commit passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-entry

Operator-approved addendum to v5n. On 2026-09-29 the agent booked a winning
short, called the leg "played out" at 10:00, and sold the same box at 10:02 --
with v5m in its prompt and cited nowhere. v5m/v5n measure that re-entry as the
weak trade, but not robustly enough to block it, so this REFUSES NOTHING: it
puts the earlier close in front of the model at the two moments that matter,
as a fact it cannot relabel away (the SLH-019 pattern).

  * SLHuntingAIWorker records the finished trade at
    _arm_post_exit_cooldown_if_flat -- the basket-flat transition every close
    path shares (agent EXIT, mechanical stop/target, max-loss, square-off,
    lone-mirror sweep): direction (taken at entry), closed_at (IST),
    booked_pnl (realized_pnl delta since entry, both legs -- SLH-019's basis)
    and nifty_when_flat (shared store ONLY, never a broker call on an exit
    path; omitted when absent). Recorded before the cooldown's early return,
    so SL_HUNTING_POST_EXIT_COOLDOWN_MINUTES=0 does not switch it off.
    last_closed_trade_today() returns it for the current session only.
  * MasterWorkerExecutor, duck-typed like the SLH-005 cooldown: position_state
    carries last_closed_trade_today while flat; an ACCEPTED entry on the same
    side as a close that booked a profit carries same_side_after_winning_exit
    and logs an "SLH-020:" INFO line so flagged entries can be counted later.
    A worker without the hook, or a failing hook, changes nothing.
  * The position_state and order-tool descriptions name both fields and say
    they refuse nothing; v5n names them too.

Nothing is refused that was not refused before: SLH-005/SLH-016 rejections are
unchanged, and the flag is added only after the order is accepted.

Tests: six on fakes (flat snapshot; flag on a same-side entry after a win,
which still reaches the worker; no flag for opposite side / losing / break-even
/ non-numeric / nothing closed; broken hook; cooldown refusal unchanged;
descriptions) and three on the REAL worker (a mechanical AI_TARGET close is
recorded with the basket's booked figure -- an earlier 250 of P&L seeded so the
running total cannot pass for it -- and flags the re-entry with the cooldown
off; a losing close records but never flags; another session's record is never
reported). Negative-tested with nine code mutations -- break-even counted as a
win, direction check dropped, flat snapshot omits it, hook failure uncontained,
record moved behind the cooldown's return, booked figure from the running
total, stale session reported, direction not captured, description loses the
field -- all caught; control passes. Plus a knowledge mutation on v5n's new
SLH-020 paragraph, caught.

Gates (run after the 15:15 square-off): master 639 OK; 28 market-data-health;
1701 pytest; ruff; mypy (82 files); compileall; bandit (0); pre-commit.
Coverage is left to CI, per CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DoRmAmMu1997 DoRmAmMu1997 changed the title feat(sl-hunting): v5n - the second seller is the random seller feat(sl-hunting): v5n + SLH-020 - the second seller is the random seller Sep 29, 2026
DoRmAmMu1997 and others added 2 commits September 30, 2026 07:25
Source: 'Prediction For 30 SEP 2026' (NrPmCbzrzSY, uploaded 2026-09-29 21:25
IST). Addendum to #192.

BRANCHES FLIPPED FROM 29 SEP. Selling on all three indices was matched by an
equal recovery, and the buyers that recovery drew in were already removed by a
retracement; NIFTY closed on a retracement at 22,680.90.
  flat / small gap down   BUY -- the recovery's buyers are retraced out and
                          the market is trying to go up again
  gap up                  SELL -- no sellers' stops sit above to fuel a rise,
                          and others may buy the gap reading it as positive

Levels (nearest first):
  NIFTY      R 22900 / 23000   S 22650 / 22560   (unchanged from 29 Sep)
  BANKNIFTY  R 54650 / 55000   S 54000 / 53790
  SENSEX     R 73130 / 73450   S 72000 / 71500
Two support pairs were garbled by the ASR and read off the 1080p frame:
BankNIFTY "5453 790" = 54,007.90 / 53,787.80, SENSEX "7271500" =
72,000.23 / 71,510.61.

No expiry today: NIFTY's weekly and BankNIFTY's monthly both expired 29 Sep.

Test retargeted (test_shipped_note_matches_september_30_intraday_hunter_plan);
negative-tested with seven mutations (date, un-flipped branches, each branch's
reason, a stale BankNIFTY support, a garbled SENSEX support, yesterday's source
id), all caught; control passes. 19 premarket tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v5n diligence addendum, doc only. IH's weekend lecture (dVCXZ1PXVYI, 13:32,
uploaded 2026-09-26 13:27 IST) was read in full, 106 segments.

Nearly all of it maps onto rules already written: his buyer chart is
RECRUITMENT HISTORY, NOT CHART SHAPE; "flat, gap-up, even a small gap-down,
same plan" is A SMALL GAP DOES NOT RESCUE A SEATED CROWD; his 25 Sep loss is
already in v5l (and the CSV bears out his "direction was still right": open
23,035.00, 15:15 close 23,128.10).

The one new idea is a split between two seller crowds. Sellers from ONE sudden
fall would flee an adverse gap-up "in one or two candles", so that branch is not
a hunt. Sellers seated through a multi-day fall that already retraced would stay
huntable in every open. Measured on five years of NIFTY spot 1-min, the gap-ups
did the opposite:
  after one sudden fall            10 gap-ups, median 65.65 pts still to rise
                                   after 09:16, mean net +6.59, 60% up
  after a retraced multi-day fall  21 gap-ups, median 37.00, net -13.96, 38% up
This held in five threshold variants. The samples are small and the definitions
are proxies, so it doesn't prove the reverse -- but a rule the data contradicts
does not go into a live prompt. No knowledge change, no test change.

Also records a transcript-extraction workaround: on this video the button opened
the old panel (get_transcript -> 400), and the modern panel opened directly via
ytd-app.resolveCommand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DoRmAmMu1997 DoRmAmMu1997 changed the title feat(sl-hunting): v5n + SLH-020 - the second seller is the random seller feat(sl-hunting): v5n + SLH-020 - the second seller is the random seller (+ 30 Sep note) Sep 30, 2026
@DoRmAmMu1997
DoRmAmMu1997 merged commit d3aff52 into main Sep 30, 2026
7 checks passed
@DoRmAmMu1997
DoRmAmMu1997 deleted the feat/sl-hunting-v5n branch September 30, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant