我在ema十字架上绘制了一个标签。是否有可能在标签文本中显示收盘价?下面的代码并不像内置的“关闭”这样的代码。变量I我试图使用。
plotshape(crossover(ema1, ema2), title="Cross Over", style=shape.labelup, location=location.belowbar, color=green, size=size.normal, text=close, textcolor=white, transp=40)
答案 0 :(得分:0)
// mrtuanvn
//@version=4
study("Label at crossed",overlay=true)
crossed =crossover(ema(close,10), ema(close,50))
if crossed
l = label.new(bar_index, na, tostring(close),
color=color.green,
textcolor=color.white,
style=label.style_labeldown, yloc=yloc.abovebar)