需要一点帮助,我不想在每根蜡烛下都贴上标签
需要一点帮助,下面的代码工作正常,但看起来很脏,因为它将标签放在每个蜡烛下面,有没有办法防止这种情况。
//@version=5
indicator(title='4EMA', shorttitle='4EMA', overlay=true)
show = input.bool(true, title="Cash Control Strateji", group='Stratejiler')
Length1 = input.int(8, minval=1)
Length2 = input.int(13, minval=1)
Length3 = input.int(21, minval=1)
Length4 = input.int(55, minval=1)
xPrice = close
xEMA1 = ta.ema(xPrice, Length1)
xEMA2 = ta.ema(xPrice, Length2)
xEMA3 = ta.ema(xPrice, Length3)
xEMA4 = ta.ema(xPrice, Length4)
plot(xEMA1, color=color.new(color.blue, 0), title='4EMA 8')
plot(xEMA2, color=color.new(color.green, 0), title='4EMA 13')
plot(xEMA3, color=color.new(color.orange, 0), title='4EMA 21')
plot(xEMA4, color=color.new(color.red, 0), title='4EMA 55')
a = ta.ema(close, Length1)
b = ta.ema(close, Length2)
c = ta.ema(close, Length3)
d = ta.ema(close, Length4)
condition = (a>b) and (b>c) and (c>d)
plotshape(show ? condition : na,title='Heikinashi Strateji', text='Ha.Al.', location=location.belowbar, style=shape.labelup, size=size.tiny, color=color.new(color.green, 0), textcolor=color.new(color.white, 0))
need a little help, the code below works fine but it looks so dirty because it puts labels under each candle, is there a way to prevent this.
//@version=5
indicator(title='4EMA', shorttitle='4EMA', overlay=true)
show = input.bool(true, title="Cash Control Strateji", group='Stratejiler')
Length1 = input.int(8, minval=1)
Length2 = input.int(13, minval=1)
Length3 = input.int(21, minval=1)
Length4 = input.int(55, minval=1)
xPrice = close
xEMA1 = ta.ema(xPrice, Length1)
xEMA2 = ta.ema(xPrice, Length2)
xEMA3 = ta.ema(xPrice, Length3)
xEMA4 = ta.ema(xPrice, Length4)
plot(xEMA1, color=color.new(color.blue, 0), title='4EMA 8')
plot(xEMA2, color=color.new(color.green, 0), title='4EMA 13')
plot(xEMA3, color=color.new(color.orange, 0), title='4EMA 21')
plot(xEMA4, color=color.new(color.red, 0), title='4EMA 55')
a = ta.ema(close, Length1)
b = ta.ema(close, Length2)
c = ta.ema(close, Length3)
d = ta.ema(close, Length4)
condition = (a>b) and (b>c) and (c>d)
plotshape(show ? condition : na,title='Heikinashi Strateji', text='Ha.Al.', location=location.belowbar, style=shape.labelup, size=size.tiny, color=color.new(color.green, 0), textcolor=color.new(color.white, 0))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您只想在第一次出现时获得它们,您可以这样做:
干杯,祝您好运
if you want them just on the first occurrence you can do this:
Cheers and best of luck