ProEssentials v10 WinForms .NET 8 — a complete financial charting app built
on Pego (the categorical / date-axis graph object): OHLC candlesticks for ten
real stock symbols with Bollinger Bands, RSI, a custom stochastic oscillator,
and Buy/Sell signal annotations generated from stochastic turning points.
Direct2D, four synchronized multi-axes.
- OHLC candlesticks via
SpecificPlotMode.BoxPlotwith real CSV stock data (MSFT, AAPL, AMD, AMZN, CSCO, META, NFLX, QCOM, SBUX, TSLA). - Technical studies computed in
StockPriceLoader.cs: 20-day Bollinger Bands (Upper / SMA / Lower), 10-day RSI, and a custom stochastic oscillator (30-day window, 15-day D-period). - Buy/Sell signal generation — turning-point detection on the Slow %D with a 7-point lookahead, a −6.0 slope threshold, and a 60 overbought floor. The tuned signals are the kind of feature you could feed to an AI/ML model.
- Four synchronized axes — Price 70%, Volume 10%, RSI 10%, Stochastic 10% — with drag-to-resize dividers.
- Interactive table annotations — a clickable portfolio selector panel plus
a live OHLCV readout updated on mouse hover (
DrawTable) and arrow-key cursor navigation after clicking a candlestick. - Date/time axis with serial OADate handling and automatic skipping of non-trading days.
- Code-built UI — the form is constructed entirely in C# (no
.Designer.cs, no.resx); the chart fills the window.
This is the WinForms sibling of the WPF Financial OHLC example. The ProEssentials chart configuration is identical between the two — only the host shell differs. Specifics of the port:
- WPF
PegoWpf→ WinFormsPego; event-handler delegate types adjust accordingly (Pego.DataHotSpotEventHandler, etc.). - WPF
Pego1.Loadedinitialization → idiomaticMainForm_Load. Cursor.LastMouseMovereturns aSystem.Drawing.Pointon WinForms (it was aSystem.Windows.Pointon WPF), so the tooltip handler usesvarand drops the(int)casts WPF needed — see the note inPego1_PeCustomTrackingDataText.- The single WPF-only line,
IsManipulationEnabled(WPF touch pinch/pan opt-in), has no WinForms equivalent on the control and is omitted; mouse-wheel zoom and middle-drag pan are unchanged. - CSV paths resolve against the executable folder (
AppContext.BaseDirectory).
➡️ WPF version: wpf-chart-financial-ohlc-trading-signals-proessentials
The ten *.csv files (≈65 KB each) are bundled and copied next to the
executable on build. CSV format: Date, Close, Volume, Open, High, Low.
- Visual Studio 2022
- .NET 8 SDK (Windows)
- Internet connection for NuGet restore
- x64
- Clone this repository
- Open
FinancialOhlcChart.slnin Visual Studio 2022 - Build → Rebuild Solution (restores the NuGet package automatically)
- Press F5
- Click a symbol in the left panel to switch; hover candlesticks for the live OHLCV readout; click a candle then use arrow keys to step through points
Designer note: This project has no
.Designer.csfile by design — the UI is built in code inMainForm.cs. There is nothing for the WinForms designer to open, which avoids the native-control designer issues entirely.
References ProEssentials.Chart.Net80.x64.Winforms
from nuget.org. Package restore happens automatically on build.
Example code is MIT licensed. ProEssentials requires a commercial license for continued use.
