您能否分享交易视图的pinescript,它应该隐藏当前移动的蜡烛,我的意思是尚未关闭的蜡烛应该是不可见的,一旦关闭它应该是可见的
//@version=4
//Paints an unconfirmed candle gray to remind the trader that the bar can look different by close and reduce mistakes.
study("!", overlay=true)
rt = barstate.isconfirmed
barcolor(rt ? na : color.white, title="Unconfirmed candle")
我尝试了上面的代码,但它仍然显示灯芯颜色,我希望整个蜡烛不可见。 请帮助我
抱歉,没有可用于为灯芯着色的功能,但您可以创建自己的烛台图。
New_Color = not barstate.isconfirmed ? color.new(color.gray, 0) : close >=
open ? color.green : color.red
plotcandle(open, high, low, close, 'New Candles', New_Color, New_Color,
bordercolor = New_Color)