Skip to content
margbug01Public

About

OpenBar — The best open-source native TradingView alternative for Windows & macOS. Built with Go + MyGo (no Electron, login, or API key): crypto, CME futures, forex & stocks, Pine Script v5/v6, 41 layouts, price alerts & bar replay.

Topics

Resources

Stars

119 stars

Watchers

1 watching

Forks

Latest commit

 

History

189 Commits

Folders and files

Repository files navigation

OpenBar app icon

OpenBar

The Best Open-Source Native TradingView Alternative for Desktop Charting (Windows & macOS)

English · 简体中文 · Website · 中文官网 · Download Latest · Changelog

Windows 10 / 11 macOS 12+ Apple Silicon Go 1.27 UI MyGo License MIT Listed on Awesome MyGo

OpenBar v0.10.0 light and dark desktop interface showing BTC/USDT candlesticks, MA, Volume, MACD, alerts, bar replay, and watchlist

OpenBar (formerly Candle through v0.6.1) is a free, open-source native desktop alternative to TradingView for Windows 10/11 and macOS 12+ (Apple Silicon). Compiled directly in Go + MyGo with no Electron or WebView shell, no login wall, no subscription, and no exchange API key requirement, OpenBar ships 8 chart types (including Heikin Ashi, Renko, and Baseline), 36 built-in indicators and strategies (including VPVR, SMC, Candlestick Patterns, RSI Divergence, and Linear Regression Channel), Pine Script v5/v6 indicators and strategy() backtesting, 17 drawing tools (including Anchored VWAP and risk/reward sizing), multi-symbol percentage compare, all 41 multi-chart layouts, background desktop price alerts, Bar Replay with paper trading, a watchlist technical screener, live crypto L2 order book depth, chart notes, CSV export, and an opt-in loopback HTTP API for local AI agents inside a single lightweight binary (5.5 MB macOS DMG / 7.2 MB Windows ZIP).

Contents


Why OpenBar Is the Best Desktop TradingView Alternative

Most "TradingView alternatives" either wrap a heavy browser tab in Electron, lock basic features (multi-chart layouts, >2 indicators, intraday bar replay, multiple alerts) behind monthly subscriptions, or drop Pine Script compatibility altogether. OpenBar solves all three directly at the native desktop level:

  • No paywalls on core charting: All 41 multi-chart layouts (2 to 8 panes), 8 chart types (Candles, Hollow candles, Heikin Ashi, Renko, Bars, Line, Area, Baseline), unlimited simultaneous indicators (36 built-ins including VPVR and strategies), all 12 timeframes (1m to 1M) plus custom intervals (6m, 90m, 2D…), multi-symbol normalized compare, full-history Bar Replay with paper trading, Pine strategy() backtesting, technical screener, live L2 order book, and background desktop price alerts are MIT-licensed and free.
  • Native desktop speed: Compiled in Go + MyGo with no Chromium or WebView runtime. In headless benchmarks across 3,000 bars with 28 built-in indicators enabled simultaneously, full recomputation takes ~9 ms and each live tick updates incrementally in ~5 µs.
  • Pine Script v5/v6 + TradingView controls: Pan, wheel zoom, crosshair sync, Anchored VWAP, risk/reward position sizing, 5-color watchlist flags, custom watchlists, global ⌘K search, Shift-drag measure ruler, and Object Tree match TradingView controls. You can paste TradingView Pine Script indicators and strategies from the clipboard or run local scripts via the indicators/ folder.
  • Small, private, local-first: 5.5 MB macOS Apple Silicon DMG and 7.2 MB Windows x64 ZIP, no accounts, no exchange API keys, no telemetry, Ed25519-signed delta updates (~1.3 to 1.6 MB per release), and an opt-in 127.0.0.1 loopback HTTP API for local scripts and AI agents.

Supported Markets & Data Feeds

OpenBar combines 10 global asset classes in one instant symbol search (⌘K or start typing anywhere on the chart) and one customizable watchlist:

Market Example symbols Public data source Latency & behavior
Crypto Spot BTCUSDT, BYBIT:ETHUSDT, MEXC:SOLUSDT Binance (data-api.binance.vision), Bybit v5, MEXC Real-time WebSocket, 1,300+ Binance spot pairs, configurable daily open anchor
USDT Perpetuals BTCUSDT.P, BYBIT:BTCUSDT.P, MEXC:ETHUSDT.P Binance (fapi.binance.com), Bybit, MEXC Real-time stream with mark price, funding rate, and settlement countdown
CME Futures CME:NQ, CME:MNQ, CME:ES, CME:MES, CME:MGC, CME:MCL, CME:SI Yahoo Finance public feed Real exchange prints (10-min delayed) with ETH / RTH session switching
China Futures SHFE:au, DCE:i, CZCE:SA, CFFEX:IF, INE:sc, GFEX:si; months like SHFE:au2606 Shinnytech market data (TqSdk's DIFF) Real time, 77 products of all six exchanges with their night sessions; needs a free Shinnytech (快期) account, entered in Settings › Data source
Forex (18 pairs) FX:EURUSD, FX:USDJPY, FX:USDCNH Yahoo Finance (majors, crosses, CNH/CNY/HKD) London midnight day boundary, daily bars built from hourly feed (730 days), no volume bars
US Stocks & ETFs US:NVDA, US:AAPL, US:QQQ Local Nasdaq symbol list + Yahoo Finance Intraday market quotes, instant local search, public company icons
China A-Shares & Indices SSE:600795, SSE:000001, SZSE:399006 Eastmoney primary + automatic Tencent failover Forward-adjusted prices, per-host cooldown gates, seamless backup when throttled
Hong Kong Equities HKEX:00700, HKEX:HSI, HKEX:HSTECH Eastmoney primary + automatic Tencent failover Forward-adjusted prices aligned to HKEX trading sessions
Korea KOSPI & VIX KRX:000660, CBOE:VIX Yahoo Finance KOSPI 20-min delayed, Cboe VIX 15-min delayed
Japan Stocks & Nikkei 225 TSE:7203, TSE:130A, TVC:NI225 Yahoo Finance + Eastmoney search Tokyo Stock Exchange 20-min delayed, Nikkei 225 30-min delayed; found by Chinese name (丰田) or code (7203)
Expand data source notes, proxy handling, and local storage paths
  • System proxy support: OpenBar automatically picks up OS system proxy settings (Windows Network Proxy / macOS System Settings › Proxy) and HTTPS_PROXY / HTTP_PROXY environment variables without restarting.
  • US stocks & logos: Full Nasdaq ticker list refreshes weekly from www.nasdaqtrader.com into local cache; company icons load once from Financial Modeling Prep public logos; crypto icons cache locally from Binance public assets.
  • China & HK dual-source failover: Eastmoney push2 (quotes) and push2his (K-lines) use independent host-level cooldown gates. Whenever Eastmoney rejects connections or enters cooldown, OpenBar transparently switches to Tencent (web.ifzq.gtimg.cn / ifzq.gtimg.cn / qt.gtimg.cn) for K-lines, live polling, quotes, and symbol metadata, and switches back once Eastmoney recovers.
  • China futures: OpenBar logs in to Shinnytech's market data with your free Shinnytech account (Settings › Data source), as their TqSdk does. SHFE:au follows the main contract as it rolls over (KQ.m@SHFE.au); SHFE:au2606 is that month. The account is kept in settings.json as typed.
  • Local storage paths:
    • Settings, watchlists, drawings, alerts, layouts: Windows %APPDATA%\OpenBar\settings.json, macOS ~/Library/Application Support/OpenBar/settings.json.
    • Icon & symbol cache: Windows %LOCALAPPDATA%\OpenBar, macOS ~/Library/Caches/OpenBar.

Core Capabilities

1. 8 Chart Types, 12 Timeframes, Multi-Symbol Compare & Intraday Drill-Down

  • 8 chart types: Switch between Candles, Hollow candles, Heikin Ashi, Renko (automatic ATR(14) or custom box size with volume conservation), Bars, Line, Area, and Baseline from the top bar or Settings.
  • All 12 timeframes plus custom ones: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 12h, 1d, 1w, and 1M in one top-bar menu with starred favorites on top. Type a number or 3h, 2D, 2W, 3M over the chart to switch to any interval, as in TradingView (minutes 1–1440, hours 1–24, days 1–365, weeks 1–52, months 1–12). An interval the menu lacks joins it on Enter and can be removed with its ×. Digits starting with 0, five or more digits, or numbers over 1440 (such as 6007) open Symbol Search.
  • Multi-symbol normalized percentage compare: Overlay one or more symbols from any of the 10 asset classes on top of the main chart, normalized to percentage return from the first visible bar. Compare series stream live updates, backfill history as you pan left, and restore the previous price scale automatically when cleared.
  • Narrow windows stay tidy: As the window narrows, the top bar folds by measured width (button words, the stream label, undo/redo, the unchosen ETH/RTH toggle, the market's long name), always keeping empty room to drag the window.
  • Global UI zoom, CSV export & quick navigation bars: Scale the entire desktop interface with ⌘=, ⌘-, ⌘0, the View menu, or live preview in Settings. Bottom controls cover range presets (1D 5D 1M 3M 6M YTD 1Y All), Go to Date (Alt+G), and a timezone clock switcher. Top controls include drawing undo/redo, one-click 2× PNG snapshots (copy or save), and one-click OHLCV CSV export.
  • Multi-day intraday chart: Double-click any daily bar column (or single-click if enabled in Settings) to open an intraday overlay with VWAP, previous close, price/percent axes, PageUp/PageDown day stepping, and wheel-expanded multi-day stitching (up to 10 days). Visible range high/low prices label directly beside their wicks.

2. Watchlist, Technical Screener, Live L2 Order Book & Global Search

  • Resizable watchlist & symbol details panel: Defaults to 380px with drag resizing (280–640px), dockable on the right, multi-column below the chart, or hidden. Includes 4-column click sorting (Symbol / Last price / Change / Change %), thousands commas, remove with Delete after clicking a row or from the right-click menu (nothing covers the numbers on hover), 22px asset badges, CME/CN/HK badges, delayed D indicators, and a collapsible bottom symbol details card.
  • 5-color flags, custom watchlists & global search: Flag rows in red, blue, green, orange, or purple and filter from the header. Copy the default list or create multiple custom watchlists with named sections and drag reordering, step through symbols with Space/↓ and Shift+Space/↑, or press ⌘K (or type letters on the chart) to open global symbol search.
  • Watchlist technical screener (Alt+S or Tools menu): Scans every symbol in the active watchlist in parallel on the chosen timeframe, computing Wilder RSI(14), MACD(12,26,9) histogram and recent crossover, EMA(20/50) trend, relative volume (RVOL), Bollinger(20,2) %B, and a composite Buy/Sell rating, with filtering, column sorting, and one-click chart switching.
  • Live crypto L2 order book (Alt+D or Tools menu): Opens a real-time L2 depth sidebar and cumulative depth curve for Binance Spot, Binance USD-M Perpetuals, Bybit Spot, and Bybit Linear Perpetuals. Shows spread, bid/ask imbalance ratio, and creates a price alert when you click any book price level.

3. 36 Built-in Indicators & Strategies, Pine Script v5/v6 & Strategy Backtesting

  • 36 built-ins aligned to TradingView formulas: 8 native Go indicators (MA, EMA, BOLL, MACD, RSI, KDJ, VOL, and Visible Range Volume Profile VPVR with POC, 70% Value Area VAH/VAL, up/down volume split, and price-axis tags) plus 28 embedded Pine scripts covering moving averages, channels, trend, oscillators, volatility, volume, patterns (Smart Money Concepts SMC, Candlestick Patterns, RSI Divergence, Linear Regression Channel with R²), and 2 built-in strategies. Stack multiple instances and save or append reusable templates.
  • Hot-reloading Pine Script v5/v6 & strategy() backtesting: Paste indicators or strategies via "Import from clipboard", write in the syntax-highlighted editor, or drop .pine files into your local indicators/ folder for 1.5-second hot reload. Open the Strategy Tester (Alt+B) for no-lookahead next-bar-open backtests, O(1) incremental live-tick snapshots, per-entry-ID pyramiding lots, dual-pane equity and drawdown curves, clickable trade rows that jump straight to the bar, and built-in Dual EMA Crossover and SuperTrend strategies.

4. 17 Drawing Tools, Anchored VWAP, Measure Ruler & Object Tree

  • Persisted drawing tools: Trendline, ray, horizontal/vertical lines, horizontal ray, parallel channel, 8-grip rectangle, customizable Fibonacci retracement, Anchored VWAP (AVWAP) (draggable anchor, ±Nσ standard deviation bands, and right price-axis label), price range, text, Arrow Up, Arrow Down, Callout bubble, freehand Brush, and Long/Short risk-reward position tools (computing quantity and target/stop PnL from account equity and risk percent). Anchored by timestamp across intervals, with hover endpoint dragging, magnet mode, favorites toolbar, and Save as Default. Hold Command on macOS or Ctrl on Windows to temporarily invert the magnet while placing a point or dragging a handle.
  • Measure ruler & Object Tree: Click the left-rail ruler or hold Shift+click/drag in cursor mode to measure price delta, bar count, duration, and cumulative volume transiently. Left rail adds Stay in Drawing Mode, Lock All Drawings, and Object Tree (Alt+O or context menu) to manage indicators, drawings, and alerts in one dialog.

5. Background Desktop Price Alerts & 41 Multi-Chart Layouts

  • Desktop price alerts: Add alerts via price-axis hover ⊕, chart right-click, L2 order book price click, or Alt+A. Draws amber dashed lines and bell price tags on the chart, monitors alerted symbols in the background even when switched away, and fires native OS desktop notifications.
  • 41 multi-chart layouts: All 41 TradingView grid templates (2 to 8 panes) with draggable splitters, single-pane maximize, crosshair/time/symbol/interval sync, shared feeds for duplicate panes, and named saved layouts.

6. Bar Replay with Paper Trading, Chart Notes & Local AI/Agent HTTP API

  • Interactive Bar Replay & paper trading: Click Replay on the top bar to preview a cutoff bar with washed-out future candles, then click to slice history. The floating Replay Control Bar supports re-cutting, stepping back, stepping forward (Shift+→), 0.5x–10x playback, and simulated Buy, Sell, and Close orders with on-chart entry/position lines, fill markers, an equity curve, and a trade performance report. Live incoming candles buffer silently into the full history without mutating the replay view or triggering false alerts.
  • Per-symbol chart notes (Alt+N or Tools menu): Save timestamped trade notes per symbol stamped with the active price and interval.
  • Opt-in local AI/Agent HTTP JSON API: Disabled by default. Enable it in Settings › Data source to listen strictly on 127.0.0.1 loopback (default port 19836; rejects cross-origin Origin headers and non-loopback Host headers). Local scripts and AI agents can query GET /api/state, GET /api/bars, GET /api/export.csv, GET /api/snapshot.png, or drive the chart via POST /api/chart, POST /api/alert, POST /api/drawing, and GET/POST /api/notes.

OpenBar vs. TradingView Desktop

Criterion OpenBar (v0.12.15) TradingView Desktop (Free tier)
Runtime & package size Native Go + MyGo binary (5.5 MB macOS DMG / 7.2 MB Windows ZIP) Electron / Chromium wrapper with larger footprint
Account & pricing MIT open-source, free, no login, no API key, no ads Account required; paid plans unlock core charting limits
Multi-chart & indicators All 41 layouts (up to 8 panes), 36 built-ins, and unlimited indicators locally Free plan caps charts per tab and indicators per chart
Chart types, VPVR & compare 8 chart types (incl. Heikin Ashi, Renko, Baseline), VPVR (POC/VAH/VAL), Anchored VWAP, multi-symbol % compare Renko, Volume Profile (VPVR), and extended compare features require paid plans
Pine Script & backtesting Pine v5/v6 indicators and strategy() backtesting (Alt+B) with local folder hot-reload Full official Pine runtime, cross-symbol request.security, and community library
Bar Replay, Paper Trading & Alerts All-timeframe replay with simulated paper trading and background desktop notifications Intraday replay and multiple server alerts require paid tiers
Screener & L2 Order Book Parallel watchlist technical screener (Alt+S) and live Binance/Bybit L2 depth (Alt+D) Web screener included; Level 2 DOM requires paid data or broker feed
Local API, CSV export & notes Opt-in 127.0.0.1 HTTP JSON API for local agents, one-click CSV export, per-symbol chart notes (Alt+N) CSV export requires paid plans; no local agent HTTP API
Market coverage 10 public market feeds including China futures, Japan stocks, and Eastmoney + Tencent China/HK failover Broader global exchanges and paid real-time exchange licenses
Live broker trading & cloud sync No live broker orders or cloud sync; all state stays local (replay paper trading and backtests are simulated) Integrated live brokers and cross-device cloud sync

Screenshots

OpenBar dark mode: Bollinger Bands, RSI, and KDJ multi-pane indicators OpenBar light mode: trend ray, support line, and long risk/reward position sizing
OpenBar Scales and chart settings dialog OpenBar Indicators search, Pine Script import, and templates

Download & Quick Start

Download v0.12.15 from GitHub Releases:

  • macOS 12+ (Apple Silicon): Download OpenBar-v0.12.15-macos-arm64.dmg and drag OpenBar.app into Applications before opening.
  • Windows 10 / 11 (x64): Download OpenBar-v0.12.15-windows-x64.zip, extract to a user-writable folder (avoid Program Files so in-app updates can replace the binary), and launch OpenBar.exe.
  • Language & self-updates: Follows OS locale automatically (English or Simplified Chinese; switchable under Settings › Canvas › Language). Checks GitHub on startup and every 12 hours, applying Ed25519-verified binary delta patches via Settings › About.

Build from Source

Requires Go (Go downloads toolchain 1.27.3 automatically if needed):

git clone https://github.com/margbug01/OpenBar
cd OpenBar/work
go test ./...

# Windows (x64)
go build -trimpath -ldflags="-H windowsgui -s -w" -o ../outputs/OpenBar.exe .

# macOS (Apple Silicon)
go run github.com/egoist/mygo/cmd/mygo@v0.11.1 build -skip-dmg

Keyboard Shortcuts & Controls

Area Action / Shortcut Result
Chart navigation Drag / Scroll wheel Pan time / Zoom anchored at cursor across all panes
Price scale Wheel or drag price axis / Double-click axis Manual price scaling / Reset to auto scale
Latest & intraday Double-click empty chart / Double-click daily bar column Jump to latest bar / Open intraday chart (PageUp/PageDown changes day, wheel stitches up to 10 days)
Timeframes & date Keys 1–9 / Alt+G Quick interval switcher; an interval the menu lacks (6, 90, 2D) joins it on Enter; digits starting with 0, 5+ digits or over 1440 open Symbol Search / Go to Date
UI zoom ⌘= / ⌘- / ⌘0 Zoom interface in, out, or reset to 100%
Search & watchlist ⌘K / Click symbol title / Type letters Open global symbol search; Space/↓/↑ steps through watchlist
Watchlist layout Drag left edge / Top-bar watchlist button Resize width / Dock right, bottom multi-column, or hide; click left ribbon to flag & filter
Drawings Top-bar Draw button / Double-click drawing / Esc Toggle left rail / Open style dialog / Exit tool & deselect; ⌘Z/⇧⌘Z, ⌘C/⌘V, Delete
Measure & tree Shift+click or drag / Alt+O Transient measure ruler / Open Object Tree (indicators, drawings, alerts)
Alerts & replay Alt+A / Price-axis hover ⊕ / Top-bar Replay Create & manage price alerts / Pick bar to start Replay with paper trading (Shift+→ steps forward)
Strategy & screener Alt+B / Alt+S Open Strategy Tester (equity curve, drawdown, trade list) / Open Watchlist Technical Screener
Order book & notes Alt+D / Alt+N Toggle live L2 Order Book sidebar (Binance & Bybit; click level to alert) / Open per-symbol Chart Notes
Layouts & sessions Top-bar Layout / ETH RTH / ⌘, Switch 1–8 pane layouts & sync / Toggle CME session / Open Settings

Built-in Indicators & Pine Script

Expand all 36 built-in indicators and strategies (formulas and default parameters)

8 indicators are implemented natively in Go:

Indicator Defaults Formula
MA 5 Simple moving average of source (default close)
EMA 12 α = 2/(n+1), first value seeded by SMA(n)
BOLL 20, 2 Basis = SMA(20); upper/lower = basis ± 2 × population standard deviation
MACD 12, 26, 9 DIF = EMA(12) − EMA(26); DEA = EMA(DIF, 9); Histogram = DIF − DEA
RSI 14 Wilder smoothing (RMA, α = 1/n, SMA seed) on gains and losses
KDJ 9, 3, 3 RSV over 9-bar high/low; K and D smoothed from 0 (TradingView community convention); J = 3K − 2D
VOL 20 Volume bars with 20-bar moving average
VPVR 24 rows, 70% VA, 30% width Visible range volume profile across price buckets with up/down split, POC, and VAH/VAL value area

The remaining 28 built-ins (26 indicators and 2 strategies) are written in Pine Script (work/indicators) with TradingView default parameters:

  • Moving averages: WMA (9), HMA (9), VWMA (20)
  • Channels: Keltner Channels KC (20, 2, ATR 10), Donchian Channels DC (20), Linear Regression Channel LinReg (100, 2σ, with R² readout)
  • Trend: Ichimoku Cloud (9, 26, 52, 26), Parabolic SAR (0.02, 0.02, 0.2), SuperTrend (10, 3), DMI (14, 14), Aroon (14), Pivots HL (10, 10)
  • Oscillators: StochRSI (3, 3, 14, 14), CCI (20), Williams %R (14), ROC (9), TRIX (18), BIAS (6, 12, 24), RSI Divergence (14, 5/5 pivots, regular and optional hidden)
  • Volatility: ATR (14, RMA)
  • Volume: Session VWAP (optional std-dev bands), OBV, MFI (14), CMF (20)
  • Patterns: Smart Money Concepts SMC (swing 5, BOS/CHoCH, FVG, Order Blocks), Candlestick Patterns (Engulfing, Hammer/Shooting Star, Morning/Evening Star, Doji)
  • Strategies: Dual EMA Crossover Strategy (9/21), SuperTrend Strategy (10, 3)

Custom Pine Script Folder & Scope

Place .pine files in %APPDATA%\OpenBar\indicators (Windows) or ~/Library/Application Support/OpenBar/indicators (macOS). OpenBar watches the directory every 1.5s, writes parse/runtime diagnostics into _status.json, and ships an agent-friendly README.md inside the folder.

  • Supported: indicator/study, strategy() (strategy.entry, strategy.close, strategy.close_all, strategy.exit, strategy.cancel, strategy.cancel_all, sizing/commission/slippage/pyramiding with per-entry-ID lots, strategy.* metrics), input.*, var, :=, if/for/while/switch, user functions, user-defined types (type) and methods (method), x[n], ta.*, math.*, color.*, plot, hline, fill, bgcolor, plotshape, plotchar, plotarrow, array.*, label, line, box (new, delete, copy, get_*, set_*, styles, extend, arrows, max_*_count), linefill, chart.point, and request.security on the chart's own symbol at longer intervals (lookahead, gaps and tuples included).
  • Not yet supported: request.security on other symbols or shorter intervals, map/matrix, string arrays, enum; table and polyline are skipped with a notice.

Known Limitations

  • Analysis only: Not a live brokerage or real-money order-execution terminal (Bar Replay paper trading and Pine strategy backtesting run strictly as local simulations); no investment advice.
  • Feed delays & caps: CME futures are 10-min delayed, Korean KOSPI and Tokyo stocks 20-min delayed, Cboe VIX 15-min and the Nikkei 225 30-min delayed. Yahoo's Tokyo minutes start a few minutes after the 9:00 open. Forex comes from Yahoo without volume and covers up to 730 daily bars. China/HK intraday history depth is bounded by Eastmoney (~1.5 months) or Tencent failover windows (320–800 bars / 5 HK trading days).
  • Platform coverage: Prebuilt macOS releases target Apple Silicon (arm64) only; Intel Macs are not packaged.

FAQ

Why do macOS Gatekeeper or Windows SmartScreen warn on first run?

OpenBar is an MIT-licensed personal project without commercial code-signing certificates. On macOS, drag OpenBar.app into Applications, open System Settings › Privacy & Security, and click Open Anyway (or run xattr -dr com.apple.quarantine /Applications/OpenBar.app). On Windows, click More info then Run anyway.

Why aren't candles loading behind a restricted network?

Verify your browser can reach https://data-api.binance.vision/api/v3/ping. If blocked, enable your proxy's System Proxy and retry; OpenBar reloads OS proxy settings automatically (PAC scripts are not supported; SOCKS proxy is macOS-only).

Why are indicator values slightly different on the earliest bars?

Recursive indicators (EMA, RSI, MACD) depend on warmup depth and converge as more history loads to the left. KDJ follows the TradingView community seed (K/D start at 0 rather than 50).


How are custom intervals (6m, 90m, 2D) made?

From the longest bar size the exchange has that divides them: Binance's 6 minutes from its 3, 7 minutes from its 1. Crypto minutes and hours restart at midnight UTC each day, the day's last bar shorter where they do not divide a day (7m, 5h), as in TradingView; stocks and futures count from the start of each trading session. Multi-day bars: calendar days for crypto, trading days for stocks and futures (a 2D bar is two sessions, one short over a holiday); weeks count from Monday, months from January. How far back they go is how far back their source goes: CN/HK 1- and 5-minute bars cover days to about six weeks, Yahoo's 1-minute bars 30 days. Binance's 8h, 3D and 6h bars built this way match Binance's own bar for bar, OHLC and volume.

Development, Testing & Release

  • Headless UI tests: cd work && go test ./... drives real clicks and drags via MyGo ui.Tester offline.
  • Live feed tests: CANDLE_LIVE=1 go test -run TestLive ., TestExchangesLive, TestYahooForexLive, and TestTencentLive in ./market.
  • Refresh screenshots:
    # English screenshots -> docs/screenshots/en
    cd work && CANDLE_README=/tmp/shots-en CANDLE_README_LANG=en go test -run TestReadmeShots .
    cd .. && uv run --with pillow python tools/shots.py /tmp/shots-en docs/screenshots/en
    
    # Chinese screenshots -> docs/screenshots
    cd work && CANDLE_README=/tmp/shots-zh go test -run TestReadmeShots .
    cd .. && uv run --with pillow python tools/shots.py /tmp/shots-zh docs/screenshots
  • Signed multi-platform release: Full step-by-step instructions for go-winres, Candle.exe shim, mygo build with Ed25519 updater key, and draft GitHub Release publishing are maintained in README.zh-CN.md.
  • Website maintenance: GitHub Pages publishes directly from docs/ on main (zero build step). Keep docs/index.html (English default), docs/zh.html (Chinese), docs/llms.txt, and docs/sitemap.xml in sync.

Acknowledgments & License

Built with MyGo and coder/websocket, using public market endpoints from Binance, Bybit, MEXC, Yahoo Finance, Eastmoney, and Tencent. Released under the MIT License; third-party license notices are bundled in licenses/.

OpenBar is an independent project with no affiliation with TradingView, Binance, Bybit, or MEXC.

More MyGo apps by the same author: Mami · MySpotify · MyShoes · OpenBar

About

OpenBar — The best open-source native TradingView alternative for Windows & macOS. Built with Go + MyGo (no Electron, login, or API key): crypto, CME futures, forex & stocks, Pine Script v5/v6, 41 layouts, price alerts & bar replay.

Topics

Resources

Stars

119 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages