Volatility Weighted Moving Average + Session Average lines

Hi Traders !

Just finished my Y2 university finals exams, and thought I would cook up a quick and hopefully useful script.

VWAP + Session Average Lines :

Volatility Weighted Average Price in the standard case is a trading indicator that measures the average trading price for the user defined period, usually a standard session (D timeframe), & is used by traders as a trend confirmation tool.

This VWAP script allows for altering of the session to higher dimensions (D, W, M) or those of lower dimension (H4, or even H1 timeframes), furthermore this script allows the lookback of data to be switched from the standard session to a user defined amount of bars (e.g. the VWAP of 200 bars as opposed to the VWAP of a standard session which contains 95 bars in M15 timeframe for 24/7 traded assets e.g. BTCUSD), lastly this script plots Session VWAP Average Lines (if true in settings) so tradaes can gauge the area of highest liquidity within a session, this can be interpreted as the fair price within a session. If Average lines are increasing and decreasing consistently like a monotonic function this singles traders interest is at higher / lower prices respectively (Bullish / Bearish bias respectively ?), However if Average lines are centered around the same zones without any major fluctuations this signals a ranging market.

VWAP calculation :

VWAP is derived from the ratio of the assets value to total volume of transactions where value is the product of typical price (Average of high, low and close bars / candles) and corresponding bar volume, value can be thought of as the dollar value traded per bar.

How is VWAP used by Institutions / Market movers :

For some context and general information, VWAP is typically used by Market movers (e.g. Hedge funds, Mutual funds ,..., ...) in their trade execution, as trading at the VWAP equals the area of highest market volume, trading in line with the volume of the market reduces transaction costs by minimizing market impact (extra liquidity lowers spreads and lag time between order fills), this overall improves market efficiency.

In my opinion the script is best used with its standard settings on the M15 timeframe, note as of now the script is not functional on certain timeframes, however this script is not intended to be used in these timeframes, i will try fix this code bug as soon as possible.
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.


Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?