NightWish Posted November 27, 2022 Share Posted November 27, 2022 VWAP is a support and resistance line (below the level expect resistance, above the level expect support.) VWAP is very impactful because calculated by incorporating price and volume statistics, can help us in trading. At VWAP level there is a lot of transacted volume and it does benefit scalper that trade with bigger sizes (e.g. institutions, whales, etc.) It's really useful for Scalp Trades. VWAP Can be used on all time frames, from a very high time frame for swing traders, to a very low time frame (1 min) for Scalp traders. VWAP can be yearly, monthly, weekly, daily, session (the most used one) and also ‘anchored’ Big sizes scalps are difficult to trade when there is small volume (e.g. in a sideway move), therefore big traders prefer to trade them into a level with a lot of converging volume where the order gets most probably filled. 1 Quote Link to comment Share on other sites More sharing options...
CryptoDor Posted November 28, 2022 Share Posted November 28, 2022 How to add VWAP to our charts: Press the indicators button. Type in "vwap" and click on the following result: This is how your chart will look like: Double click anywhere on the blue or green like to open the indicator settings: Uncheck everything except the VWAP blue line itself. This is how the chart will start looking like: You can now zoom in in low timeframe like the 5 minutes and see how it was respected (gave support and resistance). Here is an example if resistance on the yellow circles and support at the blue circles. Here is how you can use it in the "future" for possible support expectation. (proving it being a leading indicator) A very zoomed in picture on the one minute chart: 1 Quote Link to comment Share on other sites More sharing options...
CryptoDor Posted November 28, 2022 Share Posted November 28, 2022 Adding the source code of the VWAP written in pinescript for anybody interested: //@version=5 indicator(title="Volume Weighted Average Price", shorttitle="VWAP", overlay=true, timeframe="", timeframe_gaps=true) hideonDWM = input(false, title="Hide VWAP on 1D or Above", group="VWAP Settings") var anchor = input.string(defval = "Session", title="Anchor Period", options=["Session", "Week", "Month", "Quarter", "Year", "Decade", "Century", "Earnings", "Dividends", "Splits"], group="VWAP Settings") src = input(title = "Source", defval = hlc3, group="VWAP Settings") offset = input(0, title="Offset", group="VWAP Settings") showBand_1 = input(true, title="", group="Standard Deviation Bands Settings", inline="band_1") stdevMult_1 = input(1.0, title="Bands Multiplier #1", group="Standard Deviation Bands Settings", inline="band_1") showBand_2 = input(false, title="", group="Standard Deviation Bands Settings", inline="band_2") stdevMult_2 = input(2.0, title="Bands Multiplier #2", group="Standard Deviation Bands Settings", inline="band_2") showBand_3 = input(false, title="", group="Standard Deviation Bands Settings", inline="band_3") stdevMult_3 = input(3.0, title="Bands Multiplier #3", group="Standard Deviation Bands Settings", inline="band_3") if barstate.islast and ta.cum(volume) == 0 runtime.error("No volume is provided by the data vendor.") new_earnings = request.earnings(syminfo.tickerid, earnings.actual, barmerge.gaps_on, barmerge.lookahead_on, ignore_invalid_symbol=true) new_dividends = request.dividends(syminfo.tickerid, dividends.gross, barmerge.gaps_on, barmerge.lookahead_on, ignore_invalid_symbol=true) new_split = request.splits(syminfo.tickerid, splits.denominator, barmerge.gaps_on, barmerge.lookahead_on, ignore_invalid_symbol=true) isNewPeriod = switch anchor "Earnings" => not na(new_earnings) "Dividends" => not na(new_dividends) "Splits" => not na(new_split) "Session" => timeframe.change("D") "Week" => timeframe.change("W") "Month" => timeframe.change("M") "Quarter" => timeframe.change("3M") "Year" => timeframe.change("12M") "Decade" => timeframe.change("12M") and year % 10 == 0 "Century" => timeframe.change("12M") and year % 100 == 0 => false isEsdAnchor = anchor == "Earnings" or anchor == "Dividends" or anchor == "Splits" if na(src[1]) and not isEsdAnchor isNewPeriod := true float vwapValue = na float upperBandValue1 = na float lowerBandValue1 = na float upperBandValue2 = na float lowerBandValue2 = na float upperBandValue3 = na float lowerBandValue3 = na if not (hideonDWM and timeframe.isdwm) [_vwap, _stdevUpper, _] = ta.vwap(src, isNewPeriod, 1) vwapValue := _vwap stdevAbs = _stdevUpper - _vwap upperBandValue1 := _vwap + stdevAbs * stdevMult_1 lowerBandValue1 := _vwap - stdevAbs * stdevMult_1 upperBandValue2 := _vwap + stdevAbs * stdevMult_2 lowerBandValue2 := _vwap - stdevAbs * stdevMult_2 upperBandValue3 := _vwap + stdevAbs * stdevMult_3 lowerBandValue3 := _vwap - stdevAbs * stdevMult_3 plot(vwapValue, title="VWAP", color=#2962FF, offset=offset) upperBand_1 = plot(upperBandValue1, title="Upper Band #1", color=color.green, offset=offset, display = showBand_1 ? display.all : display.none) lowerBand_1 = plot(lowerBandValue1, title="Lower Band #1", color=color.green, offset=offset, display = showBand_1 ? display.all : display.none) fill(upperBand_1, lowerBand_1, title="Bands Fill #1", color= color.new(color.green, 95) , display = showBand_1 ? display.all : display.none) upperBand_2 = plot(upperBandValue2, title="Upper Band #2", color=color.olive, offset=offset, display = showBand_2 ? display.all : display.none) lowerBand_2 = plot(lowerBandValue2, title="Lower Band #2", color=color.olive, offset=offset, display = showBand_2 ? display.all : display.none) fill(upperBand_2, lowerBand_2, title="Bands Fill #2", color= color.new(color.olive, 95) , display = showBand_2 ? display.all : display.none) upperBand_3 = plot(upperBandValue3, title="Upper Band #3", color=color.teal, offset=offset, display = showBand_3 ? display.all : display.none) lowerBand_3 = plot(lowerBandValue3, title="Lower Band #3", color=color.teal, offset=offset, display = showBand_3 ? display.all : display.none) fill(upperBand_3, lowerBand_3, title="Bands Fill #3", color= color.new(color.teal, 95) , display = showBand_3 ? display.all : display.none) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.