NexusFi: Find Your Edge


Home Menu

 





anaVWAP Drawing Issue?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 13 posts (35 thanks)
    2. looks_two syxforex with 7 posts (0 thanks)
    3. looks_3 Big Mike with 6 posts (11 thanks)
    4. looks_4 srgtroy with 4 posts (1 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.7 thanks per post
    2. looks_two Big Mike with 1.8 thanks per post
    3. looks_3 jocomoco with 1 thanks per post
    4. looks_4 TimeTrade with 1 thanks per post
    1. trending_up 12,707 views
    2. thumb_up 49 thanks given
    3. group 8 followers
    1. forum 37 posts
    2. attach_file 17 attachments




 
Search this Thread

anaVWAP Drawing Issue?

  #31 (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,469 since Jun 2009
Thanks Given: 33,247
Thanks Received: 101,669

I'm confused by "forum VWAP". Is this a NT-staff written indicator or an included out of the box indicator? If yes, why not notify @NinjaTrader so they can correct it or remove it? It's not on futures.io (formerly BMT) right?

If it's a user contributed study then probably all you can do is leave negative feedback/rating on it to warn others it is not accurate, or perhaps ask NT to edit the description of the indicator if they don't have a rating system implemented to warn people.

Mike



Join the free Markets Chat beta: one platform, all the trade rooms!

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

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #32 (permalink)
 
Silvester17's Avatar
 Silvester17 
Columbus, OH
Market Wizard
 
Experience: None
Platform: NT 8, TOS
Trading: ES
Posts: 3,603 since Aug 2009
Thanks Given: 5,139
Thanks Received: 11,527


Big Mike View Post
I'm confused by "forum VWAP". Is this a NT-staff written indicator or an included out of the box indicator? If yes, why not notify @NinjaTrader so they can correct it or remove it? It's not on futures.io (formerly BMT) right?

If it's a user contributed study then probably all you can do is leave negative feedback/rating on it to warn others it is not accurate, or perhaps ask NT to edit the description of the indicator if they don't have a rating system implemented to warn people.

Mike

@Big Mike,

it's a nt staff written indicator (josh).

https://forum.ninjatrader.com/local_links.php?catid=4&sort=N&pp=15&page=11

Reply With Quote
  #33 (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,469 since Jun 2009
Thanks Given: 33,247
Thanks Received: 101,669



Silvester17 View Post

OK so lets yell at @NinjaTrader and @NinjaTrader Support and make sure they are aware of it.

Mike



Join the free Markets Chat beta: one platform, all the trade rooms!

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
  #34 (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,103


Big Mike View Post
I'm confused by "forum VWAP". Is this a NT-staff written indicator or an included out of the box indicator? If yes, why not notify @NinjaTrader so they can correct it or remove it? It's not on futures.io (formerly BMT) right?

If it's a user contributed study then probably all you can do is leave negative feedback/rating on it to warn others it is not accurate, or perhaps ask NT to edit the description of the indicator if they don't have a rating system implemented to warn people.

Mike

@Big Mike: Many of the indicators published on all forums have bugs. The VWAP on the NinjaTrader forum has a few more bugs, as it both produces false results and easily kills the CPU with COBC set to false. Use it at your own risk.

There are already various threads on the NinjaTrader forum, where the bugs of this indicator have been discussed. One of the guys has even modified it and published a new version called hVWAP. This is one has some of the problems addressed. No reason to call Ray. Otherwise you would need to call him every day.

To be honest ... the plot of my newly published SessionPivots also has bugs, and I will have to replace it tomorrow. The CPU efficiency of the relative volume indicator that I have coded some time ago, is comparable to the NinjaTrader VWAP as well. I will have to rework it, but time is the limiting factor, so I let it temporarily go.

VWAPs are particularly difficult to code. I have now scanned the available algorithms and will settle for a weighted incremental algorithm, which will further increase accuracy and reduce CPU load by a factor 5 or 10. This is still work in progress, and as long as I have not finished it, you will have to live with the anaCurrentDayVWAP, which is already good, but certainly not good enough.

So far I have only used one data point per bar to calculate the variance, and this has also proved to be insufficient. The error term mostly affects the RTH VWAP because it starts at full speed with the first bar after the regular open and is more sensitive to incomplete information. This what can be done:

-> replace one data points with all 4 points of a bar (open, high, low & close) both for calculating the VWAP and for calculating the variance
-> give a higher weight to open and close compared to high and low in order to simulate an intrabar price volume distribution
-> redesign algorithm to gain speed and reduce numerical instability, overflow and rounding errors due to internal representation of numbers

I am not a great mathematician, so far I had ignored the existence of a few things such as Steiner's translation theorem. I guess I should have read

Donald E.Knuth: The Art of Computer Programming, Vol 2 - Seminumerical Algorithms

long time ago, but I didn't. I finally found what I have looked for, a numerically stable and fast algorithm, see formula (2.1b) of the paper attached below.


anaVWAP Drawing Issue?-tony-chan-gene-golub-randalf-leveque-algorithms-computing-sample-variances.pdf


Selecting an appropriate algorithm for the variance of the VWAP is not the easiest task, unless you have graduated in computer science or mathematics. Let the VWAPs be what they are, as long as the colors are acceptable!

Reply With Quote
  #35 (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,469 since Jun 2009
Thanks Given: 33,247
Thanks Received: 101,669

I think NinjaTrader is in processes of removing the indicator from their listing.

Sent from my Nexus 4



Join the free Markets Chat beta: one platform, all the trade rooms!

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
Thanked by:
  #36 (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,103


Big Mike View Post
I think NinjaTrader is in processes of removing the indicator from their listing.

Sent from my Nexus 4



Is that dog digging for a black swan?

Reply With Quote
Thanked by:
  #37 (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,103

The pretty bad performance of the forum VWAP has lead me to a detailed analysis of my own VWAP, the anaCurrentDayVWAP, and I must say that it is also inaccurate and too slow.

The main problem of all VWAPs so far was the limiation imposed by selecting a single data point per bar to perform calculations. This is of course utterly stupid. A price bar contains more information than just the close or an average price. A price bar contains 5 values, the open, the high, the low, the close and the volume. The four values containing price data are just an approximation for a price volume distribution. For the purpose of calculating the VWAP and the standard deviation, I will now use all 4 of them. However, high and low are at the end of the volume distribution, so a smaller weight should be applied compared to the open and the close. As a first approximation I used a factor 2 for the open and the close, but 1 for high and low.

The next improvement is the use of a numerically stable (with respect to rounding and overflow errors) weighted incremental algorithm. I will report the details in a separate thread.

The results are do far astonishing with respect to both accuracy and speed. Below is attached a screenshot of the redesigned VWAP. The green bands are calculated by using the newly developed algorithm, the blue bands stem from the original algorithm. You can see that there is a noteworthy difference. The green bands are both more accurate and smoother than the old bands.

The same concept can be applied to Bollinger Bands, which are inherently flawed for many reasons.



Reply With Quote
  #38 (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,469 since Jun 2009
Thanks Given: 33,247
Thanks Received: 101,669

Thx Harry. Let me know when the Download section indicator is uploaded, and I'll send notifications.

Mike



Join the free Markets Chat beta: one platform, all the trade rooms!

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
Thanked by:




Last Updated on March 9, 2013


© 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