Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 15:29:58 +0000



calculation of vwap

View Count: 527

[2023-11-05 00:15:06]
User701028 - Posts: 6
Hello, from what i understand the VWAP formula on sierrachart does not take the entire information of the volume at price but only the close or the open or the OHLC etc.. So after looking at the documentation i saw that if i use a tick by tick chart it will use the entire volume information and be as accurate as possible and its very good, But i would like to have the entire data of volume in the calculation of vwap without using a tick by tick chart is that possible? If i use the calculation of vwap on the studie volume by price does it take all the information in terms of volume for the calculation, and if yes i think i cant display standard deviation of vwap on VBP it so its still not what i need.

I wish i could calculated vwap and his standard deviations based on all the prices of my chart ponderated by the volume of each line. ill use an exemple to explain what i mean :
Imagine i have 1 candle, the first one has the following values in it : price = 1000 --> 100 volume // price = 1001 --> 50 volume // price = 1002 --> 30 volume // price = 1003 --> 200 volume
So the math should be (1000x100) + (1001x50) + (1002x30) + (1003x200) / 380 = vwap. ( so i want it to calculate based on all the values of price and volume in the period )

So what i need is basicly the vwap + the standard deviation of it, based on the entire VBP of the period i want to analyse without having to use a tick by tick chart. I hope you get what i mean.. English is not my native langage if you need more explaination or if its not clear i can try to explain better just tell me if needed.

Do you guys have a solution to my problem?
[2023-11-06 15:52:26]
John - SC Support - Posts: 36294
You do not need to use an actual 1 Tick chart, you just need to ensure that your data is stored in 1 tick increments. In other words, make sure the setting for "Global Settings >> Data/Trade Service Settings >> Common Settings >> Intraday Data Storage Time Unit" is set to "1 tick". Refer to the following:
Data/Trade Service Settings: Intraday Data Storage Time Unit (Global Settings >> Data/Trade Service Settings >> Common Settings >> Common Settings)

Also, if you are using the "Volume Weighted Average Price" study itself, you will want to set the Input for "Base on Underlying Data" to "Yes". Refer to the following:
Volume Weighted Average Price (VWAP) with Standard Deviation Lines: Inputs

If you are using the Volume by Price study, then just make sure you set the Input for "Ticks per Volume Bar" to "1". Refer to the following:
Volume By Price Study: Ticks Per Volume Bar

You will then get the VWAP that you are wanting regardless of the Bar Period of the chart.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-11-06 16:12:34]
User701028 - Posts: 6
Ok ok just one last thing, in the settings and inputs of the studie volume weighted average price, the first line is " Input data " should i pick " last " or something else? Thank you for helping
[2023-11-06 17:13:45]
John - SC Support - Posts: 36294
That is really your choice as to which price to use for each bar. Keep in mind that you have several options including "OHLC Average", "HLC Average" and "HL Average".
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-11-06 17:50:56]
User701028 - Posts: 6
im confused the value of vwap change when i change the "input data" so it mean it doesnt take the entire values of the candles ponderated by the volume of each price it only take the value that are used as "input data" no? i want to calculate based on all the values of the candles not the last not the open not ohlc but all the values. I must missed something somewhere i really dont get what im missing.
[2023-11-06 21:47:11]
John - SC Support - Posts: 36294
Sorry, we did not understand that this was what you were looking for from your first post.

We do not do the calculation in this way. Or, as you have stated previously, you would have to use a 1 tick chart in order to get the information, since each bar is only a single price.

Another option would be to create your own study to do this. Refer to the following:
Advanced Custom Study Interface and Language (ACSIL)
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-11-06 22:37:38]
User701028 - Posts: 6
ok no problem thank you sir
[2023-11-13 17:20:46]
Sierra_Chart Engineering - Posts: 17181
If Based On Underlying Data Input is set to Yes, then changing the Input Data input is not going to affect the volume weighted average price line itself.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account