是否可以使用Tradingview API绘制图案(XABCD)?

问题描述 投票:1回答:1

我正在尝试建立一个谐波模式检测系统。我想使用Tradingview UI作为前端,但我想知道是否可以通过他们的API以编程方式绘制这些模式。

在图表上,我们可以手动绘制它,从模式工具箱中选择工具。例如:bat pattern

我们可以设法用代码绘制它吗?

trading algorithmic-trading tradingview-api
1个回答
0
投票

是的,您可以使用TradingView Charting Library使用createMultipointShape()绘制复杂的形状/绘图:

tradingViewWidget.chart.createMultipointShape(
        // indicator points
        [
            {time: pointTime1, price: pointPrice1},
            {time: pointTime2, price: pointPrice2},
            {time: pointTime3, price: pointPrice3},
            {time: pointTime4, price: pointPrice4},
            {time: pointTime5, price: pointPrice5}
        ],
        // settings/overrrides
        {
            shape: 'xabcd_pattern'
        }
    )
© www.soinside.com 2019 - 2024. All rights reserved.