ta枢轴高度()
此函数返回枢轴高点的价格。如果没有支点高点,则返回“NaN”。
ta.pivothigh()
返回枢轴价格。要使用此价格,不需要进行抵消。偏移只是为了视觉效果。
以下代码将绘制相同的图:
//@version=5
indicator("My script", overlay=true)
rb = 10
ph = ta.pivothigh(10, rb)
var float pivothigh_1 = na
var float pivothigh_2 = na
if (not na(ph))
pivothigh_1 := ph
pivothigh_2 := high[rb]
plot(pivothigh_1, "pivothigh_1", color.green, 1, plot.style_circles)
plot(pivothigh_2, "pivothigh_2", color.red, 1, plot.style_circles)