historical ohlc support, edit tvWidget to enable.

This commit is contained in:
7400
2024-02-08 12:32:44 -08:00
parent 5465efbd86
commit 4ab0cc9659
4 changed files with 277 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
import {useChartOrderStore} from "@/orderbuild.js";
import {invokeCallbacks, prototype} from "@/common.js";
import datafeed from "./datafeed.js";
export let widget = null
export let chart = null
@@ -29,9 +30,11 @@ export function initWidget(el) {
// debug: true,
autosize: true,
symbol: 'AAPL',
// symbol: 'Bitfinex:BTC/USD', // use this for ohlc
interval: '1D',
container: el,
datafeed: new Datafeeds.UDFCompatibleDatafeed("https://demo-feed-data.tradingview.com"),
// datafeed: datafeed, // use this for ohlc
locale: "en",
disabled_features: [],
enabled_features: [],