TradingView
groks
25 Th02 2021 16:56

Origin VWAP: OVWAP 

Fastly, Inc.NYSE

Mô tả

Draw a VWAP support/resistance line anchored to the origin of the data series (like a daily VWAP, but from the beginning of time, never resetting).

Ideally the origin would be the first bar after the IPO. Tradingview (or your connected broker) doesn't always have a complete dataset, and in that case the OVWAP will be 'wrong', but converging to the correct value over time.

You can try to simulate this with the built-in VWAP indicator but it has several bugs and limitations. Firstly, the longest time period is century, but it is not 100 years, ie. a rolling century but the beginning of the century: 21 years ago. Secondly, even if your dataset is less than 21 years, if you use a lower time frame then the built-in VWAP's origin becomes the left-most loaded bar (about 5,000 bars ago) - it will draw the wrong value. The new Anchored VWAP drawing tool can't be used on lower time frames as it won't draw the line at all unless it sees the point where you anchored it.

You may want to cut 'n paste this code to use in some larger strategy. Unfortunately that's probably not possible. This script uses the 'resolution=' option of 'study()' set to '1W', so the whole script runs at the 1 week resolution. You would think it would be possible to instead use the 'security()' function to request data at the '1W' resolution, but it just resamples the current data set and so is limited to the rightmost 5,000 bars.

Look in the options to enable standard deviation lines.

Phát hành các Ghi chú

Update standard deviation bands calculation.

Phát hành các Ghi chú

(Fix example chart to remove stray drawings)
Bình luận
THELEGENDSINGH
great one
Omni-Trading
looks like your scaling is off
groks
@OmniTekTrading, How so?
Omni-Trading
@groks, how do you identify support and resistance?
groks
@OmniTekTrading, After price moves away from OVWAP it seems to get sucked back and possibly bounce off it. Add it to your chart and flick between some symbols you're familiar with.

I like the fact that it has no settings and is resolution independent. It is unbiased. Whether it's useful, is up to you :-)
Omni-Trading
@groks, yeah i agree with the unbias part I would suggest writing your own STDEV function if that is the route you are wanting to take
Thêm nữa