Skip to content

Open trades: where each running trade stands between its stop and its target - #124

Merged
yanivil merged 1 commit into
mainfrom
feat/site-open-trades
Sep 17, 2026
Merged

yanivil merged 1 commit into
mainfrom
feat/site-open-trades

Conversation

@yanivil

@yanivil yanivil commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Summary

You bought MO on the signal and could not see on the page whether the trade had reached its take profit or its stop loss. It was in the results table as one row among the closed ones. Now it has a section of its own.

3. Open trades. Every signal bought and not yet resolved: bought at (and when), stop loss, take profit, last close (and when), gain or loss so far, days held, and a bar with the stop loss at the red end, the take profit at the green end, the buy price as a tick and the last close as the blue dot. One sentence above it says when a trade leaves: the morning after its low touches the stop, its high touches the target, or 60 sessions pass. A signal from the last scan shows as "Pending, at the next open". The instruction in section 1 now ends with "Once you are in, follow the trade in section 3."

4. Closed trades: were we right? Unchanged apart from the number and a tally over resolved trades only.

Fix in the evaluator. Today's live build, at 06:09 UTC, showed MO "bought at 69.84 on 2026-09-17", hours before the US session opened: Yahoo's chart already carried a partial row for the day. tools/evaluate_signals.py now ignores bars dated on the run's own UTC day before 21:00 UTC and rows without a full OHLC, so a signal reported in the morning stays pending until the next run, when yesterday's open, its fill, is final. Tests cover the cutoff before and after the close and a half-written row.

Checked in the browser with today's live data: four open trades with their bars, three closed.

Test plan

  • ruff clean, 154 tests pass locally
  • built from today's live data and reviewed at desktop width
  • tests workflow on this PR
  • tomorrow's build: MO's fill is the 2026-09-17 open, recorded once that session is complete

🤖 Generated with Claude Code

… ignores the session in progress

Section 3, Open trades: every signal bought and not yet resolved, with bought
at and when, stop loss, take profit, last close, gain or loss so far, days
held, and a bar showing where the last close stands between the stop loss
and the take profit with the buy price as a tick; the closed trades become
section 4 with the tally over resolved trades only, and the instruction in
section 1 points a reader who is in to section 3.

tools/evaluate_signals.py ignores bars dated on the run's own UTC day before
21:00 UTC and rows without a full OHLC: the 06:00 UTC build had scored
Yahoo's partial row for a session that had not opened. Tests, wiki 01 and
04, README, changelog.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@yanivil
yanivil merged commit e0164a6 into main Sep 17, 2026
7 of 8 checks passed
@yanivil
yanivil deleted the feat/site-open-trades branch September 17, 2026 18:11
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