'Add mid point to pivot high low indicator”翻译为'在枢轴高低指标中添加中点”,可以通过以下代码实现:
//@version=4 study("Pivot High Low Indicator with Mid Point", overlay=true)
ph = pivothigh(high, 10, 2) pl = pivotlow(low, 10, 2) mid = (ph + pl) / 2
plot(ph, style=circles, color=color.green) plot(pl, style=circles, color=color.red) plot(mid, style=circles, color=color.yellow, linewidth=2)
fill(ph, pl, color=color.purple, transp=80)