{"id":49045341,"url":"https://github.com/nathanssantos/marketmind","last_synced_at":"2026-05-21T22:01:02.589Z","repository":{"id":349189840,"uuid":"1096789896","full_name":"nathanssantos/marketmind","owner":"nathanssantos","description":"Open-source algorithmic trading desktop app with advanced chart visualization, automated setup detection, and multi-exchange support","archived":false,"fork":false,"pushed_at":"2026-05-19T00:23:47.000Z","size":81452,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-05-19T02:16:43.342Z","etag":null,"topics":["auto-trading","backtesting","binance","candlestick","charts","crypto","cryptocurrency","desktop","electron","futures","indicators","interactive-brokers","klines","react","stocks","technical-analysis","trading","typescript"],"latest_commit_sha":null,"homepage":"https://marketmind-app.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nathanssantos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-15T00:31:04.000Z","updated_at":"2026-05-19T00:15:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"acbd8a8b-4fd2-49e2-b4cb-89b254643cf9","html_url":"https://github.com/nathanssantos/marketmind","commit_stats":null,"previous_names":["nathanssantos/marketmind"],"tags_count":169,"template":false,"template_full_name":null,"purl":"pkg:github/nathanssantos/marketmind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanssantos%2Fmarketmind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanssantos%2Fmarketmind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanssantos%2Fmarketmind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanssantos%2Fmarketmind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nathanssantos","download_url":"https://codeload.github.com/nathanssantos/marketmind/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanssantos%2Fmarketmind/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33316518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"ssl_error","status_checked_at":"2026-05-21T12:22:11.673Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-trading","backtesting","binance","candlestick","charts","crypto","cryptocurrency","desktop","electron","futures","indicators","interactive-brokers","klines","react","stocks","technical-analysis","trading","typescript"],"created_at":"2026-04-19T16:05:41.792Z","updated_at":"2026-05-21T22:01:02.581Z","avatar_url":"https://github.com/nathanssantos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MarketMind\n\n\u003e Algorithmic trading assistant with advanced chart visualization and automated setup detection\n\n\u003cdiv align=\"center\"\u003e\n\n![Version](https://img.shields.io/badge/version-1.23.0-blue.svg)\n![Tests](https://img.shields.io/badge/tests-8,500%2B%20passing-brightgreen.svg)\n![License](https://img.shields.io/badge/license-MIT-green.svg)\n![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Windows-lightgrey.svg)\n![i18n](https://img.shields.io/badge/i18n-EN%20%7C%20PT%20%7C%20ES%20%7C%20FR-success.svg)\n\n**[Website](https://marketmind-app.vercel.app)** | **[Documentation](./docs/)** | **[Download](https://github.com/nathanssantos/marketmind/releases)**\n\n\u003c/div\u003e\n\n## About the Project\n\n**MarketMind** is a desktop application developed in Electron that combines advanced financial chart visualization (klines) with algorithmic setup detection. The goal is to provide automated trading insights on cryptocurrencies through mathematical pattern recognition and backtested strategies.\n\nVisit the **[landing page](https://marketmind-app.vercel.app)** for a full overview of features, tech stack, and screenshots.\n\n### Key Features\n\n#### Chart Visualization\n- **Kline Charts**: High-performance Canvas rendering with zoom and pan\n- **35+ Technical Indicators**: RSI, MACD, Bollinger Bands, Stochastic, ADX, and more (powered by PineTS)\n- **Volume Profile**: Price-level volume distribution with POC, Value Area, and buy/sell separation\n- **Liquidity Heatmap**: Real-time order book depth visualization with thermal overlay\n- **Opening Range Breakout**: Built-in ORB indicator with configurable session boundaries\n- **Volume Analysis**: Volume bars synchronized with klines\n- **Moving Averages**: SMA, EMA, WMA, DEMA, TEMA (all periods configurable)\n- **Drawing Tools**: Lines, arrows, Fibonacci, positions, ruler, and more\n- **Grid System**: Dynamic grid with price and time labels\n- **Smart Tooltip**: Hover to see OHLCV data with intelligent positioning\n\n#### Trading Strategies (17 Setups)\n- **Larry Williams Suite**: Setup 9.1, 9.2, 9.3, 9.4 (EMA9-based reversals and pullbacks)\n- **Momentum Strategies**: Williams Momentum, TEMA Momentum, PPO Momentum\n- **Breakout Strategies**: Keltner Breakout, Bollinger Breakout, Momentum Breakout 2025\n- **Trend Following**: Supertrend Follow, Parabolic SAR Crypto\n- **Oscillator-Based**: Elder Ray Crypto, Stochastic Double Touch, Percent-B Connors\n- **Reversal Patterns**: Triple Confirmation Reversal, Momentum Rotation\n\n#### Auto-Trading System\n- **Algorithmic Execution**: Automated trade execution with OCO orders\n- **Risk Management**: Configurable stop-loss, take-profit, position sizing\n- **Trend Filter**: EMA-based trend detection (optional counter-trend blocking)\n- **Setup Cooldown**: Prevents duplicate detections\n- **Real-time Monitoring**: WebSocket live updates from Binance\n\n#### Exchange Stream Resilience\n- **Watchdog + Forced Reconnect**: Detects silent Binance WS stream degradation (frame silence \u003e 60s) and forces reconnect per subscription\n- **Synthesized Klines**: When aggregated streams (`@kline`, `@aggTrade`, `@markPrice`) stop emitting but `@trade` stays alive, constructs OHLCV candles in real time from trade ticks so the chart never freezes during partial outages\n- **Degradation Indicator**: Pulsing dot in each chart's header panel shows when its stream is degraded, with tooltip explaining the status; hides automatically on recovery\n\n#### Backtesting Engine\n- **Historical Testing**: Test strategies on historical data\n- **Walk-Forward Optimization**: Parameter optimization with out-of-sample validation\n- **Monte Carlo Simulation**: Statistical analysis of strategy robustness\n- **Batch Backtesting**: Test multiple strategies across symbols and timeframes\n- **Performance Metrics**: Win rate, profit factor, Sharpe ratio, max drawdown\n\n#### Market Analysis\n- **Screener \u0026 Scanners** _(beta)_: Market-wide screening with customizable filters and real-time setup detection\n- **Custom Symbols** _(beta)_: Compose user-defined indices from multiple components with weighting strategies (equal, market-cap, capped, sqrt, manual)\n- **Footprint Chart**: Intra-bar bid/ask volume split visualization\n\n#### User Experience\n- **Dark/Light Themes**: Full theme support with semantic tokens\n- **Keyboard Shortcuts**: Full keyboard navigation\n- **Multi-Language**: English, Portuguese, Spanish, French\n- **Auto-Update**: Automatic updates via GitHub releases\n- **Secure Storage**: Platform-native encryption for API keys\n\n#### AI Agent Bridge (MCP)\nFour Model Context Protocol servers expose **47 tools** to any MCP client (Claude Code, ChatGPT desktop, custom agents). Install with one command (`pnpm mcp:install`) and drive the app from your AI assistant.\n- **`@marketmind/mcp-screenshot`** (6 tools) — Playwright + headless Chromium captures of any tab/modal/sidebar in light + dark, with side-by-side HTML gallery output.\n- **`@marketmind/mcp-app`** (19 tools) — drives the live dev app: navigation, symbol/timeframe/chart-type, theme, sidebars, allowlisted toolbar/store dispatch, escape hatches (`click`/`fill`/`waitFor`).\n- **`@marketmind/mcp-backend`** (14 tools) — read-only DB layer with per-table query tools, SELECT/CTE-only `db.exec`, tRPC bridge, audit log.\n- **`@marketmind/mcp-strategy`** (8 tools) — Pine strategy CRUD + backtest proxies (run/diff/getResult).\n\nFull reference: [`docs/MCP_SERVERS.md`](docs/MCP_SERVERS.md) · agent recipes: [`docs/MCP_AGENT_GUIDE.md`](docs/MCP_AGENT_GUIDE.md) · threat model: [`docs/MCP_SECURITY.md`](docs/MCP_SECURITY.md).\n\n## Technology Stack\n\n### Frontend\n- **TypeScript** - End-to-end typing\n- **Electron 39** - Cross-platform desktop framework\n- **React 19** - User interface\n- **Chakra UI v3** - Components and design system\n- **Canvas API** - High-performance chart rendering\n- **Vite 7** - Optimized build tool\n\n### Backend\n- **Fastify 5.6.2** - High-performance HTTP server\n- **tRPC 11.7.2** - Type-safe RPC framework\n- **Drizzle ORM 0.44.7** - TypeScript SQL ORM\n- **PostgreSQL 17** - Relational database\n- **TimescaleDB 2.23.1** - Time-series extension\n- **Binance SDK 3.1.5** - Trading integration\n\n### Architecture\n- **Monorepo** - pnpm workspaces\n- **Shared Packages** - 6 packages (@marketmind/types, chart-studies, fibonacci, logger, trading-core, risk, utils)\n- **Exchange Abstraction** - Binance (crypto)\n- **Real-time API** - Backend server with tRPC endpoints\n- **Session Auth** - Secure cookie-based authentication\n- **Encrypted Storage** - AES-256-CBC for API keys\n\n## Prerequisites\n\n- Node.js \u003e= 18.x\n- pnpm \u003e= 9.x (monorepo package manager)\n- macOS 10.15+ or Windows 10+\n- PostgreSQL 17 + TimescaleDB 2.23.1 (for backend)\n\n## Development Setup\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/nathanssantos/marketmind.git\ncd marketmind\n```\n\n### 2. Install dependencies\n\n```bash\npnpm install\n```\n\n### 3. Setup PostgreSQL + TimescaleDB\n\n```bash\n# Install PostgreSQL 17 and TimescaleDB\nbrew install postgresql@17 timescaledb\n\n# Create database\npsql postgres\nCREATE DATABASE marketmind;\nCREATE USER marketmind WITH PASSWORD 'your_password';\nGRANT ALL PRIVILEGES ON DATABASE marketmind TO marketmind;\n\\c marketmind\nCREATE EXTENSION IF NOT EXISTS timescaledb;\n\\q\n\n# Configure backend environment\ncp apps/backend/.env.example apps/backend/.env\n# Edit apps/backend/.env with your database credentials\n\n# Run migrations\npnpm --filter @marketmind/backend db:migrate\n```\n\n### 4. Run in development mode\n\n```bash\n# Terminal 1: Start backend server\npnpm --filter @marketmind/backend dev\n\n# Terminal 2: Start Electron app\npnpm --filter @marketmind/electron dev\n```\n\nOr use the root workspace command:\n\n```bash\n# Starts both backend and electron concurrently\npnpm dev\n```\n\n## Testing\n\nThe project has a comprehensive test infrastructure:\n\n```bash\n# Run all tests (unit + browser)\npnpm test\n\n# Run Electron app tests only\npnpm --filter @marketmind/electron test\n\n# Run backend tests only\npnpm --filter @marketmind/backend test\n\n# Run with coverage report\npnpm --filter @marketmind/electron test:coverage\n\n# Run renderer browser tests only (Playwright-backed vitest)\npnpm --filter @marketmind/electron test:browser:run\n\n# Chart perf regression harness (Playwright)\npnpm --filter @marketmind/electron test:perf           # run the perf suite\npnpm --filter @marketmind/electron test:perf:diagnose  # + top-5 bottleneck dump\n\n# Electron IPC / preload / packaged-boot smoke\npnpm --filter @marketmind/electron test:e2e:electron\n```\n\nSee [`docs/BROWSER_TESTING.md`](docs/BROWSER_TESTING.md) for the full layered-testing picture (Playwright MCP, chart perf harness, Electron smoke) and [`apps/electron/e2e/perf/README.md`](apps/electron/e2e/perf/README.md) for the perf-specific workflow.\n\n**Test Stats:**\n- **~7,600+ tests** across the monorepo\n- **5,129 backend tests** + 40 skipped — now includes a golden-output snapshot per builtin strategy (106 snapshots)\n- **2,400+ frontend tests** (2,341 unit + 92 browser across 6 files)\n- **Browser tests** (`apps/electron/src/**/*.browser.test.ts(x)`) cover Canvas pixel math, `getBoundingClientRect` hit-testing, and `CanvasManager` mount/unmount lifecycle — surfaces jsdom can't exercise. Run via `pnpm --filter @marketmind/electron test:browser:run`\n- **CI** runs lint, unit tests (with coverage artifact), browser tests, E2E, and backend build on every PR\n- All type checks passing\n\n## Production Build\n\n```bash\n# Build for current platform\npnpm build\n\n# macOS only (DMG)\npnpm build:mac\n\n# Windows only (NSIS installer)\npnpm build:win\n```\n\nInstallers will be created in `dist/`:\n- **macOS**: `MarketMind-{version}.dmg`\n- **Windows**: `MarketMind-Setup-{version}.exe`\n\n## Project Structure\n\n```\nmarketmind/\n├── apps/\n│   ├── electron/          # Desktop application\n│   │   ├── src/\n│   │   │   ├── main/      # Electron main process\n│   │   │   ├── renderer/  # React interface\n│   │   │   └── shared/    # Shared code\n│   │   └── package.json\n│   └── backend/           # Backend server\n│       ├── src/\n│       │   ├── db/        # Database schema\n│       │   ├── routers/   # tRPC routers\n│       │   ├── services/  # Business logic\n│       │   └── cli/       # CLI tools (backtest)\n│       └── package.json\n├── packages/\n│   ├── types/             # Shared TypeScript types\n│   ├── chart-studies/     # Chart study definitions\n│   ├── fibonacci/         # Fibonacci calculation engine\n│   ├── logger/            # Logging utilities\n│   ├── trading-core/      # Core trading logic\n│   ├── risk/              # Risk management\n│   └── utils/             # General utilities\n├── docs/                  # Documentation\n│   └── UI_STYLE_GUIDE.md  # UI standardization guide\n└── package.json           # Root package\n```\n\n## CLI Tools\n\nMarketMind includes a CLI for backtesting:\n\n```bash\ncd apps/backend\n\n# Validate a strategy\npnpm backtest validate -s larry-williams-9-1 --symbol BTCUSDT -i 1h --start 2024-01-01 --end 2024-12-01\n\n# Optimize parameters\npnpm backtest optimize -s larry-williams-9-1 --symbol BTCUSDT -i 1h --start 2024-01-01 --end 2024-12-01 --preset balanced\n\n# Run walk-forward analysis\npnpm backtest walkforward -s larry-williams-9-1 --symbol BTCUSDT -i 1h --start 2024-01-01 --end 2024-12-01\n\n# Monte Carlo simulation\npnpm backtest montecarlo -s larry-williams-9-1 --symbol BTCUSDT -i 1h --start 2024-01-01 --end 2024-12-01\n\n# Batch backtest all strategies\npnpm backtest batch --start 2024-01-01 --end 2024-12-01\n```\n\n## Contributing\n\nThis project is in active development. Contributions are welcome!\n\n1. Fork the project\n2. Create a feature branch (`git checkout -b feature/MyFeature`)\n3. Commit your changes (`git commit -m 'Add MyFeature'`)\n4. Push to the branch (`git push origin feature/MyFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Authors\n\n- **Nathan Santos** - *Initial development* - [nathanssantos](https://github.com/nathanssantos)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**[Website](https://marketmind-app.vercel.app)** |\n**[Quick Start](./QUICK_START.md)** |\n**[Documentation](./docs/)** |\n**[Changelog](./CHANGELOG.md)** |\n**[Report Bug](https://github.com/nathanssantos/marketmind/issues)**\n\nMade with love for traders and investors\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanssantos%2Fmarketmind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathanssantos%2Fmarketmind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanssantos%2Fmarketmind/lists"}