简体   繁体   English

交易视图轻量级图表将时间刻度设置为一小时

[英]Trading veiw Lightweight graph set timescale at one hour

I am currently using lightweight chart for my candlestick graph but i am facing an issue.我目前正在为我的烛台图使用轻量级图表,但我遇到了一个问题。 How can i set my data in candle stick.我如何在烛台中设置我的数据。

My data.我的数据。

"data": [
  {
    "open": "1.18384",
    "high": "1.1845",
    "low": "1.18368",
    "close": "1.18429",
    "date": "2020-08-20 00:00:00"
  },
  {
    "open": "1.18458",
    "high": "1.18483",
    "low": "1.18367",
    "close": "1.18385",
    "date": "2020-08-19 23:00:00"
  },]

How can i set this data need help!我如何设置此数据需要帮助!

Your data have to be correctly formatted as in:您的数据必须正确格式化为:

  • all OHLC data have to be numbers, not string所有 OHLC 数据都必须是数字,而不是字符串
  • date needs to be named time日期需要命名为time

Here's an example:这是一个例子:

[
    {
        time: '2018-12-22',
        open: 162.81,
        high: 167.96,
        low: 160.17,
        close: 160.48,
    },
    {
        time: '2018-12-24',
        open: 160.16,
        high: 161.4,
        low: 158.09,
        close: 158.14,
    },
]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React-DOM:无法将“轻量级图表”中的交易视图画布附加到正文 - React-DOM: Unable to append Trading-view canvas from 'lightweight-charts' to body 是否可以在 React Native 中创建交易图(如照片)? - Is it possible to create trading graph in react native (like in photo)? 如何在交易视图库上设置价格比例? - How to set price scale on Trading View library? (Tradingview轻量级)切换数据时弯曲的折线图arrays - (Tradingview lightweight) Crooked line graph when switch data arrays Pine Editor Trading 查看全局变量,每个柱一个值 - Pine Editor Trading View global variables one value for every bar 使用 Pine 在交易视图上创建价格警报:将一只股票价格除以另一只股票价格 - Creating a Price Alert on Trading View Using Pine: Dividing one stock price by another Stock price 交易视图会在每个柱线关闭时发出警报,我怎么能只有一个? - Trading view alerts every bar close, how can i have just one? 波段交易脚本的伪代码 - Pseudocode for Swing Trading script Pine 脚本/交易视图 - 计算每月交易日 (TDOM) - Pine Script / Trading View - Calculating Trading Day of Month (TDOM) 交易视图打字稿无输出 - Trading View Typescript Emitted no output
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM