Support Board
Date/Time: Sun, 02 Nov 2025 04:43:43 +0000
VWAP calculations not matching manual calculations
View Count: 691
| [2021-06-21 03:18:04] |
| GGekko - Posts: 4 |
|
Hello, I am not able to get the values generated by chart study DAY-VWAP to match my own calculations. I am using the formula from: https://www.sierrachart.com/index.php?page=doc/StudiesReference.php&ID=108#Volume_Weighted_Average_Price_-_VWAP_-_with_Standard_Deviation_Lines If I take the first 5 bars: (volume is always 5,000 input is last price) ( 4239.25 x 5,000 ) / 5,000 = 4239.25 (same as Sierra Chart) (( 4237.50 x 5,000 ) + ( 4239.25 x 5,000 )) / (5,000 + 5,000 ) = 4238.375 (same as Sierra Chart) (( 4239.25 x 5,000 ) + ( 4237.50 x 5,000 ) + ( 4239.25 x 5,000 )) / (5,000 + 5,000 + 5,000) = 4238.6666666666666666666666666667. Sierra Chart has: 4238.66650390625 (( 4241.25 x 5,000 ) + ( 4239.25 x 5,000 ) + ( 4237.50 x 5,000 ) + ( 4239.25 x 5,000 )) / (5,000 + 5,000 + 5,000 + 5,000) = 4239.3125 (same as Sierra Chart) (( 4238.25 x 5,000 ) + ( 4241.25 x 5,000 ) + ( 4239.25 x 5,000 ) + ( 4237.50 x 5,000 ) + ( 4239.25 x 5,000 )) / (5,000 + 5,000 + 5,000 + 5,000 + 5,000) = 4239.1 Sierra Chart has: 4239.10009765625 Thank you!! |
| [2021-06-21 10:11:00] |
| User907968 - Posts: 847 |
|
this -> ACSIL Programming Concepts: Floating Point Value Error
|
| [2021-06-21 17:57:04] |
| GGekko - Posts: 4 |
|
Hi User907968, That was really helpful, I had a suspicion something like that was going on. Thanks for confirming & have a lovely day. This ticket can be closed, genuinely appreciate the fast turnaround! Date Time Of Last Edit: 2021-06-21 17:57:30
|
To post a message in this thread, you need to log in with your Sierra Chart account:
