本文主要是介绍vue TradingView设置均线和隐藏均线,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
设置均线
//均线_this.MALine5 = widget.chart().createStudy("Moving Average", false, false, [5, "close", 0], null, {"Plot.color": "green","Plot.linewidth": 0,});_this.MALine10 = widget.chart().createStudy("Moving Average", false, false, [10, "close", 0], null, {"Plot.color": "red","Plot.linewidth": 0,});_this.MALine20 = widget.chart().createStudy("Moving Average", false, false, [20, "close", 0], null, {"Plot.color": "#409EFF","Plot.linewidth": 0,});
位置截图:
在onChartReady里面 和自定义周期同级
隐藏均线
在设置的下面.setVisible(false)即可
//均线_this.MALine5 = widget.chart().createStudy("Moving Average", false, false, [5, "close", 0], null, {"Plot.color": "green","Plot.linewidth": 0,});_this.MALine10 = widget.chart().createStudy("Moving Average", false, false, [10, "close", 0], null, {"Plot.color": "red","Plot.linewidth": 0,});_this.MALine20 = widget.chart().createStudy("Moving Average", false, false, [20, "close", 0], null, {"Plot.color": "#409EFF","Plot.linewidth": 0,});widget.chart().getStudyById(_this.MALine5).setVisible(false);widget.chart().getStudyById(_this.MALine10).setVisible(false);widget.chart().getStudyById(_this.MALine20).setVisible(false);
vue TradingView k线地址 : https://blog.csdn.net/pxhing/article/details/106997657.
vue TradingView为k线做标记: https://blog.csdn.net/pxhing/article/details/118584281.
这篇关于vue TradingView设置均线和隐藏均线的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!