fix(trade-window): drop candles under the tick replay, 65 s margin - #735
Merged
Merged
Conversation
A one-minute bar that only partly overlaps the prints stays whole, so a short trade draws two candles across the ticks. The draw list now keeps only the uncovered pieces of each bar, and a gap the walk did not cover still gets its bar. A stub carries its own width, and a narrower width is no longer muted as a coarse timeframe.
The default was 30 s, and 65 was not a step, so choosing 65 snapped away. 65 is now the default and a step. 30 stays the floor, so a file that already stores 30 keeps it and a file with no margin key takes 65. The stepper labels any step that is not a whole minute in seconds, which keeps 65 s distinct from 60 s.
guyverino
added a commit
that referenced
this pull request
Sep 26, 2026
… search entry and exit fields (#738) A new Entry/Exit axis on Analytics -> Strategy tuning: every closed trade is replayed on its recorded tape of prints under the strategy's own entry and exit rules, and the entry and exit fields are searched on the trades the model reproduces. - moon-core db/tuner/ticks: tape-replay model (MoonShot corridor entry, MoonHook take, sell line, stops incl. book-watching and trailing, delta modifiers, shorts), verdict against the report and the order archive, nested entry/exit search, one field descriptor for grid, search and save. - Tape: background fetch job with lanes and clusters, optional startup autoload, the core's ring filed into the tiles, Gate futures walked by time and id. - UI analytics/tuner/ticks: deal table, grid by the Strategies window's sections, variants, the selected deal's pane, model accuracy, run estimate; a group under the reproduction share warns instead of being locked out. - Storage tab: tape margin in seconds on a step list (kept with #735's 65 s default), long-position threshold, tape cleanup, autoload switch. - Clippy findings on the added lines cleared; PRODUCT_MAP lists the axis.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The trade window (double-click a Report row) draws the trade's tick replay over one-minute bar
context. The one-minute candles were also drawn across the stretch the ticks cover, so on a
short trade two big candles sat right on top of the prints.
wholly covered by ticks drops out, a minute outside keeps the series width, and a gap the
tick walk did not cover keeps its bar, so there is never an empty hole.
its own width. The candle shaders (HLSL, Metal, WGSL) now mute only a bar WIDER than the series
timeframe, so a narrower stub keeps the series colour; the main chart only ever emits wider
coarse bars, so it is unchanged.
tab. A settings file that already stores a margin keeps it.
How to verify
cargo test -p moon-core trade_replayandcargo test -p moon-core storage::testscargo test -p moon-ui-gpui --bin moonterminal trade_windowand--test theme_contractdrawn under the ticks, the edges show candles.