Repository navigation
feat(chart): show the core's manual entry price correction (MoonBot 7.73 N2) - #1489
Merged
Merged
Conversation
….73 N2) The core sends Event::EntryPriceCorrection when a manual entry price hit an exchange limit. The feed maps it to FeedMsg::EntryPriceCorrections, the per-core store keeps the latest notice per market, and the chart of that core and market draws the allowed range as a band, the requested price as a line with its caption, faded in 12 steps over 3 s. The look is decided once in moon_chart::entry_range and drawn through the existing order zone/line buffers, so DX11, Metal and wgpu share it. A one-shot panel timer drives the fade and the expiry, after which the chart needs no further wake. MOON_SYNTH_ENTRY_CORRECTION_EVERY_SEC injects corrections on the synthetic core.
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
MoonBot 7.73 N2 corrects a manual entry price that falls outside the exchange's limits, and reports it as
Event::EntryPriceCorrection(requested price, min and max; at most one per 2 s). The terminal shows it on the chart of that core and market, as MoonBot does: the allowed range as a band, the requested price as a line with its caption, faded out over 3 s.FeedMsg::EntryPriceCorrections; the per-core store keeps the latest notice per market and prunes stale ones.moon_chart::entry_rangedecides the look once (band, line, caption, 12 fade steps over 3 s) and every backend draws it through the existing order zone/line buffers, so DX11, Metal and wgpu share one copy.MOON_SYNTH_ENTRY_CORRECTION_EVERY_SECinjects corrections on the synthetic core (documented intools/README.md).Notable decisions
Known limitations
channels.render: idle 1 present / 0 bake per second; during the 3 s fade about 4–5 presents and bakes per second; back to 1 / 0 after it.Issues
None of the open issues tracks this.
How to verify
Local, after the rebase on
ecffeef09: fmt--checkexit 0, build--all-targetsexit 0, clippy--workspace --all-targets --locked -D warningszero warnings,cargo test --workspace10608 passed / 0 failed, doc-tests green.