指示器(标题=头皮BTC M5,timeframe="5")
第一指标: ZLSMA
length = input(title='Length', defval=50)
offset = input(title='Offset', defval=0)
src = input(close, title='Source')
lsma = ta.linreg(src, length, offset)
lsma2 = ta.linreg(lsma, length, offset)
eq = lsma - lsma2
zlsma = lsma + eq
plot(zlsma, color=color.new(color.yellow, 0), linewidth=3)
第二个指标: AO
ao_fast = input(5, 'AO Fast EMA Lenth')
ao_slow = input(34, 'AO Slow EMA Length')
ao = ta.ema(hl2, ao_fast) - ta.ema(hl2, ao_slow)
color_ao = ta.change(ao) > 0 ? #115500 : #992211
plot(ao, style=plot.style_columns, color=color_ao, transp=0)
第三个指标: HVI
len = input(10)
HV = ta.highest(volume, len)
HVI = volume * 100 / HV[1]
plot(HVI, color=color.new(color.black, 0), title='HVI')
band1 = hline(100)
band0 = hline(50)
fill(band1, band0, color=color.new(color.purple, 90))
因此,第一个指标应该在15‘分钟内,其他指标在5’分钟内。指示灯的读数将在5分钟后在图表上进行。
发布于 2022-08-13 10:49:27
https://stackoverflow.com/questions/73343369
复制相似问题