AA Rolling VWAP

AbsoluteAnalytics · study · 8 行 · 点赞 7 · TradingView 原页

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

Pine Script

//@version=6
indicator("AA Rolling VWAP", overlay=true)
len = (input.int(20, title= "Rolling Length", minval=1))
src = input.source(hlc3, title= "Source")
pv = (ta.sma(src * volume, len))
vol = ta.sma(volume, len)
rvwap = vol > 0 ? pv / vol : na
plot(rvwap, "Rolling VWAP 20", color=color.blue, linewidth=2)

← 返回列表