anaVWAP Drawing Issue? - futures io
futures io futures trading



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 8,381 views
    2. thumb_up 49 thanks given
    3. group 8 followers
    1. forum 37 posts
    2. attach_file 17 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

anaVWAP Drawing Issue?

(login for full post details)
  #1 (permalink)
Legendary Market Wizard
Los Angeles, California Republic
 
Experience: None
Platform: Sierra Chart
Broker: CQG
Trading: ES
 
srgtroy's Avatar
 
Posts: 1,936 since Jan 2011
Thanks: 1,375 given, 3,714 received

I've noticed a small but significant issue with anaCurrentDayVWAPV38. If I compare it to GomMP VWAP, it generally produces the same result, however, it seems to draw it slightly off so that price action doesn't exactly respect the visual level. The following are not isolated incidents but rather occur often, albeit at a small level.





Note the prices are the same, but the visual levels are not.

Another example:





Can anything be done to fix this small discrepancy. Otherwise, sometimes it appears that price has crossed the anaVWAP when it hasn't or vice versa.

Learn The Rules Well So You Can Break Them Effectively
Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
MACD line not plotting after change of plot order
NinjaTrader
Reading A set of Trading Signals
EasyLanguage Programming
Help Needed: TOS Options Chain IV & IMPL MOVE Calcul …
ThinkOrSwim
Second Entry Indicator (Looking for testers/feedback)
NinjaTrader
Automatic pattern research with NT
Elite Algorithmic NinjaTrader Trading
 
 
(login for full post details)
  #2 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


srgtroy View Post
I've noticed a small but significant issue with anaCurrentDayVWAPV38. If I compare it to GomMP VWAP, it generally produces the same result, however, it seems to draw it slightly off so that price action doesn't exactly respect the visual level. The following are not isolated incidents but rather occur often, albeit at a small level.

How did you conclude that the anaCurrentDayVWAP is slightly off and not the GomMPVWAP?

If you are within the session and price action continues, the VWAP cannot be a horizontal line, but it must follow price action. That is if prices are above the VWAP, the VWAP should rise and if prices are below the VWAP, the VWAP should fall. In any case it cannot be stable during the session.

Depending on the data used for calculating a VWAP there can be a slight inaccuracy. The correct VWAP can only be calculated from tick-by-tick data by using every single trade. The anaCurrentDayVWAP38 uses an approximation for calculating the average price, as it cannot access the 1-tick data series, but only the bars on the chart. I do not know what type of bars you use, because you have not shown it. But whatever it is, it is used. The best available approximation for the VWAP of a bar is (high + low + open + close) / 4. The indicator then collects the VWAPs of all bars and calculates the average price for the session. On larger timeframes, such as 15 or 60 min bars, anaCurrentDayVWAP may be 1 or 2 ticks off, because the necessary price and volume information to calculate a 100% accurate VWAP is not available with the bar series.

That price respects the visual level of the GomMPVWAP is just an illusion. But if you need that illusion, this is the way to go:

-> round the VWAP to the tick (needs a slight modification of the indicator code)
-> set the Plot Style of the VWAP plot to square and you will see a step function as for the other one

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
(login for full post details)
  #3 (permalink)
Legendary Market Wizard
Los Angeles, California Republic
 
Experience: None
Platform: Sierra Chart
Broker: CQG
Trading: ES
 
srgtroy's Avatar
 
Posts: 1,936 since Jan 2011
Thanks: 1,375 given, 3,714 received



Fat Tails View Post
How did you conclude that the anaCurrentDayVWAP is slightly off and not the GomMPVWAP?

If you are within the session and price action continues, the VWAP cannot be a horizontal line, but it must follow price action. That is if prices are above the VWAP, the VWAP should rise and if prices are below the VWAP, the VWAP should fall. In any case it cannot be stable during the session.

Depending on the data used for calculating a VWAP there can be a slight inaccuracy. The correct VWAP can only be calculated from tick-by-tick data by using every single trade. The anaCurrentDayVWAP38 uses an approximation for calculating the average price, as it cannot access the 1-tick data series, but only the bars on the chart. I do not know what type of bars you use, because you have not shown it. But whatever it is, it is used. The best available approximation for the VWAP of a bar is (high + low + open + close) / 4. The indicator then collects the VWAPs of all bars and calculates the average price for the session. On larger timeframes, such as 15 or 60 min bars, anaCurrentDayVWAP may be 1 or 2 ticks off, because the necessary price and volume information to calculate a 100% accurate VWAP is not available with the bar series.

That price respects the visual level of the GomMPVWAP is just an illusion. But if you need that illusion, this is the way to go:

-> round the VWAP to the tick (needs a slight modification of the indicator code)
-> set the Plot Style of the VWAP plot to square and you will see a step function as for the other one

I was not saying that your calculations are wrong, in fact, considering they are only being done bar by bar instead of tick by tick like Gomi's VWAP, they are amazingly accurate.

I thought maybe there was a NinjaTrader rendering issue. It looked like NinjaTrader was rendering your VWAP line at one edge of a price point's pixel range instead of in the middle, making it appear slightly off vis-a-vis price action. I thought Gomi's VWAP didn't have the same problem maybe because it has its own rendering engine.

However, the instructions you posted explain the issue. Additionally, you have correctly pointed out that the color of the VWAP line provides the proper guidance as to whether price is above or below it.

Thanks for your response and your work!

Learn The Rules Well So You Can Break Them Effectively
Started this thread Reply With Quote
 
(login for full post details)
  #4 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received

Here is a modified version of the anaCurrentDayVWAPV38, which has its plots rounded to the tick.


Attached Files
Register to download File Type: zip CurrentDayVWAPV38X.zip (7.2 KB, 165 views)
Reply With Quote
The following 5 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #5 (permalink)
Legendary Market Wizard
Los Angeles, California Republic
 
Experience: None
Platform: Sierra Chart
Broker: CQG
Trading: ES
 
srgtroy's Avatar
 
Posts: 1,936 since Jan 2011
Thanks: 1,375 given, 3,714 received


Fat Tails View Post
Here is a modified version of the anaCurrentDayVWAPV38, which has its plots rounded to the tick.

A wonderful illusion Many thanks!

Learn The Rules Well So You Can Break Them Effectively
Started this thread Reply With Quote
 
(login for full post details)
  #6 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


srgtroy View Post
A wonderful illusion Many thanks!

Let me know how it compares to the GomMP VWAP.

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Legendary Market Wizard
Los Angeles, California Republic
 
Experience: None
Platform: Sierra Chart
Broker: CQG
Trading: ES
 
srgtroy's Avatar
 
Posts: 1,936 since Jan 2011
Thanks: 1,375 given, 3,714 received

Looks pretty much like a perfect match. Amazing. Even though this was a small change, I do think it certainly improves the usability of the indicator, not only the VWAP, but the bands as well, thanks again

Learn The Rules Well So You Can Break Them Effectively
Started this thread Reply With Quote
The following user says Thank You to srgtroy for this post:
 
(login for full post details)
  #8 (permalink)
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
 
Posts: 1,091 since May 2010

I'm looking for a 3 day vwap. Would any programmers be able to convert ana38 to a three day version and could anybody tell me whether Gomi's MP will plot a three day vwap? Thanks

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #9 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


syxforex View Post
I'm looking for a 3 day vwap. Would any programmers be able to convert ana38 to a three day version and could anybody tell me whether Gomi's MP will plot a three day vwap? Thanks

What do you need a 3-day VWAP for. Do you want a rolling 3-day VWAP or a 3-day VWAP that resets at the beginning of the session. This is the difference:

Rolling 3-day VWAP: Takes into account the last 72 hours of trades. Adds continuously new trades and subtracts trades prior to the period of 72 hours.

3-day VWAP: Starts at the beginning of the session with the volume weighted average price of the preceding 2 days and then adds the trades of the current day. After the end of the day it restarts with a gap.

Reply With Quote
 
(login for full post details)
  #10 (permalink)
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
 
Posts: 1,091 since May 2010


Hi Fattails, thanks for your reply,

I am looking for a three session vwap that resets to the beginning of each new session.

thanks

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #11 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


syxforex View Post
Hi Fattails, thanks for your reply,

I am looking for a three session vwap that resets to the beginning of each new session.

thanks

I have not coded that so far. You can display the VWAP of the two or three prior sessions via the SessionPivotsRolling indicator, but then that VWAP will remain fixed, without further trades added during the day.

Or just trade on Wednesday's. Then you can use the weekly VWAP.

Reply With Quote
 
(login for full post details)
  #12 (permalink)
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
 
Posts: 1,091 since May 2010

You are selling the n period vwap for 250$, a lot of money. Another indicator salesman I talked to says it will cost 450$ to modify the ana38 session indicator to a three session indicator. Looks like I may be in the wrong business. Are there any coders out there who can do it for less?


Fat Tails View Post
I have not coded that so far. You can display the VWAP of the two or three prior sessions via the SessionPivotsRolling indicator, but then that VWAP will remain fixed, without further trades added during the day.

Or just trade on Wednesday's. Then you can use the weekly VWAP.


Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #13 (permalink)
Mercer Island WA
 
Experience: Advanced
Platform: Ninjatrader/Strategy Desk
Broker: Various
Trading: TF/NQ/ES/Stocks
 
djkiwi's Avatar
 
Posts: 561 since May 2010
Thanks: 981 given, 1,551 received


srgtroy View Post
Can anything be done to fix this small discrepancy. Otherwise, sometimes it appears that price has crossed the anaVWAP when it hasn't or vice versa.

Hi there, the issue is the use of tick file data v bid ask data. To illustrate the first chart shows the ana monthly vwap using bidask (file) setting in GOMmp from 1 May. You can see the ana vwap and gomi is a little bit off.

If you look at the second chart showing GOMmp with data source as tickdata, you can see it matches exactly.

Cheers
DJ

Attached Thumbnails
Click image for larger version

Name:	gomi bidask.jpg
Views:	114
Size:	249.3 KB
ID:	73135   Click image for larger version

Name:	gomi tickfile.jpg
Views:	90
Size:	249.2 KB
ID:	73136  
Reply With Quote
 
(login for full post details)
  #14 (permalink)
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
 
Posts: 1,091 since May 2010

Thanks Djkiwi,

It would appear Gomi vwap is superior to anavwap. I also have problems with anapivots as they don't match up with the majority of pivot calculations published by research companies or as found natively on high end platforms. Ana indicators seem to be rather lacking in both accuracy and precision. I think I will move on to more professional tools.

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #15 (permalink)
Mercer Island WA
 
Experience: Advanced
Platform: Ninjatrader/Strategy Desk
Broker: Various
Trading: TF/NQ/ES/Stocks
 
djkiwi's Avatar
 
Posts: 561 since May 2010
Thanks: 981 given, 1,551 received


syxforex View Post
Thanks Djkiwi,

It would appear Gomi vwap is superior to anavwap. I also have problems with anapivots as they don't match up with the majority of pivot calculations published by research companies or as found natively on high end platforms. Ana indicators seem to be rather lacking in both accuracy and precision. I think I will move on to more professional tools.

Hi, I think that's a bit harsh. My experience has been a little bit different whereby the ana indicators have been superior to most I have tried in respect of accuracy and load times. The problem with pivots is there are many different variations of the way they are calculated.

The vwap issue is not the fault of the ana indicator but the fact that it is using a different data source. I'm currently testing the monthly anavwap and the Gomvwap on sim in market replay on a large swing timeframe. I'm not too concerned with the differences.

I think on a daily chart the difference would be immaterial using bidask v tickdata.

Cheers
DJ

Reply With Quote
 
(login for full post details)
  #16 (permalink)
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
 
Posts: 1,091 since May 2010

ANA indicators are just free bait anyways, an enticement to lure the unsuspecting outside the forum where the creator puts on his indicator saleman hat and extracts exorbitant prices for the real ones. Anybody want to drop 500$ for a fib confluence indicator, lmao...

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #17 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


syxforex View Post
You are selling the n period vwap for 250$, a lot of money. Another indicator salesman I talked to says it will cost 450$ to modify the ana38 session indicator to a three session indicator. Looks like I may be in the wrong business. Are there any coders out there who can do it for less?

@syxforex: I am not selling the n period VWAP for 250$ and I am not an indicator salesman, although I plan to create a website. I have coded a few high performance indicators for my own needs, which I share with those who want them. I have also coded free versions of daily, weekly VWAPs and TWAPs. The SessionPivots and SessionPivotsRolling indicators display the VWAP of the prior and the prior N days. All for free. The free VWAPs, which I have put into the download section already use a recursive algorithm for calculating the SD bands, which makes them much faster than other VWAPs available (such as the hVWAP or the flawed VWAP from the NinjaTrader forum).

The indicator you were talking about, uses a secondary 1-minute bar series and only recalculates once per minute. The CPU load is such that you can put a bunch of 50 of them on a market analyzer for all the instruments you want to monitor and get your alerts in real time, when the SD bands are hit. Do you know how much time it takes to code and test that stuff?

I believe that I have the right to decide what I give away for free, and that you should not complain about somebody else asking money to work for you. That said $ 450 to modify the anaCurrentDayVWAPV38 indicator is expensive, if you need some help, you can contact me via private message.

Basically to achieve what you want, you would just need to collect the final values of the variables that are summed up for the prior N days at the end of each trading day, and then use them to calculate the n-day VWAP and SD bands. Not an easy work, in particular not if you want to take into account the holiday sessions. So even for me it would be a few hours of work to get it right.

Reply With Quote
 
(login for full post details)
  #18 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


syxforex View Post
Thanks Djkiwi,

It would appear Gomi vwap is superior to anavwap. I also have problems with anapivots as they don't match up with the majority of pivot calculations published by research companies or as found natively on high end platforms. Ana indicators seem to be rather lacking in both accuracy and precision. I think I will move on to more professional tools.

@syxforex: If you are frustrated with your life and your trading experience, it will not help you to bash my indicators. They are good enough to speak for themselves. And if the anaCurrentDayVWAP38 is so bad, why did you want to use it as a base for your N-day pivots? You could have chosen another one.

You are right, if you state that the anaCurrentDayVWAP maybe a few ticks off, if it is running on a larger timeframe chart. This depends on the resolution of the bars which are used to calculate the VWAP. The intrabar distribution is not known for a 60 minute bar, and the accuracy is limited. You would need to load a secondary bar series to have higher accuracy on larger timeframe charts. On a 1 min chart the anaCurrentDayVWAP is accurate to the tick.

As to the pivots, you probably don't understand how to use them. The values do match the values of professional websites, provided you use the pivots as explained in this thread.


Reply With Quote
 
(login for full post details)
  #19 (permalink)
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
 
Posts: 1,091 since May 2010

Fat Tails,

Fair enough with what you have written here, but to be sure, I think you are an indicator salesman, and I have emails from you that I am happy to publish here wherein on multiple occasions you have quoted me 250$ for the n period vwap. I have no problem with your current business model whatsoever and I wish you all the luck with your new online indicator store.


Fat Tails View Post
@syxforex: I am not selling the n period VWAP for 250$ and I am not an indicator salesman, although I plan to create a website.


Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #20 (permalink)
London
 
Experience: Intermediate
Platform: NT
Trading: Futures
 
Posts: 22 since Jan 2011
Thanks: 13 given, 8 received

Fat Tails recently finished a indicator for me. He took a badly coded sine wave and created a quick smooth greatly expanded new indi. He probably took a lot more time to do this but still stayed with his original price quote. Thanks Fat Tails .....money well spent.

Reply With Quote
The following user says Thank You to jocomoco for this post:
 
(login for full post details)
  #21 (permalink)
Erfurt Germany
 
Experience: Master
Platform: rtMagic, NinjaTrader
Broker: AMP/CQG, IAB
Trading: ES, 6E, FDAX, FGBL
 
Posts: 338 since Aug 2011
Thanks: 54 given, 461 received

Any of Fat Tails published basic concepts is free for download... any users with own programming experience can modify this self for add any needed features.
Its is normal, when a developer in continue make his work faster and better by using other internal concepts. This is dont need to publish... this is don't needed, while any results comperable with the basic concept... its only nice to have.

The other point is: make any additions on request. Here is the time for do this the value, not the work self!
I see no problem with a offer for customize a free basic tool and/or give access to advantage internal funtions for better use/realize the requested functionality.

=> Change the free code self or use a "time" offer from any interested developer. Its a simple deal and NOT a VENDOR BUSINESS.

Reply With Quote
The following user says Thank You to TimeTrade for this post:
 
(login for full post details)
  #22 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


syxforex View Post
Fat Tails,

Fair enough with what you have written here, but to be sure, I think you are an indicator salesman, and I have emails from you that I am happy to publish here wherein on multiple occasions you have quoted me 250$ for the n period vwap. I have no problem with your current business model whatsoever and I wish you all the luck with your new online indicator store.

The discussion does not belong into this thread, I will not answer in detail. Just two comments. I have indeed sold a package of 8 high performance VWAPs to a few other traders for $ 250 (I am using these indicators for my own trading, have spent about a month to code them). My quote to you was for 8 indicators as you asked for it. Furthermore, I have repeatedly recommended to you not to purchase any expensive indicators, as it will not improve your trading. I have even explained to you, how you can achieve comparable results by using free indicators.

And now:


Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
(login for full post details)
  #23 (permalink)
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
 
Posts: 1,091 since May 2010

And there is the truth Fat Tails, I am a trader, whereas you only claim to be. I am quite sure that you are but an indicator salesman, only. Though I don't profess to read across space and time like you your indicator greatness. For all the money you leach off the good people here on this site I am always shocked by your level of arrogance and disrespect for them.

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #24 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,785 since Jun 2009
Thanks: 32,314 given, 97,581 received

Moderator Notice
Moderator Notice



Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 6 users say Thank You to Big Mike for this post:
 
(login for full post details)
  #25 (permalink)
the coin hunter
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
 
cory's Avatar
 
Posts: 6,030 since Jun 2009
Thanks: 845 given, 7,894 received


Big Mike View Post
Moderator Notice
Moderator Notice



Mike

looking at his posting time stamp I think you meant 30 days instead of 3 months.

Reply With Quote
 
(login for full post details)
  #26 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,785 since Jun 2009
Thanks: 32,314 given, 97,581 received


cory View Post
looking at his posting time stamp I think you meant 30 days instead of 3 months.

I lift bans early for good behavior (ie: not creating duplicate accounts to get around the ban, not emailing me and cussing me out and telling me how it was the biggest mistake of my life to ban the user, etc).

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Big Mike for this post:
 
(login for full post details)
  #27 (permalink)
Las Vegas, NV
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Trading: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,057 given, 5,841 received

@Fat Tails,

Not sure if this is an issue or not, but if both anaCurrentDayVWAP40 and NT default VWAP are plotted, different results are seen which are obvious at the beginning but then converge at the end of the session.

I can assume this might be due to the session hours used in both indicators. I believe from the parameter list the default NT VWAP uses a full 24 hrs.

Could you confirm this please. If that is the case Ninja has done a poor job in this regard.

Thanks.


Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #28 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


aligator View Post
@Fat Tails,

Not sure if this is an issue or not, but if both anaCurrentDayVWAP40 and NT default VWAP are plotted, different results are seen which are obvious at the beginning but then converge at the end of the session.

I can assume this might be due to the session hours used in both indicators. I believe from the parameter list the default NT VWAP uses a full 24 hrs.

Could you confirm this please. If that is the case Ninja has done a poor job in this regard.

Thanks.


@aligator: This is a difficult question, because there are several answers. We need to make a distinction between the VWAP and the bands.

First of all, the VWAP is not a NinjaTrader default indicator, but was published on the NinjaTrader forum. Also the deviation that you observed is not linked to the selected session, as on your chart, both VWAPs start at the same time.

VWAP formula: There is only one accurate value for the VWAP. You get it, if you calculate the volume-weighted average price of all transactions. You can calculate the exact value by applying the VWAP indicator to a 1-Tick chart. If you apply the VWAP to a 2000-Tick chart, then you neeed to make an approximation, as you do not have the prices of all transactions within each 2000-Tick bar available.

For the purpose of calculating the average price, the forum VWAP attaches the entire volume of the bar to the close. This is obviously a bad approximation. The anaCurrentDayVWAP uses (Open +High +Low +Close)/4 instead of the close, which is much more accurate. I have attached a chart below with yesterday's price action for the ES 06-13. The anaCurrentDayVWAP is displayed blue & red, where the forum VWAP has green & orange colors. At (2) you can notice that the orange forum VWAP deviates to the upside, because it attaches the volume of the two green bars to the close, while the anaCurrentDayVWAP has the better approximation.

Standard deviation bands: The anaCurrentDayVWAP uses two different formulae, the formula Variance_Last, which follows the classical definition of the standard deviation of data points, and the formula Variance_Distance, which in fact is based on the variance of the distance of all data points from the VWAP around the value 0, and not on the variance of the data points around the mean. The Variance_Distance formula is a recursive formula, which is fast to calculate and which gives a good approximation of the orthodox Variance_Last formula, once you are one or two hours into the session. The anaCurrentDayVWAP can also calculate bands according to a third formula, which is based on the session range and which is also available in other charting packages.

If you want to compare the SD bands plotted by the anaCurrentDayVWAP to the SD bands plotted by the forum VWAP, you need to set anaCurrentDayVWAP to Variance_Last, such that both of them use the same approach. If we look at yesterday's chart again, you will find two noteworthy differences. At (1) the forum VWAP starts the day with a beak. The standard deviation is calculated as zero for the first bar, because the indicator compares the close to the close. This is obviously incorrect. It is not a big problem for an ETH VWAP, as the volume of the first bar of the night session is rather low. But it can be a problem for the RTH VWAP, as the volume of the first bar of the regular session is pretty high. At (2) you will notice that the SD bands of the forum VWAP show approximately the same error as the VWAP itself.




The chart below shows the full problem for the VWAP calculated for the RTH session.
Both indicators are set to COBC = true. The values do not match at all.




When set to COBC = false, the forum VWAP calculates different values for the VWAP and the SD bands.
This means that it changes its values, if you refresh the chart via F5, see below:


Reply With Quote
The following 6 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #29 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received

By the way, here is another example, how erroneous the calculations of the VWAP from the NinjaTrader forum are sometimes.

The chart shows the price action of 6B 03-13 for yesterday's regular session. You will notice that quite a few price bars closed outside the 3rd SD band during the morning. This is impossible!

For a Gaussian distribution only about 0.27% per cent of the data points should be outside the 3SD band. The regular session is made up of 400 1-minute bars. Applying the 0.27% rule I would expect one single bar out of 400 to close outside the 3SD band. However on this chart over 10% of all bars close outside the 3SD band!

This indicator is absolute crap. Just in case that you had any doubts.



If you look at the correct picture, there is one bar that close 5 ticks above the 3SD band, but none that close outside.


Reply With Quote
The following 7 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #30 (permalink)
Las Vegas, NV
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Trading: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,057 given, 5,841 received


Fat Tails View Post
@aligator:
First of all, the VWAP is not a NinjaTrader default indicator, but was published on the NinjaTrader forum.

Thanks @Fat Tails,

Great explanation. I did compare the two again using the typical price for Forum VWAP just for curiosity, knowing will not get a match. And for sure there is no match.

Conclusion: The forum vwap needs some work or is to be ditched.

Cheers!


Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #31 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,785 since Jun 2009
Thanks: 32,314 given, 97,581 received

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

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #32 (permalink)
Market Wizard
Columbus, OH
 
Experience: None
Platform: NT 8, TOS
Trading: ES
 
Silvester17's Avatar
 
Posts: 3,578 since Aug 2009
Thanks: 5,065 given, 11,359 received


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://www.ninjatrader.com/support/forum/local_links.php?catid=4&sort=N&pp=15&page=11

Reply With Quote
 
(login for full post details)
  #33 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,785 since Jun 2009
Thanks: 32,314 given, 97,581 received


Silvester17 View Post
@Big Mike,

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

Links and Downloads Manager - NinjaTrader Support Forum

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

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #34 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


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
The following 5 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #35 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,785 since Jun 2009
Thanks: 32,314 given, 97,581 received

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

Sent from my Nexus 4

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Big Mike for this post:
 
(login for full post details)
  #36 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


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
The following user says Thank You to Fat Tails for this post:
 
(login for full post details)
  #37 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received

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
The following 9 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #38 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,785 since Jun 2009
Thanks: 32,314 given, 97,581 received

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

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 3 users say Thank You to Big Mike for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > anaVWAP Drawing Issue?


Last Updated on March 9, 2013


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts