fx-chartingDocs
Getting started

Introduction

FX Charting is a complete trading chart for React and Next.js — its own canvas engine, no chart libraries, and three editions from one package.

Drop one component into a page and you get a full chart: symbol search, intervals, chart types, 45 indicators, drawing tools, alerts, multi-chart layouts, bar replay — and in the Max edition paper trading, MQL5 / Pine Script experts and webhooks.

app/page.js
import { FxChart } from "@fx-charting/pro";

export default function Page() {
  return (
    <div style={{ height: "100vh" }}>
      <FxChart symbol="EURUSD" interval="60" />
    </div>
  );
}

Without a datafeed it shows realistic demo prices, so you can build the page first and connect data later. Connecting your own data is a few lines:

Your data in 10 lines
import { FxChart, createDatafeed } from "@fx-charting/pro";

const datafeed = createDatafeed({
  symbols: ["EURUSD", "GBPUSD", "XAUUSD"],
  history: ({ symbol, interval, to, countBack }) =>
    fetch(`/api/bars?symbol=${symbol}&tf=${interval}&to=${to ?? ""}&n=${countBack}`).then((r) => r.json()),
  ticks: (symbol, onTick) => myPriceSocket.subscribe(symbol, (price) => onTick(price)),
});

<FxChart datafeed={datafeed} symbol="EURUSD" />

Where to go next