一个脚本,如果当前栏关闭高于前一个栏打开,将绘制一个向上的箭头



一直在尝试写一个脚本,如果一个看涨的酒吧收于上一熊市上方。

使用聊天gpt。没有运气。帮助吗?

我尝试了几次聊天gpt。没有运气

//@version = 5指示器(title="Higher closing with arrow ", overlay=true)

//检查close是否高于先前的closecloseHigher = barstate。已确认并(关闭>关闭[1])

//为更高的close创建警报条件alertcondition(closeHigher, title="Higher close ", message="当前关闭比前一个关闭高。", shape=alert.shape_arrow_up)

//当条件为真时向上绘制箭头plotshape (closeHigher、风格=形状。arrowup颜色=颜色。绿色=大小。小,位置=位置。

如果你想要一个箭头每当一个栏比前一个栏关闭时,这将会做

//@version=5
indicator("My script", overlay = true)
highClose = close > close[1]
plotshape(highClose, 'Higher Close', shape.arrowup, location.belowbar, color.green)

相关内容

最新更新