简体   繁体   English

如何在 Pine Script 中设置行的长度

[英]How to set the length of a line in Pine Script

I have some fibs extensions on the chart and I want to make the length of the lines smaller.我在图表上有一些 fibs 扩展,我想让线条的长度更小。

For example, you can make a line going full length across the chart, but how do I change length?例如,您可以使一条线在图表上全长,但如何更改长度?

Thanks!谢谢!

// First we need a line: // 首先我们需要一行:

highLine = line.new(x1=bar_index[50], y1=high[50], 
 x2=bar_index[15], y2=high[15], color=color.teal)

//... //...

// Change the existing line's width // 改变现有线的宽度

line.set_width(id=highLine, width=lineWidth)

More on: https://www.tradingcode.net/tradingview/trend-line-size-input/更多信息: https://www.tradingcode.net/tradingview/trend-line-size-input/

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

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