NexusFi: Find Your Edge


Home Menu

 





multiple day vwap?


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one Big Mike with 22 posts (15 thanks)
    2. looks_two Fat Tails with 17 posts (75 thanks)
    3. looks_3 Neo1 with 16 posts (7 thanks)
    4. looks_4 aslan with 5 posts (3 thanks)
      Best Posters
    1. looks_one Fat Tails with 4.4 thanks per post
    2. looks_two josh with 1.3 thanks per post
    3. looks_3 Big Mike with 0.7 thanks per post
    4. looks_4 Neo1 with 0.4 thanks per post
    1. trending_up 35,014 views
    2. thumb_up 116 thanks given
    3. group 24 followers
    1. forum 91 posts
    2. attach_file 27 attachments




 
Search this Thread

multiple day vwap?

  #61 (permalink)
 
Neo1's Avatar
 Neo1 
Christchurch, New Zealand
 
Experience: Beginner
Platform: SC
Broker: IB, BC, Dx Feed
Trading: US Equities
Posts: 428 since Jul 2014
Thanks Given: 471
Thanks Received: 531

If you compare STD bands from SC to NT( using Fat tails shared indicators), there can be a significant difference when using bigger resolution/ larger time-frames. This is most apparent when looking at data over a small duration, eg the current day. Although using smaller time frames for accuracy is advisable, it could be more important for those using SC.





Also, the rolling VWAP study in SC now functions correctly, it used to plot the wrong look back period.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Deepmoney LLM
Elite Quantitative GenAI/LLM
 
  #62 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

I think that both accuracy and CPU performance are issues with VWAPs.

The accuracy basically depends on two factors

-> input data used
-> model used for calculating the VWAP, if aggregate input data is used


EXACT VWAP

A 100% accurate VWAP can only be calculated from single transactions, tick by tick. This should serve as a reference. The inconvenience of using 1-tick data is the unnecessary CPU load.


VWAP calculated from aggregated data

When aggregated data is used to calculate VWAP and standard deviation bands, there will be an error term. The error term basically depends on

- the resolution of the input data
- the model used to calculate the VWAP for a single bar

Using an advanced model (weighted average of different data points within a single bar) will mitigate the impact of low resolution data and reduce the error term.


Finding the best compromise between accuracy and CPU performance

In my personal experience, the best compromise between accuracy and CPU performance can be obtained when 1-minute data is used as an input series. With 1-min data and a recursive algorithm, CPU load is extremely low and the typical error term is a fraction of a tick only.

Attached you will find three charts

-> VWAP calculated from tick data (100% accurate)
-> VWAP calculated from 1-min data (compromise)
-> VWAP calculated from 5-min data (primary bars)

Values for 2nd SD bands end of day

-> accurate VWAP bands: 212.40 / 210.72
-> VWAP bands calculated from 1-min data: 212.40 / 210.72
-> VWAP bands calculated from 5-min data: 212.38 / 210.73

This is just one example to show that the error term becomes significant, when you use input data with a lower resolution than 1-minute data. And yes, the inaccurate chart looks better than the accurate ones. But that is life.







Reply With Quote
  #63 (permalink)
 
Neo1's Avatar
 Neo1 
Christchurch, New Zealand
 
Experience: Beginner
Platform: SC
Broker: IB, BC, Dx Feed
Trading: US Equities
Posts: 428 since Jul 2014
Thanks Given: 471
Thanks Received: 531



Fat Tails View Post
I think that both accuracy and CPU performance are issues with VWAPs.

The accuracy basically depends on two factors

-> input data used
-> model used for calculating the VWAP, if aggregate input data is used


EXACT VWAP

A 100% accurate VWAP can only be calculated from single transactions, tick by tick. This should serve as a reference. The inconvenience of using 1-tick data is the unnecessary CPU load.


VWAP calculated from aggregated data

When aggregated data is used to calculate VWAP and standard deviation bands, there will be an error term. The error term basically depends on

- the resolution of the input data
- the model used to calculate the VWAP for a single bar

Using an advanced model (weighted average of different data points within a single bar) will mitigate the impact of low resolution data and reduce the error term.


Finding the best compromise between accuracy and CPU performance

In my personal experience, the best compromise between accuracy and CPU performance can be obtained when 1-minute data is used as an input series. With 1-min data and a recursive algorithm, CPU load is extremely low and the typical error term is a fraction of a tick only.


Cheers Fat tails.

I just pointed out the above because I was comparing VWAP bands in SC vs NT vs TOS, and noticed that SC seemed to be more dependent on using a lower resolution( When looking at data over a short duration). My thinking was that it was probably more due to the input used, as you're using "center of gravity" of each bar, where the most accurate in SC appears to come from using the "last".

Reply With Quote
  #64 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,398 since Jun 2009
Thanks Given: 33,173
Thanks Received: 101,537


LukeGeniol View Post
As Fat Tails said, to have the best accuracy you need to run the vwap with st. dev. on tick data.
With SC you can do simply by run it on 1 tick chart (1 # of trades x bar as it called on SC) and then use the Study/Price Overlay Study in the other timeframes charts, referring the vwap Study on the 1 tick chart.

I believe that is completely unnecessary. Just select "use underlying data" and SC automatically does the rest. If I'm wrong someone please correct me.

Sent from my phone

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #65 (permalink)
 
LukeGeniol's Avatar
 LukeGeniol 
Italy (IT) Italy
 
Experience: Advanced
Platform: ATAS, R|Trader, NT8
Broker: Rithmic
Trading: CL, Brent, GC, TF
Frequency: Daily
Duration: Minutes
Posts: 1,499 since Apr 2010
Thanks Given: 408
Thanks Received: 985


Big Mike View Post
I believe that is completely unnecessary. Just select "use underlying data" and SC automatically does the rest. If I'm wrong someone please correct me.

Sent from my phone

No, you are right, I'm using a lot the Overlay Study that I forgot that is as simple

P.s. Remember to set Intraday Data Storage Time Unit to 1 Tick. (generally speaking)

Take your Pips, go out and Live.
Luke.
Reply With Quote
  #66 (permalink)
 
Neo1's Avatar
 Neo1 
Christchurch, New Zealand
 
Experience: Beginner
Platform: SC
Broker: IB, BC, Dx Feed
Trading: US Equities
Posts: 428 since Jul 2014
Thanks Given: 471
Thanks Received: 531


Big Mike View Post
I believe that is completely unnecessary. Just select "use underlying data" and SC automatically does the rest. If I'm wrong someone please correct me.

Sent from my phone

Using underlying data will make the VWAP equal to a 1 tick chart, however the bands still require a lower resolution since the STD computation is based on bars.

As fat tails has pointed you need to be using tick data if you want real bands accuracy( although most of the time there won't be much difference). I knew this, I just didn't realize how significant it could become.

Eg Here's my actual chart showing weekly SPY on a 15min vs an overlay study based on vwap/ bands from a 1 tick chart.

On the 1 tick overlay price tags 3STD, on the 15min it does not.


Reply With Quote
Thanked by:
  #67 (permalink)
 
LukeGeniol's Avatar
 LukeGeniol 
Italy (IT) Italy
 
Experience: Advanced
Platform: ATAS, R|Trader, NT8
Broker: Rithmic
Trading: CL, Brent, GC, TF
Frequency: Daily
Duration: Minutes
Posts: 1,499 since Apr 2010
Thanks Given: 408
Thanks Received: 985


Neo1 View Post
Using underlying data will make the VWAP equal to a 1 tick chart, however the bands still require a lower resolution since the STD computation is based on bars.

As fat tails has pointed you need to be using tick data if you want real bands accuracy( although most of the time there won't be much difference). I knew this, I just didn't realize how significant it could become.

Eg Here's my actual chart showing weekly SPY on a 15min vs an overlay study based on vwap/ bands from a 1 tick chart.

On the 1 tick overlay price tags 3STD, on the 15min it does not.


I did a quick comparison between Vwap with STDs with Study/Overlay from tick chart and the one using the underlying data. the Vwap is always the same, the STDs are different, this become more evident on higher timeframes.

Yellow lines are from overlay 1 tick chart, grey are from using the underlying.



Said that, I'm thinking if other studies that use the underlying data, such as the Volume at Price, TPO profile, Volume and TPO value area lines etc. may have the same problems, although I'm thinking that only Vwap's STDs have not been programmed to use the underlying data.

Maybe @SierraChart can clarify this.

Take your Pips, go out and Live.
Luke.
Reply With Quote
Thanked by:
  #68 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

The VWAP should come with a volume-weighted standard deviation, as it is a better approximation for the standard deviation of the underlying trades.

Both VWAP and standard deviation should use the same data input.

Reply With Quote
Thanked by:
  #69 (permalink)
 
aslan's Avatar
 aslan 
Madison, WI
 
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 625 since Jan 2010
Thanks Given: 356
Thanks Received: 1,127


Fat Tails View Post
The VWAP should come with a volume-weighted standard deviation, as it is a better approximation for the standard deviation of the underlying trades.

Both VWAP and standard deviation should use the same data input.

Correct, and the sc code does this when you specify use Base On Underlying Data. The sc code is there for all to see in studies3.cpp as scoff_VolumeWeightedAveragePrice().

Reply With Quote
Thanked by:
  #70 (permalink)
 
Neo1's Avatar
 Neo1 
Christchurch, New Zealand
 
Experience: Beginner
Platform: SC
Broker: IB, BC, Dx Feed
Trading: US Equities
Posts: 428 since Jul 2014
Thanks Given: 471
Thanks Received: 531



aslan View Post
Correct, and the sc code does this when you specify use Base On Underlying Data. The sc code is there for all to see in studies3.cpp as scoff_VolumeWeightedAveragePrice().

Yeah VWAP is the same on any time-frame providing you select "based on underlying data". However the STD bands are calculated based on bar values, so when using "based on underling data" STD bands on a 1min chart will not be the same as STD bands on a 15min- even though VWAP will be identical. You need to use the overlay study if you wan true band accuracy using higher time frame charts. As pointed out above.

Reply With Quote




Last Updated on December 28, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts