SentinelTrend β Algorithmic Trading Desktop App (Rust + Tauri + Alpaca)
A production-grade desktop trading application for US equities, built on
Tauri 1.x (Rust backend + JavaScript frontend) with full
Alpaca brokerage integration. ~67,000 lines of code.
What this is: a well-architected, batteries-included **trading engine
and infrastructure**. It ships with example strategies, but its value is the
engine β robust order execution, risk controls, live market data, scanning,
and charting. Bring your own strategy. Released 100% FREE & OPEN-SOURCE (MIT) strictly AS-IS, without warranty, without liability, and without technical support.
Highlights
- Full Alpaca integration β REST + live WebSocket (minute bars, quotes,
trade-update stream). Paper and live modes.
- Robust order execution β bracket orders (entry + stop-loss + take-profit),
deterministic client-order-id idempotency, retry on 5xx, partial-fill
handling, broker-side position reconciliation.
- Risk engine β tiered circuit breakers (caution / halt / panic), daily
P&L reset on the ET trading day, equity sync, per-trade loss caps,
liquidate-all and emergency-flat hotkeys.
- Cash/wallet bookkeeping β internal ledger reconciled to broker cash via
startup sync + periodic heartbeat.
- Market scanner β full US equity universe, configurable prefilter
(price / volume / RVOL / gap / change), composite scoring, catalyst/news
pipeline, auto-promotion of movers to a live watchlist.
- Real-time charting β TradingView Lightweight-Charts, multi-timeframe
(1m β 1D), buy/sell signal markers, volume pane, custom HUD UI.
- Pluggable multi-strategy framework β register strategies behind a common
trait; 8 example strategies included (gap fade, catalyst, pair/stat-arb,
leveraged-ETF mean reversion, etc.).
- SQLite trade journal + CSV export with per-strategy attribution.
- Cross-platform β Linux / Windows / macOS via Tauri.
Architecture
Frontend (ES Modules) Backend (Rust / Tauri 1.x)
βββββββββββββββββββββ ββββββββββββββββββββββββ
index.html main.rs ............ app setup, async loops
modules/ state.rs ........... ordered mutexes
core.js ......... boot smarttrend/ ........ engine + strategies
chart.js ........ candles sentinel/ ........ eval + dispatch loop
positions.js .... pos table strategies/ ...... pluggable strategies
discovery.js .... scanner UI bot/ ............. entry/exit/gates
smarttrend.js ... engine UI market/ ............ WS stream, scanner,
journal.js ...... trade log indicators, catalyst
config.js ....... settings execution/ ......... orders, fills, recon
styles/hud.css .... HUD theme risk/ .............. breaker, equity sync
ops/ ............... persistence, journal
crates/ ............ titan-indicators,
titan-risk, titan-types
Mutex lock ordering (enforced to prevent deadlocks):
config β market β smarttrend β trading β risk β journal β system
Build
Prerequisites: Rust 1.75+, Node not required (vanilla JS frontend),
Tauri 1.x system dependencies (e.g. webkit2gtk, libsoup on Linux).
# Development build
cd src-tauri && cargo build
# Optimized release build
./build.sh
# Binary: src-tauri/target/release/sentinel-trend
Run tests:
cd src-tauri
cargo test --workspace
cargo clippy --workspace -- -D warnings
Configuration
On first run, settings are created at
~/.config/sentinel-trend/settings.json.
Add your own Alpaca API keys (no keys are bundled):
{
"market": {
"alpaca_key_id": "YOUR_KEY",
"alpaca_secret": "YOUR_SECRET",
"paper_mode": true,
"sip_feed": false
}
}
Optional: a Financial Modeling Prep (FMP) key enables earnings/float data in
the scanner.
Start in paper mode (paper_mode: true) until you have validated your own
strategy configuration.
What's included / not included
Included: complete source (Rust backend + JS frontend), build scripts,
unit tests, this documentation.
Not included: API keys, any live account credentials, historical trade
data, or a profitable strategy. The bundled strategies are examples for
the framework and are not represented as profitable.
πΌοΈ UI Reference Screenshots (Compiled Desktop Confirmation)
Illustrative engineering confirmation only (virtual PAPER mode) β showing the compiled Rust + Tauri v1 desktop HUD; not financial advice or a performance claim.
- π Full Interactive UI Gallery: https://bot-tradingsoftware.com/#screenshots
β€οΈ Support ("Good Samaritans") & Disclaimer
SentinelTrend is released free of charge under the MIT License. If this ~67,000-LOC Rust/Tauri trading infrastructure helps you in your own personal projects, voluntary donations from "good samaritans" are welcome at:
- β Ko-fi ($1+ Voluntary Tip, 0% platform fee): https://ko-fi.com/quantbotsoftware
- π Open-Source Hub & Donations: https://bot-tradingsoftware.com/#donate
Strictly AS-IS / Zero Warranty / Zero Support: Not financial advice. Trading involves substantial risk of loss. No API keys included. Donations are non-refundable gifts and do not purchase support, consulting, or warranties. See DISCLAIMER.md.
Additional Documentation: Extended Romanian architecture & strategy manuals may be shared upon polite request if available, strictly AS-IS and without support.
Third-Party Notices: src/lightweight-charts.js is TradingView Lightweight Chartsβ’ (Apache-2.0) β see LICENSES/Apache-2.0.txt and LICENSES/NOTICE-lightweight-charts.txt.
β Continuous Integration
Every push to main runs cargo test --workspace --locked β 1,740 unit + integration tests (strategy engine & FSM, adversarial execution cases, order flow, P&L decimal parity, snapshots, daily reset, concurrent-lock integration, titan_frontier crate) on Ubuntu 22.04 with the Tauri v1 toolchain (Rust pinned to 1.93.0 β see rust-toolchain.toml), plus ES-module syntax validation of all 51 frontend modules.
Workflow: .github/workflows/ci.yml Β· runs: https://github.com/quantbotsoftware/sentinel-trend/actions. No secrets, no broker or network calls, no telemetry β fork it and the same checks run for you.
π Paper-Trading Track Record (real numbers, losses included)
Real, unedited results of this bot on an Alpaca paper account, 2026-05-26 β 2026-10-29: 118 closed trades, net -2,046.69 USD, win rate 35.6%, profit factor 0.71, max drawdown -4,177.82 USD. Yes, that is a loss β it is published in full, with every trade in sentinel_paper_trades.csv, because the alternative (hiding it) is how this industry usually works.
- π¬π§ SENTINEL_PAPER_TRACK_RECORD.md Β· π·π΄ SENTINEL_PAPER_TRACK_RECORD_RO.md
- Online: https://bot-tradingsoftware.com/#track-record
Paper trading β live trading. Simulated fills are optimistic. Nothing here is financial advice or a performance claim.


