TheYangGuizi

VWAP MTF (Multi Timeframe)

VWAP that can be be plotted from different timeframes.

Ex if you chose 60 min, it will plot a new vwap line at the start of every hour.

Intraday:
Used code from SandroTurriate to create this.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
study("VWAP MTF",overlay=true)

TimeFrame = input('W')
start = security(tickerid, TimeFrame, time)

//------------------------------------------------
newSession = iff(change(start), 1, 0)
//------------------------------------------------
vwapsum = iff(newSession, hl2*volume, vwapsum[1]+hl2*volume)
volumesum = iff(newSession, volume, volumesum[1]+volume)
v2sum = iff(newSession, volume*hl2*hl2, v2sum[1]+volume*hl2*hl2)
myvwap = vwapsum/volumesum
dev = sqrt(max(v2sum/volumesum - myvwap*myvwap, 0))
Coloring=close>myvwap?green:red
av=myvwap
showBcol = input(false, type=bool, title="Show barcolors")
showPrevVWAP = input(false, type=bool, title="Show previous VWAP close")
prevwap = iff(newSession, myvwap[1], prevwap[1])
plot(showPrevVWAP ? prevwap : na, style=circles, color=close > prevwap ? green : red)

A=plot(av, style=circles, color=Coloring)

barcolor(showBcol?Coloring:na)