pine script - drawing for loop number on chart bar with label.new - Stack Overflow

I tried to draw out the "for loop" number with using label.new and str.tostring[i] in the fol

I tried to draw out the "for loop" number with using label.new and str.tostring[i] in the following script. However, the number drawing is more than what the "for loop" number is, the "for loop" number is 0 to 9 (this is only 10 ), but the label drawing on the chart is more than 10.

//@version=6
strategy("History referencing", overlay = true)

if barstate.isconfirmed
    for i = 0 to 9  
        label.new(
            bar_index - i,
            high[i],
            str.tostring(i),
            textcolor = color.white,
            size = size.large
        )

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744286616a4566829.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信