希望在除5分钟以外的所有时间帧上隐藏指示器



我有一个代码来显示正在吞噬的蜡烛,我只想让它在5分钟的时间范围内显示,并隐藏在其他所有东西上。有办法做到这一点吗?

这是代码:

//@version=4
study("AW Enties Current", overlay=true)

// Get bearish engulfing
bearishEC = close < open[1] and close[1] > open[1]
bullishEC = close > open[1] and close[1] < open[1]
// Plot EC to chart
plotshape(bearishEC, title="Short", location=location.abovebar, color=color.red, transp=0, 
style=shape.triangledown)
plotshape(bullishEC, title="Long", location=location.belowbar, color=color.green, transp=0, 
style=shape.triangleup)
//@version=4
study("AW Enties Current", overlay=true)
// Get bearish engulfing
bearishEC = close < open[1] and close[1] > open[1]
bullishEC = close > open[1] and close[1] < open[1]
show = timeframe.period == "5"
// Plot EC to chart
plotshape(show and bearishEC, title="Short", location=location.abovebar, color=color.red, transp=0, style=shape.triangledown)
plotshape(show and bullishEC, title="Long", location=location.belowbar, color=color.green, transp=0, style=shape.triangleup)

最新更新