Pivot High Low Points

LonesomeTheBlue · study · 12 行 · 点赞 2,219 · TradingView 原页

本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。

Pine Script

//
// @author LonesomeTheBlue
//
//@version=3
study("Pivot High Low Points", overlay =true)
lb = input(5, title="Left Bars")
rb = input(5, title="Right Bars")
 
mb = lb + rb + 1
 
plot(iff(not na(high[mb]), iff(highestbars(mb) == -lb, high[lb], na), na), style = cross, linewidth = 3, color = blue, offset = -lb)
plot(iff(not na(low[mb]), iff(lowestbars(mb) == -lb, low[lb], na), na), style = cross, linewidth = 3, color = blue, offset = -lb)

← 返回列表