简体   繁体   English

我们如何在 TradingView Pine 脚本语言中绘制散点图?

[英]How can we draw a scatter chart in TradingView Pine script language?

我看到很多跨时间绘制一个符号的示例,但与绘制 x 与 y 无关。

Pine uses time series as its core data type, TV's charting engine is optimized for the display of time series and the input data Pine scripts use for calculations is usually time series, so time is usually going to be your x axis. Pine 使用时间序列作为其核心数据类型,TV 的图表引擎针对时间序列的显示进行了优化,Pine 脚本用于计算的输入数据通常是时间序列,因此时间通常是您的 x 轴。 The y axis can be price, but anything else as well. y 轴可以是价格,但也可以是其他任何东西。

Note that you could always decide that bar_index means something other for you than one unit of time, but then data has to be fed manually into series using literals, as there is no way to import series from the external world into Pine scripts, unless it's available from the TV-supplied feeds, and you will be forced to display your data using a time-based rendering engine and UI.请注意,您总是可以决定bar_index对您bar_index意味着除一个时间单位之外的其他内容,但是必须使用文字将数据手动输入到系列中,因为无法将外部世界中的系列导入到 Pine 脚本中,除非它是可以从电视提供的源中获得,并且您将被迫使用基于时间的渲染引擎和 UI 来显示您的数据。

You can draw scatter charts, but the x axis will be time, as RicardoSantos does here :您可以绘制散点图,但 x 轴将是时间,正如 RicardoSantos 在这里所做的那样:

在此处输入图片说明

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM