$ show AlexWan/OsEngine
OsEngine is a comprehensive, multi-exchange algorithmic trading platform for desktop (WPF/WinForms hybrid). It provides data downloading (OsData), backtesting (OsTester), walk-forward optimization (OsOptimizer), and live trading (OsTrader) with support for 30+ exchange connectors (MOEX, Binance, Bybit, OKX, Interactive Brokers, etc.). The platform includes a built-in technical indicator library (100+ indicators), a trading robot framework with attribute-based registration, and an MCP (Model Context Protocol) API for external AI/automation control. The architecture is modular: separate executables for different modes, a common server abstraction layer, and a consistent parameter system for bots and indicators. While the codebase is large and well-organized, it suffers from significant duplication across exchange connector entity classes and some copy-paste logic in trading robots. The UI mixes WPF and Windows Forms, and some patterns are legacy. Overall, it is a production-grade algorithmic trading platform with strong engineering practices and a rich feature set.
The LLM identified 4 files worth highlighting for reuse:
A generic, thread-safe rate limiter using a semaphore and a timer-based queue. It allows a configurable number of operations per time unit and blocks callers when the limit is exceeded. The implementation is self-contained (no internal dependencies) and can be extracted into any .NET project requiring API throttling. It demonstrates non-obvious skill in concurrent resource management.
Custom binary reader for efficient deserialization of time-series data (candles, ticks). It uses variable-length integer encoding (LEB128) and delta compression to minimize storage. The reader is paired with DataBinaryWriter and supports multiple stream types (candles, trades, market depth). This component is isolated (only uses System.IO) and could be reused in any project needing compact binary storage for sequential data. It demonstrates strong data engineering skill.
A collection of extension methods for common technical analysis calculations: Highest, Lowest, Summ, Average, GetPoint (linear interpolation), and others. These operate on List<decimal> and are used across all indicators. The class is self-contained (no internal imports beyond System.Collections.Generic and System.Linq) and can be extracted as a standalone utility library for any C# project requiring financial math helpers. It demonstrates clean, reusable utility design.
A standalone class for computing Pearson correlation coefficients between two time series. It handles edge cases (constant series, insufficient data) and returns both the coefficient and p-value. The implementation is isolated (no internal dependencies) and can be extracted into any .NET project needing statistical correlation. It demonstrates solid statistical programming and attention to numerical stability.