是否可以使用 Tradingview api 绘制形态 (XABCD)?
Is it possible to draw a pattern (XABCD) with Tradingview api?
我正在尝试构建谐波模式检测系统。我想在前端使用 Tradingview UI,但我想知道是否可以通过它们的 API.
以编程方式绘制这些模式
在图表上,我们可以手动绘制,从模式工具箱中选择工具。例如:
bat pattern
我们可以用代码画出来吗?
是的,您可以在使用 TradingView Charting Library 时使用 createMultipointShape()
绘制复杂的 shapes/drawings:
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'
}
)
我正在尝试构建谐波模式检测系统。我想在前端使用 Tradingview UI,但我想知道是否可以通过它们的 API.
以编程方式绘制这些模式在图表上,我们可以手动绘制,从模式工具箱中选择工具。例如: bat pattern
我们可以用代码画出来吗?
是的,您可以在使用 TradingView Charting Library 时使用 createMultipointShape()
绘制复杂的 shapes/drawings:
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'
}
)