Inspiration

I trade with ICT and Wyckoff methodology, but watching multiple charts across multiple timeframes is exhausting and error-prone. Most "AI trading" tools are black boxes that won't tell you why a signal fired, and most rely on cloud services that hold your data. I wanted something the opposite of that — a local-run tool that detects classical price-action patterns (Order Blocks, Fair Value Gaps, Liquidity Sweeps, Wyckoff Spring/Upthrust, BOS/CHoCH) automatically, explains its reasoning, and never sends my watchlist to a third party.

What it does

ChartNagari scans US stocks and crypto across 1W / 1D / 4H / 1H timeframes and detects ICT, Wyckoff, SMC, and general TA signals in real time. When a signal fires, it:

  • Plots the marker directly on the chart with a quality score (HIGH / MED / LOW)
  • Sends an alert to Telegram or Discord with the rule that triggered it
  • Lets the user backtest the same rule against historical data
  • Lets the user paper-trade signals before risking capital
  • Optionally asks an LLM to summarize the market context in plain language

Everything runs locally. SQLite for storage. No accounts, no cloud, no telemetry. The user owns their data and their watchlist.

How I built it

  • Backend — Go 1.26+. Each trading rule implements a single AnalysisRule interface, registered in config/rules.yaml. Categories (ict/, wyckoff/, smc/, general_ta/, candlestick/) live in internal/methodology/ so adding a new methodology is a folder + one config line.
    • Frontend — React 18 + TypeScript + Vite. Tab-based UI (Chart / Analysis / Backtest / Paper / Calendar / Settings). Five-color industrial design tokens, single dark mode, no decoration — built for traders who want a quiet terminal, not a dashboard with motion.
    • Data — Yahoo Finance for stocks, Binance WebSocket for crypto, Tiingo as a paid fallback. Pluggable collector interface.
    • Storage — SQLite. Fully local. Schema migrations versioned in repo.
    • Alerting — Telegram bot + Discord webhook with a unified notifier.Notifier interface.
    • AI — Optional LLM integration for natural-language signal explanations. Supports multiple providers via a single adapter.
    • MCP server — Exposes ChartNagari to Claude Code, Claude Desktop, and Codex CLI so AI agents can query signals, run analyses, and trigger backtests directly.
    • i18n — Full English / Korean / Japanese support, with localized AI prompts.

Challenges I ran into

  • Rule deduplication. When ICT, Wyckoff, and SMC fire on the same candle in the same direction, the chart turns into a wall of arrows. Solved by collapsing same-direction signals per candle and keeping only the highest-quality marker, weighted by score.
  • Multi-timeframe consistency. A 1H signal that contradicts the 1D bias is usually noise. Built a methodology-aware HTF context layer so lower-timeframe rules can read the higher-timeframe state without becoming circular.
  • WebSocket reliability. Binance reconnects, partial frames, missed candles. Wrote a defensive collector with backoff, gap detection, and a replay path so the rule engine never sees a half-formed bar.
  • Honest backtesting. It's easy to write a backtest that lies — look-ahead bias, survivorship bias, fills better than reality. Constrained the engine to only use information available at the bar's open and modeled slippage explicitly.
  • Designing for "quiet." A trading terminal that flashes is a trading terminal you ignore. Wrote a design system that allows color only when it carries meaning (signal direction, quality score, risk tier), and held the line on it through every UI iteration.

Accomplishments that I'm proud of

What I learned

  • The hardest part of a "signal detection" tool isn't detection — it's not detecting. Aggressive rules produce noise; the engineering work is in suppression, weighting, and honest scoring.
  • Trading methodology written by humans (ICT, Wyckoff) doesn't translate cleanly into code without first translating it into precise rules. Half the project was disambiguation: "what does 'institutional candle' mean exactly?"
  • A small set of design tokens, ruthlessly enforced, beats a richer palette every time when the product is data-dense.
  • Go's interface design encourages exactly the plug-in-rule architecture I needed. Adding methodologies feels like writing tests, not extending a framework.

What's next for ChartNagari

  • More methodologies: VSA (Volume Spread Analysis), Elliott Wave (constrained), and a configurable composite-rule layer.
  • Strategy composition — let users combine rules into named strategies with their own scoring, alerts, and backtests.
  • A hosted demo (read-only) so people can evaluate the UI without cloning the repo.
  • Public release of the rule book — the theory behind every rule, written as a long-form companion to the code, so users understand why a signal fires, not just that it fired.
  • More LLM-backed natural language reporting: a daily morning brief that summarizes overnight signals in plain English (or Korean, or Japanese).
Share this project:

Updates