// This Strategy was Created by ©NoobSharks // if you use it and like it, send us some donation: BinancePay ID: 223731148 - Metamask: 0x82782b3ebD1d6bf7faa18a3943fA6f16EBBF3134 // (yes, I might be naive but I trully Believe you will support us) // For more information about this indicator check "https://www.youtube.com/@noobsharks" and give us a hand following us on YouTube // Check also our website includeing strategies, free indicatores and technical analysis videos: https://www.noobsharks.com //@version=5 indicator(title = "[NBpkg] Indicator - Moving VWAP Adjustable Timeframe", shorttitle = '[NB]IND.MVWAP.AdjTF', overlay=true) // ----- INPUTS res = input.timeframe(title="", defval='60') length = input.int(title='Length', defval=10) // ----- Functions MVWAP(price, length) => uvol = volume uprc = price uwgt = volume * price for i = 1 to length - 1 by 1 uvol += volume[i] uwgt += volume[i] * price[i] uwgt uwgt / uvol // ----- Plotting plot(request.security(syminfo.tickerid, res, MVWAP(close, length)), title='Moving VWAP Close', linewidth=2, color = color.rgb(87, 110, 32)) plot(request.security(syminfo.tickerid, res, MVWAP(high, length)), title='Moving VWAP High', linewidth=2, color = color.rgb(206, 252, 100)) plot(request.security(syminfo.tickerid, res, MVWAP(low, length)), title='Moving VWAP Low', linewidth=2, color = color.rgb(248, 247, 168))