DCA Bot (Dollar Cost Averaging) Mobile App
A DCA bot buys an asset at fixed intervals for a fixed amount: every Monday at 10:00—$50 in BTC, regardless of price. The strategy is simple, but the mobile interface to manage it requires precise work with schedules, purchase history, and current position.
DCA Strategy Configuration
User sets several parameters:
- Asset and exchange—BTC/USDT on Binance
- Order amount—$50 per order
- Interval—every 7 days / every 24 hours / every N hours
- First purchase—immediately or by schedule
- Average price limit (optional)—don't buy if price exceeds $X
Interval is convenient to set via picker with presets (1h / 4h / 12h / 24h / 7d / 30d) plus custom value option. On backend this becomes a cron expression or scheduled job with execute_at.
// Flutter — interval selection
enum DcaInterval {
oneHour('1h', Duration(hours: 1)),
fourHours('4h', Duration(hours: 4)),
oneDay('24h', Duration(hours: 24)),
oneWeek('7d', Duration(days: 7));
const DcaInterval(this.label, this.duration);
final String label;
final Duration duration;
}
// Segment control or ChoiceChip
Wrap(
spacing: 8,
children: DcaInterval.values.map((interval) => ChoiceChip(
label: Text(interval.label),
selected: selectedInterval == interval,
onSelected: (_) => setState(() => selectedInterval = interval),
)).toList(),
)
Current Position and Statistics
Main DCA bot screen shows how position accumulates:
- Average entry price—weighted average of all purchases
- Current price—actual, from exchange or price API
- Unrealized PnL—difference between current price and average entry price, multiplied by volume
- Next purchase—countdown to next execution
Average entry price is computed on backend and stored in the bot model. Don't trust the client to calculate it—discrepancies from commissions, partial fills, and rounding.
Purchase History
List of all executed orders: date, execution price, asset quantity, USD amount. It's visually useful to overlay purchase points on the asset's price chart—user sees that some purchases fell on local lows. This exactly demonstrates DCA's essence.
On Flutter: fl_chart LineChart with BTC price as line and custom FlSpot markers for each DCA purchase.
LineChartBarData(
spots: priceHistory.map((p) => FlSpot(p.timestamp.toDouble(), p.price)).toList(),
isCurved: true,
color: Colors.blue,
dotData: FlDotData(
show: true,
checkToShowDot: (spot, barData) => dcaPurchaseDates.contains(spot.x),
getDotPainter: (spot, percent, barData, index) => FlDotCirclePainter(
radius: 5,
color: Colors.green,
),
),
)
Stop Conditions
DCA bot doesn't run forever—need stop conditions:
- Maximum number of purchases reached (for example, 52 purchases = one year of weekly DCA)
- Maximum asset quantity accumulated
- Target PnL reached (for example, +30% on position—lock in)
These conditions are set in settings and displayed as "progress to goal": 12 of 52 purchases, 0.18 of 0.5 BTC accumulated.
What's Included
- DCA strategy creation form with interval and stop condition selection
- Dashboard: average entry price, current PnL, countdown to next purchase
- Price chart with marked purchase points
- Order history with pagination
- Push on every order execution
Timeline
4–6 business days. Cost is calculated individually after requirements analysis.







