Skip to content

Switch WPF trade viewer charts to ScottPlot - #2

Open
sanchoflat wants to merge 1 commit into
mainfrom
codex/create-wpf-project-with-scichart-y8irmw
Open

sanchoflat wants to merge 1 commit into
mainfrom
codex/create-wpf-project-with-scichart-y8irmw

Conversation

@sanchoflat

Copy link
Copy Markdown
Owner

Motivation

  • Replace the previous SciChart-based WPF chart implementation with ScottPlot as requested to provide a ScottPlot-based port of the trade viewer UI and rendering logic.

Description

  • Replace SciChart surfaces with ScottPlot.WPF.WpfPlot controls in TradeViewer/MainWindow.xaml and remove SciChart license wiring by simplifying TradeViewer/App.xaml.cs/App.xaml.
  • Reimplement plotting logic in TradeViewer/MainWindow.xaml.cs using ScottPlot APIs including ConfigurePlots, ApplyPlotStyle, AddPriceSeries, AddOrderSeries, AddTradeSeries, AddSpreadSeries, AddBorderSeries, SyncXAxisLimits, and helper AddLineSeries to render lines and scatter series.
  • Update project package reference to ScottPlot.WPF in TradeViewer/TradeViewer.csproj and update README.md to reflect ScottPlot usage and run instructions (dotnet restore / dotnet run).
  • Keep the parser and model types (TradeViewer/Parsing/LogParser.cs and TradeViewer/Models/ParsedData.cs) and wire them into the ScottPlot-based UI unchanged from their parsing behavior.

Testing

  • No automated tests were executed in this environment.
  • The change was committed locally but no CI/build or automated verification was run here.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3478fff42b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

activeOrdersById.Remove(target.OrderId);
}

activeSlots.Remove((target.Symbol, target.Side));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid removing current slot when closing a stale order

If a new order replaces an old one for the same (symbol, side) slot, a late Filled/Cancelled event for the old order will still be found by orderId, but this unconditional activeSlots.Remove((target.Symbol, target.Side)) will drop the current active order as well. That means the new order disappears from tracking and never gets its end-time/FinalStatus, so it won’t be plotted (or may be prematurely closed). The Python logic only removes the slot if it still points to the same order; this code needs a similar guard to avoid clearing a newer active order.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant