Trading Bot Deal Statistics in Mobile App
Trade history without analytics is just a log. Trading bot statistics answer the questions: which strategy is profitable, on which timeframe, with what win rate, and where does the bot lose the most money.
Metrics Traders Need
Key indicators without which statistics are meaningless:
- Total PnL (realized)—total income/loss on all closed positions
- Win Rate—proportion of profitable trades
- Profit Factor—sum of all profitable trades / sum of all losing trades (> 1.5 is acceptable)
- Max Drawdown—maximum balance decline from peak to bottom in %
- Average RR—average risk/reward ratio
- Sharpe Ratio—optional, for advanced users
These metrics are computed on the backend from raw trade data and delivered via API. The mobile app displays them, not computes them.
Main Screens
Statistics dashboard. Summary cards: Total PnL for period, Win Rate, number of trades. Cumulative PnL chart over time—rising curve (or not). Period—7d / 30d / All, switched with one tap.
// iOS, SwiftUI — period picker and data loading
struct StatsDashboard: View {
@StateObject private var viewModel = StatsDashboardViewModel()
var body: some View {
VStack {
Picker("Period", selection: $viewModel.period) {
Text("7d").tag(StatsPeriod.week)
Text("30d").tag(StatsPeriod.month)
Text("All").tag(StatsPeriod.all)
}
.pickerStyle(.segmented)
.onChange(of: viewModel.period) { _ in
Task { await viewModel.reload() }
}
switch viewModel.state {
case .loading: ProgressView()
case .loaded(let stats):
PnLChart(dataPoints: stats.cumulativePnl)
StatsGrid(stats: stats)
case .error(let msg): ErrorView(message: msg)
}
}
.task { await viewModel.reload() }
}
}
Cumulative PnL chart—line, X axis is time, Y axis is accumulated PnL in USDT. Line color: green for positive result, red for negative. Tap on point—shows date and PnL value.
Trade history. Paginated list (cursor-based, not offset—data volume can be large). Each record: pair, side, size, PnL, date. Filter by pair, by side (long/short), by result (profit/loss). Sort by date or by PnL size.
On Android LazyColumn with Pager (Jetpack Paging 3). Loads pages of 50 records on scroll:
val deals = botRepository.getDeals(botId, filter)
.cachedIn(viewModelScope)
.collectAsLazyPagingItems()
LazyColumn {
items(deals, key = { it.id }) { deal ->
DealRow(deal = deal)
}
item {
if (deals.loadState.append is LoadState.Loading) {
CircularProgressIndicator()
}
}
}
Strategy Comparison
If the bot supports multiple strategies or trading pairs, a comparison screen is useful: a table where rows are strategies/pairs, columns are Win Rate, PnL, number of trades. You immediately see what works.
| Pair | Trades | Win Rate | PnL | Profit Factor |
|---|---|---|---|---|
| BTC/USDT | 142 | 58% | +1240 USDT | 1.82 |
| ETH/USDT | 98 | 51% | +320 USDT | 1.31 |
| SOL/USDT | 67 | 44% | −180 USDT | 0.87 |
Such a table is built from aggregated API data and rendered via DataTable (Flutter) or UICollectionView with compositional layout (iOS).
What's Included
- Dashboard with summary metrics and cumulative PnL chart
- Period switcher (7d/30d/All)
- Trade history with pagination, filters, and sorting
- Comparison table by pairs/strategies
- Export history to CSV
Timeline
5–7 business days. Cost is calculated individually after requirements analysis.







