Repository navigation
TradingChart 0.1.0
The first release of TradingChart — a native SwiftUI trading chart for iOS built on Swift Charts.
Highlights
- Styles: line, area and candlesticks, switchable at runtime, with an optional on-chart style picker.
- Indicators: SMA, EMA, WMA, Bollinger Bands (overlays) and Volume, RSI, MACD (panes that scroll with the price), verified against TA-Lib. Add your own with the
ChartIndicatorprotocol, toggle them with the Binance-styleIndicatorBar. - Interaction: inertial one-finger scrolling, pinch zoom, long-press crosshair with an OHLC tooltip, a smooth price axis that follows the visible bars on every frame, high/low markers and a current-price badge on the axis.
- Live data and history: candle or tick updates with an interval gate, a sticky live edge, and history paging (
approachedHistoryStart+prependHistory) without jumps. - Drawing tools: horizontal line, trend line and ray — create, select, drag, delete;
Codabledrawings; custom tools throughDrawingTool. - Customization: themes, price/time formatters, configuration, VoiceOver support and localization into 14 languages (including Arabic).
Requirements
- Chart UI: iOS 17+.
TradingChartCore/TradingChartIndicators: iOS 16+ — the package can be added to apps that target iOS 16 (gate the chart withif #available(iOS 17, *)). - Swift 6, Xcode 16 or later.
Installation
.package(url: "https://github.com/pavellunev/trading_chart.git", .upToNextMinor(from: "0.1.0"))See the README, the DocC catalogs and Docs/Architecture.md for details.