如何更具体地将label.new()定位? V5
这是我的标签,与蜡烛混乱:
label.new(bar_index, high, color=color.red, textcolor=color.white, text="Blah Blah")
如何将其定位得更高,以便在蜡烛后面?
Here's my label, messing with the candles:
label.new(bar_index, high, color=color.red, textcolor=color.white, text="Blah Blah")
How to position it higher, to get out behind the candles?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您不指定
yloc
label.new()
的参数时,它将使用PRICE
您在第二个参数中传递 - 在您的情况下,是高
。这就是为什么标签完全指向高价的原因。您可以使用
yloc
参数与yloc.abovebar
(lbl_red
下面),也可以将数学公式与价格一起使用(<代码> lbl_green 下面)。When you don't specify the
yloc
argument oflabel.new()
, it will use theprice
you pass in the second argument -which in your case ishigh
. That's why the label points exactly to the high price.You can use the
yloc
argument with something likeyloc.abovebar
(lbl_red
below) or you can use a mathematical formula together with the price (lbl_green
below).如果您需要标签y的距离,则使用一定量的最高值和最低值,然后将一定数的(最高)添加到蜡烛高(最高)
if you need the label Y distance rather consistent use the highest value and lowest value of a certain amount of bars and add a percentage of (highest - lowest) to the candle high