DemoOrder và position trên biểu đồ

Order và position trên biểu đồ

import { ChartWidget } from '@tradecanvas/chart/widget'

// feed: your DataAdapter (a WebSocketAdapter, or your own class)
const widget = new ChartWidget(document.getElementById('chart')!, {
  symbol: 'BTCUSDT',
  timeframe: '1m',
  theme: 'light',
  adapter: feed,
  trading: true,       // order ticket, orders and positions on the chart
})

// Each order from the ticket, the chart or the ladder reaches you here.
widget.getChart().on('orderPlace', (order) => broker.place(order))
import { ChartWidget } from '@tradecanvas/chart/widget'

// feed: your DataAdapter (a WebSocketAdapter, or your own class)
const widget = new ChartWidget(document.getElementById('chart')!, {
  symbol: 'BTCUSDT',
  timeframe: '1m',
  theme: 'dark',
  adapter: feed,
  trading: true,       // order ticket, orders and positions on the chart
})

// Each order from the ticket, the chart or the ladder reaches you here.
widget.getChart().on('orderPlace', (order) => broker.place(order))

● Dữ liệu thị trường giả lập, tạo trong trình duyệt của bạn

Một màn hình hoàn chỉnh có sẵn: order ticket, order và position trên biểu đồ, cắt lỗ và chốt lời kéo được, watchlist, cảnh báo và bar replay.

Lệnh giới hạn, lệnh stop và lệnh bracket nằm trên trục giá. Kéo một đường để sửa lệnh.

API: ChartWidget