webui: future-forecast mode with TradingView-style chart interaction#342
Open
rishab-bf wants to merge 1 commit into
Open
webui: future-forecast mode with TradingView-style chart interaction#342rishab-bf wants to merge 1 commit into
rishab-bf wants to merge 1 commit into
Conversation
Reworks the web UI prediction flow around forecasting forward from the latest data instead of backtest-window comparison: - Predictions always use the most recent 400 bars and forecast 120 bars beyond the end of the file. The forecast is anchored 2 trading days back so its first bars overlap known candles, giving users an immediate visual quality check before the true-future portion. - Future timestamps are session-aware: daily data advances over business days; intraday data stays inside the observed trading session and rolls to the next business day. - Forecast renders as blue/purple candlesticks, clearly distinct from the teal/red actual candles; a dotted divider marks where the forecast begins. - TradingView-style chart interaction: scroll-wheel zoom, drag to pan, double-click reset, and the price axis auto-fits the visible candles on every x-range change. - Non-trading time is removed from the axis via rangebreaks: weekends, holidays detected from gaps in the data, and overnight hours for intraday files. - Chart fills the viewport height; legend moved below the plot; the fixed time-window slider is hidden. - Server port is configurable via KRONOS_WEBUI_PORT (default 8090) for machines where 7070 is taken. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 changed
Reworks the web UI prediction flow around forecasting forward from the latest data, and makes the chart behave like a standard trading chart.
Forecasting
make_future_timestamps): daily data advances over business days; intraday data stays inside the observed session (e.g. 09:15-15:30) and rolls to the next business day.Chart
autoFitYrelayout handler).Misc
KRONOS_WEBUI_PORT(default 8090) for machines where 7070 is occupied; the Werkzeug reloader is disabled to avoid duplicate model loads.Why
The previous UI could only "re-predict the past" for comparison; there was no way to get an actual forward forecast from the latest bar, which is the primary thing users ask of the model. Tested end-to-end on NSE (Indian market) daily and 5-minute data.
Notes for reviewers
create_prediction_chartkeeps backward compatibility with the old backtest-window path (start_date), which the API still accepts.🤖 Generated with Claude Code