Skip to content

Ju571nK/ChartNagari

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

161 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChartNagari

🌐 English | 한국어 | 日本語

CI License: MIT Go 1.26 Docker

ChartNagari demo — multi-timeframe ICT/Wyckoff signal detection with live alerts and zero-key demo mode

The only open-source platform that automates ICT and Wyckoff methodology across multiple timeframes — with real-time alerts and AI interpretation. Self-hosted. No cloud required.


What You Get in 5 Minutes

  1. Clone → configure one .env file → docker compose up
  2. ChartNagari scans US stocks and crypto across 1W / 1D / 4H / 1H — simultaneously
  3. When an ICT Order Block, Fair Value Gap, Wyckoff phase shift, or RSI signal fires, you get a Telegram (or Discord) alert with an optional AI interpretation
  4. Everything runs locally — your data never leaves your machine

No cloud account. No subscription. No API rate-limit surprises.


Why ChartNagari

The ICT and Wyckoff methodology space on GitHub is surprisingly empty: the top Wyckoff automation repo has 17 stars, and the best ICT library is a collection of Python functions with no alerts, no backtest, and no UI.

ChartNagari fills that gap:

What you need Status
Multi-timeframe ICT signal detection (Order Blocks, FVGs, Liquidity Sweeps)
Wyckoff phase detection (Accumulation, Distribution, Spring, Upthrust)
Real-time Telegram / Discord alerts with cooldown
Optional AI interpretation (Anthropic, OpenAI, Groq, Gemini)
Multi-timeframe consensus scoring
Signal quality scoring (volume, wick ratio, reversal strength)
Top-down HTF context filter (suppress counter-trend signals)
Signal sequence tracking (sweep → displacement bonus)
Chart signal category filter (ICT / Wyckoff / SMC / TA toggle)
Demo mode (try signals on sample data, no setup required)
Backtest on historical data
Self-hosted, local-first, no cloud required
AI output language: LLM_LANGUAGE: en | ko | ja
Guided first-run onboarding with AI scenario scan

Vibe-coded — this project was built entirely through vibe coding with Claude Code.

Local-first — all data stays on your machine. No cloud accounts required to run.


Features

  • 30+ trading rules — ICT (Order Blocks, FVG, Liquidity Sweeps, Breaker Blocks), Wyckoff (Spring, Upthrust, Accumulation/Distribution), SMC (BOS, CHoCH), General TA (RSI, EMA, volume), 14 candlestick patterns
  • Multi-timeframe analysis — 1W, 1D, 4H, 1H scanned in parallel
  • Signal quality scoring — not all signals are equal. Sweeps scored by volume ratio, wick depth, reversal strength. FVGs scored by gap size vs ATR and impulse strength
  • Top-down HTF context filter — 1H/4H signals suppressed when they contradict the 1D/1W trend direction
  • Signal sequence tracking — sweep followed by displacement in same direction gets a bonus score. Multi-pattern detection
  • Wyckoff phase boosting — accumulation/markup boosts LONG signals, distribution/markdown boosts SHORT signals
  • Chart category filter — toggle ICT / Wyckoff / SMC / TA signal groups on/off with one click
  • Demo mode — try the signal engine on sample data without adding symbols or API keys
  • Multi-timeframe consensus — signals ranked by how many timeframes agree
  • AI interpretation layer — optional LLM commentary (Anthropic, OpenAI, Groq, Gemini)
  • Telegram & Discord alerts — configurable cooldown to prevent alert spam
  • Backtest & paper trading — validate rules on historical data before going live
  • Web dashboard — React frontend with guided first-run onboarding, Settings UI, and AI scenario card
  • Multiple data sources — Binance WebSocket (crypto, free), Tiingo (stocks, recommended), Yahoo Finance (fallback)
  • Economic calendar — US macro event tracker (FMP or Finnhub); pre-event Telegram alerts for high-impact releases

Architecture

flowchart TB
    subgraph UI["Web Dashboard — TypeScript + React 18 + Vite"]
        direction LR
        Chart["Chart"]
        Analysis["Analysis"]
        Backtest["Backtest"]
        Paper["Paper"]
        Calendar["Calendar"]
        Settings["Settings"]
    end

    subgraph Backend["Go Backend"]
        direction TB
        Collector["Collector\n(data sources)"]
        Engine["Engine\n(rule eval)"]
        Interpreter["Interpreter\n(MTF score)"]
        LLM["LLM\n(optional)"]
        Report["Report\n(daily)"]
        Notifier["Notifier\n(TG / DC)"]
        History["History\n(SQLite)"]
        Calendar2["Calendar\n(FMP / Finnhub)"]

        Collector --> Engine
        Engine --> Interpreter
        Interpreter --> LLM
        Interpreter --> Report
        Report --> Notifier
        Engine --> History
    end

    subgraph Sources["Data Sources"]
        Binance["Binance WS\n(crypto)"]
        Tiingo["Tiingo REST\n(stocks)"]
        Yahoo["Yahoo Finance\n(fallback)"]
    end

    Sources --> Collector
    UI -- "REST API" --> Backend
Loading

Quick Start — Docker

# 1. Clone
git clone https://github.com/Ju571nK/ChartNagari.git
cd ChartNagari

# 2. Configure
cp .env.example .env
# Edit .env — at minimum set one alert destination (Telegram or Discord)

# 3. Run
docker compose up -d

# 4. Open dashboard
open http://localhost:8080

Quick Start — Local Dev

Prerequisites: Go 1.26+, Node.js 20+

# Backend
go mod download
go run ./cmd/server

# Frontend (separate terminal)
cd web
npm install
npm run dev        # dev server at :5173, proxies API to :8080

Or use the Makefile:

make build-all     # build frontend + backend binary
make run           # build and start server
make test          # run all Go tests

Environment Variables

Copy .env.example to .env and fill in the values you need. The server starts without any alerts configured — you only need the variables for features you actually use.

Variable Required Default Description
ENV No development development | production
SERVER_PORT No 8080 HTTP listen port
LOG_LEVEL No debug debug | info | warn | error
DB_PATH No ./data/chart_analyzer.db SQLite file path
BINANCE_API_KEY No Binance API key (public WebSocket needs no key)
BINANCE_SECRET_KEY No Binance secret
TIINGO_API_KEY No When set, Tiingo is used instead of Yahoo Finance
TIINGO_POLL_INTERVAL No 900 Poll interval in seconds (free tier: 900 recommended)
YAHOO_POLL_INTERVAL No 60 Yahoo Finance poll interval in seconds
TELEGRAM_BOT_TOKEN No* Token from @BotFather
TELEGRAM_CHAT_ID No* Chat, group, or channel ID
DISCORD_WEBHOOK_URL No* Discord incoming webhook URL
ALERT_COOLDOWN_HOURS No 4 Hours before re-alerting same symbol+rule
LLM_PROVIDER No anthropic | openai | groq | gemini
ANTHROPIC_API_KEY No Required when LLM_PROVIDER=anthropic
OPENAI_API_KEY No Required when LLM_PROVIDER=openai
GROQ_API_KEY No Required when LLM_PROVIDER=groq
GEMINI_API_KEY No Required when LLM_PROVIDER=gemini
AI_MIN_SCORE No 12.0 Minimum MTF score to trigger AI interpretation
LLM_LANGUAGE No en AI output language: en | ko | ja
ALPHAVANTAGE_API_KEY No For fetching 20-year daily SPY data

*Alerts won't fire without at least one destination configured, but the server runs fine.


Configuration Files

File Purpose
config/rules.yaml Enable/disable individual trading rules and set their parameters
config/symbols.yaml List of symbols to monitor (stocks and crypto)
config/timeframes.yaml Timeframe settings for each asset class

Adding a New Rule

  1. Create a file in internal/methodology/<category>/ implementing the rule.AnalysisRule interface.
  2. Register it in config/rules.yaml with a unique ID, category, and default parameters.
  3. Add table-driven tests in a _test.go file alongside the rule.
  4. Run go test ./... — all tests must pass before opening a PR.

See CONTRIBUTING.md for the full workflow.


Running Tests

# All tests
go test ./...

# With race detector
go test -race ./...

# Coverage report
make test-coverage   # opens coverage.html

Contributing

See CONTRIBUTING.md for development setup, code style, and PR checklist.


License

MIT — see LICENSE.

Builder

Built by Justin — exploring AI-assisted development and applying financial market knowledge through vibe coding with Claude Code.