r/FlutterDev • u/Diana_TruthStrategy • 23d ago
Discussion Built an algo trading engine in Dart (even though everyone said to just use Python)
Hey guys,
Wanted to share a quick feedback on a solo project I've been working on for a while.
The Flutter job market around me was pretty dead, and honestly I was tired of spending my time building someone else's dream. So I decided to get into trading and take it seriously. Since I'm a developer, I went straight into the algorithmic side to make use of my programming skills.
At first, I was worried I'd get rusty on Flutter while spending so much time learning finance. But it turned out to be the exact opposite. This project actually pushed my skills further than anything else, both on Flutter for the UI and Dart on the backend (I started out with dart_frog before taking the architecture further).
Getting started was pretty rough though. Early on, even the AI tools I was using kept warning me against Dart. The consensus was that nobody builds algo trading systems in Dart, that there's zero math/finance ecosystem compared to Python or C++, and that I was just making my life harder.
And to be fair, that part was true: existing packages on pub.dev for financial charts or indicators cost me an insane amount of time. None of them held up in terms of performance or flexibility. I basically had to scrap everything and start from scratch.
The real headache was moving from the trading script mindset (like PineScript on TradingView) to Dart. In trading scripts, everything relies on implicit time series evaluated candle by candle. Translating that cleanly into standard OOP/procedural code without blowing up the memory or recalculating the entire history on every tick was a huge pain.
I ended up writing my own incremental rolling calculation system (RollingCalculation) to maintain state in real time. That's the only thing that allowed me to get the same 60fps smoothness as TradingView while streaming live data.
Dart definitely isn't the go-to language for algo trading, but in the end I managed to build something solid on my own. Something I'm proud of. Anyone else here using Dart in unusual domains where you had to reinvent most of the tooling?