Add pixel-stride downsampling or MA smoothing to FX line chart

Table of Contents

This page is a capture in the deferred bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.

What

`FxSpotChartWindow` in line mode plots every raw sample at 5 s intervals; over a 40-minute window this produces ~480 points and the line appears heavily aliased and jagged. Add an optional smoothing pass in `refreshLine()`: either a simple N-point moving average applied before `lineSeries_->replace()`, or a pixel-stride downsample that keeps only one point per screen pixel column. Both can be exposed as a toolbar toggle ("Smooth") defaulting to off, so quantitative users who need the raw series can disable it. The moving-average approach is simpler to implement; the pixel-stride approach is more correct for zoom.

Why

User feedback (Gemini review 2026-07-02): "With a 5s interval over a 40-minute span, the line is heavily aliased and jagged … a light moving average smoothing or pixel-stride downsampling would make the macro trend much cleaner to read." The current `k_max_line_points = 2000` cap limits memory but does not improve visual clarity.

References

  • `projects/ores.qt/mktdata/src/FxSpotChartWindow.cpp:573-616` — `refreshLine()`
  • `k_max_line_points = 2000` cap (line 59)

See also

Emacs 29.3 (Org mode 9.6.15)