TradingView Lightweight Charts 스킬
참조 문서
상세 가이드: docs/tradingview-manual.md
핵심 사용법
설치
pnpm add lightweight-charts
기본 차트 생성
import { createChart } from "lightweight-charts";
const chart = createChart(container, { width: 800, height: 400 });
const series = chart.addCandlestickSeries();
series.setData(ohlcData);
마커 추가
series.setMarkers([
{
time: "2024-01-15",
position: "belowBar",
color: "#2196F3",
shape: "arrowUp",
text: "BUY",
},
]);
Zoom/Pan
chart.timeScale().fitContent();
다크 모드
chart.applyOptions({
layout: {
background: { type: ColorType.Solid, color: "#1a1a2e" },
textColor: "#d1d4dc",
},
});
체크리스트