Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Volume Zone Oscillator PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
akspeculations
Posted : Wednesday, April 27, 2011 1:59:00 AM
Registered User
Joined: 3/27/2011
Posts: 56
Hey there. Is there any way to implement the VZO on a period of 14 into a PCF? The short article in Stocks & Commodities sparked a long lost interest in this indicator. It would be greatly appreciated. It is described as

Volume Zone Osc = 100 x (vp/tv) where:

VP(vol pos.) = x-days EMA (+/- vol) and

TV(total vol) = x-days EMA(vol);

I was hoping to receive help in recreating in for todays VZO value, yesterdays, 2 days ago, and 3 days go if it's possible in any way. Thank you.
Bruce_L
Posted : Wednesday, April 27, 2011 10:54:02 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I have only been able to approximate the VZO Indicator. The best I have come up with for the current VZO would be:

13.3453582702488 * (SGN(XAVG(RSI1,2) - 50) * V + 13 / 15 * (SGN(XAVG(RSI1.1.1,2) - 50) * V1 + 13 / 15 * (SGN(XAVG(RSI1.1.2,2) - 50) * V2 + 13 / 15 * (SGN(XAVG(RSI1.1.3,2) - 50) * V3 + 13 / 15 * (SGN(XAVG(RSI1.1.4,2) - 50) * V4 + 13 / 15 * (SGN(XAVG(RSI1.1.5,2) - 50) * V5 + 13 / 15 * (SGN(XAVG(RSI1.1.6,2) - 50) * V6 + 13 / 15 * (SGN(XAVG(RSI1.1.7,2) - 50) * V7 + 13 / 15 * (SGN(XAVG(RSI1.1.8,2) - 50) * V8 + 13 / 15 * (SGN(XAVG(RSI1.1.9,2) - 50) * V9 + 13 / 15 * (SGN(XAVG(RSI1.1.10,2) - 50) * V10 + 13 / 15 * (SGN(XAVG(RSI1.1.11,2) - 50) * V11 + 13 / 15 * (SGN(XAVG(RSI1.1.12,2) - 50) * V12 + 13 / 15 * (SGN(XAVG(RSI1.1.13,2) - 50) * V13 + 13 / 15 * (SGN(XAVG(RSI1.1.14,2) - 50) * V14 + 13 / 15 * (SGN(XAVG(RSI1.1.15,2) - 50) * V15 + 13 / 15 * (SGN(XAVG(RSI1.1.16,2) - 50) * V16 + 13 / 15 * (SGN(XAVG(RSI1.1.17,2) - 50) * V17 + 13 / 15 * (SGN(XAVG(RSI1.1.18,2) - 50) * V18 + 13 / 15 * (SGN(XAVG(RSI1.1.19,2) - 50) * V19 + 13 / 15 * (SGN(XAVG(RSI1.1.20,2) - 50) * V20 + 13 / 15 * (SGN(XAVG(RSI1.1.21,2) - 50) * V21 + 13 / 15 * (SGN(XAVG(RSI1.1.22,2) - 50) * V22 + 13 / 15 * (SGN(XAVG(RSI1.1.23,2) - 50) * V23 + 13 / 15 * (SGN(XAVG(RSI1.1.24,2) - 50) * V24 + 13 / 15 * (SGN(XAVG(RSI1.1.25,2) - 50) * V25 + 13 / 15 * (SGN(XAVG(RSI1.1.26,2) - 50) * V26 + 13 / 15 * (SGN(XAVG(RSI1.1.27,2) - 50) * V27 + 13 / 15 * (SGN(XAVG(RSI1.1.28,2) - 50) * V28 + 13 / 15 * (SGN(XAVG(RSI1.1.29,2) - 50) * V29 + 13 / 15 * (SGN(XAVG(RSI1.1.30,2) - 50) * V30 + 13 / 15 * (SGN(XAVG(RSI1.1.31,2) - 50) * V31 + 13 / 15 * (SGN(XAVG(RSI1.1.32,2) - 50) * V32 + 13 / 15 * (SGN(XAVG(RSI1.1.33,2) - 50) * V33 + 13 / 15 * (SGN(XAVG(RSI1.1.34,2) - 50) * V34 + 13 / 15 * (SGN(XAVG(RSI1.1.35,2) - 50) * V35 + 13 / 15 * (SGN(XAVG(RSI1.1.36,2) - 50) * V36 + 13 / 15 * (SGN(XAVG(RSI1.1.37,2) - 50) * V37 + 13 / 15 * (SGN(XAVG(RSI1.1.38,2) - 50) * V38 + 13 / 15 * (SGN(XAVG(RSI1.1.39,2) - 50) * V39 + 13 / 15 * (SGN(XAVG(RSI1.1.40,2) - 50) * V40 + 13 / 15 * (SGN(XAVG(RSI1.1.41,2) - 50) * V41 + 13 / 15 * (SGN(XAVG(RSI1.1.42,2) - 50) * V42 + 13 / 15 * (SGN(XAVG(RSI1.1.43,2) - 50) * V43 + 13 / 15 * (SGN(XAVG(RSI1.1.44,2) - 50) * V44 + 13 / 15 * (SGN(XAVG(RSI1.1.45,2) - 50) * V45 + 13 / 15 * (SGN(XAVG(RSI1.1.46,2) - 50) * V46 + 13 / 15 * (SGN(XAVG(RSI1.1.47,2) - 50) * V47 + 13 / 15 * (SGN(XAVG(RSI1.1.48,2) - 50) * V48))))))))))))))))))))))))))))))))))))))))))))))))) / XAVGV14

For 1-Bar Ago:

13.3453582702488 * (SGN(XAVG(RSI1.1.1,2) - 50) * V1 + 13 / 15 * (SGN(XAVG(RSI1.1.2,2) - 50) * V2 + 13 / 15 * (SGN(XAVG(RSI1.1.3,2) - 50) * V3 + 13 / 15 * (SGN(XAVG(RSI1.1.4,2) - 50) * V4 + 13 / 15 * (SGN(XAVG(RSI1.1.5,2) - 50) * V5 + 13 / 15 * (SGN(XAVG(RSI1.1.6,2) - 50) * V6 + 13 / 15 * (SGN(XAVG(RSI1.1.7,2) - 50) * V7 + 13 / 15 * (SGN(XAVG(RSI1.1.8,2) - 50) * V8 + 13 / 15 * (SGN(XAVG(RSI1.1.9,2) - 50) * V9 + 13 / 15 * (SGN(XAVG(RSI1.1.10,2) - 50) * V10 + 13 / 15 * (SGN(XAVG(RSI1.1.11,2) - 50) * V11 + 13 / 15 * (SGN(XAVG(RSI1.1.12,2) - 50) * V12 + 13 / 15 * (SGN(XAVG(RSI1.1.13,2) - 50) * V13 + 13 / 15 * (SGN(XAVG(RSI1.1.14,2) - 50) * V14 + 13 / 15 * (SGN(XAVG(RSI1.1.15,2) - 50) * V15 + 13 / 15 * (SGN(XAVG(RSI1.1.16,2) - 50) * V16 + 13 / 15 * (SGN(XAVG(RSI1.1.17,2) - 50) * V17 + 13 / 15 * (SGN(XAVG(RSI1.1.18,2) - 50) * V18 + 13 / 15 * (SGN(XAVG(RSI1.1.19,2) - 50) * V19 + 13 / 15 * (SGN(XAVG(RSI1.1.20,2) - 50) * V20 + 13 / 15 * (SGN(XAVG(RSI1.1.21,2) - 50) * V21 + 13 / 15 * (SGN(XAVG(RSI1.1.22,2) - 50) * V22 + 13 / 15 * (SGN(XAVG(RSI1.1.23,2) - 50) * V23 + 13 / 15 * (SGN(XAVG(RSI1.1.24,2) - 50) * V24 + 13 / 15 * (SGN(XAVG(RSI1.1.25,2) - 50) * V25 + 13 / 15 * (SGN(XAVG(RSI1.1.26,2) - 50) * V26 + 13 / 15 * (SGN(XAVG(RSI1.1.27,2) - 50) * V27 + 13 / 15 * (SGN(XAVG(RSI1.1.28,2) - 50) * V28 + 13 / 15 * (SGN(XAVG(RSI1.1.29,2) - 50) * V29 + 13 / 15 * (SGN(XAVG(RSI1.1.30,2) - 50) * V30 + 13 / 15 * (SGN(XAVG(RSI1.1.31,2) - 50) * V31 + 13 / 15 * (SGN(XAVG(RSI1.1.32,2) - 50) * V32 + 13 / 15 * (SGN(XAVG(RSI1.1.33,2) - 50) * V33 + 13 / 15 * (SGN(XAVG(RSI1.1.34,2) - 50) * V34 + 13 / 15 * (SGN(XAVG(RSI1.1.35,2) - 50) * V35 + 13 / 15 * (SGN(XAVG(RSI1.1.36,2) - 50) * V36 + 13 / 15 * (SGN(XAVG(RSI1.1.37,2) - 50) * V37 + 13 / 15 * (SGN(XAVG(RSI1.1.38,2) - 50) * V38 + 13 / 15 * (SGN(XAVG(RSI1.1.39,2) - 50) * V39 + 13 / 15 * (SGN(XAVG(RSI1.1.40,2) - 50) * V40 + 13 / 15 * (SGN(XAVG(RSI1.1.41,2) - 50) * V41 + 13 / 15 * (SGN(XAVG(RSI1.1.42,2) - 50) * V42 + 13 / 15 * (SGN(XAVG(RSI1.1.43,2) - 50) * V43 + 13 / 15 * (SGN(XAVG(RSI1.1.44,2) - 50) * V44 + 13 / 15 * (SGN(XAVG(RSI1.1.45,2) - 50) * V45 + 13 / 15 * (SGN(XAVG(RSI1.1.46,2) - 50) * V46 + 13 / 15 * (SGN(XAVG(RSI1.1.47,2) - 50) * V47 + 13 / 15 * (SGN(XAVG(RSI1.1.48,2) - 50) * V48 + 13 / 15 * (SGN(XAVG(RSI1.1.49,2) - 50) * V49))))))))))))))))))))))))))))))))))))))))))))))))) / XAVGV14.1

For 2-Bars Ago:

13.3453582702488 * (SGN(XAVG(RSI1.1.2,2) - 50) * V2 + 13 / 15 * (SGN(XAVG(RSI1.1.3,2) - 50) * V3 + 13 / 15 * (SGN(XAVG(RSI1.1.4,2) - 50) * V4 + 13 / 15 * (SGN(XAVG(RSI1.1.5,2) - 50) * V5 + 13 / 15 * (SGN(XAVG(RSI1.1.6,2) - 50) * V6 + 13 / 15 * (SGN(XAVG(RSI1.1.7,2) - 50) * V7 + 13 / 15 * (SGN(XAVG(RSI1.1.8,2) - 50) * V8 + 13 / 15 * (SGN(XAVG(RSI1.1.9,2) - 50) * V9 + 13 / 15 * (SGN(XAVG(RSI1.1.10,2) - 50) * V10 + 13 / 15 * (SGN(XAVG(RSI1.1.11,2) - 50) * V11 + 13 / 15 * (SGN(XAVG(RSI1.1.12,2) - 50) * V12 + 13 / 15 * (SGN(XAVG(RSI1.1.13,2) - 50) * V13 + 13 / 15 * (SGN(XAVG(RSI1.1.14,2) - 50) * V14 + 13 / 15 * (SGN(XAVG(RSI1.1.15,2) - 50) * V15 + 13 / 15 * (SGN(XAVG(RSI1.1.16,2) - 50) * V16 + 13 / 15 * (SGN(XAVG(RSI1.1.17,2) - 50) * V17 + 13 / 15 * (SGN(XAVG(RSI1.1.18,2) - 50) * V18 + 13 / 15 * (SGN(XAVG(RSI1.1.19,2) - 50) * V19 + 13 / 15 * (SGN(XAVG(RSI1.1.20,2) - 50) * V20 + 13 / 15 * (SGN(XAVG(RSI1.1.21,2) - 50) * V21 + 13 / 15 * (SGN(XAVG(RSI1.1.22,2) - 50) * V22 + 13 / 15 * (SGN(XAVG(RSI1.1.23,2) - 50) * V23 + 13 / 15 * (SGN(XAVG(RSI1.1.24,2) - 50) * V24 + 13 / 15 * (SGN(XAVG(RSI1.1.25,2) - 50) * V25 + 13 / 15 * (SGN(XAVG(RSI1.1.26,2) - 50) * V26 + 13 / 15 * (SGN(XAVG(RSI1.1.27,2) - 50) * V27 + 13 / 15 * (SGN(XAVG(RSI1.1.28,2) - 50) * V28 + 13 / 15 * (SGN(XAVG(RSI1.1.29,2) - 50) * V29 + 13 / 15 * (SGN(XAVG(RSI1.1.30,2) - 50) * V30 + 13 / 15 * (SGN(XAVG(RSI1.1.31,2) - 50) * V31 + 13 / 15 * (SGN(XAVG(RSI1.1.32,2) - 50) * V32 + 13 / 15 * (SGN(XAVG(RSI1.1.33,2) - 50) * V33 + 13 / 15 * (SGN(XAVG(RSI1.1.34,2) - 50) * V34 + 13 / 15 * (SGN(XAVG(RSI1.1.35,2) - 50) * V35 + 13 / 15 * (SGN(XAVG(RSI1.1.36,2) - 50) * V36 + 13 / 15 * (SGN(XAVG(RSI1.1.37,2) - 50) * V37 + 13 / 15 * (SGN(XAVG(RSI1.1.38,2) - 50) * V38 + 13 / 15 * (SGN(XAVG(RSI1.1.39,2) - 50) * V39 + 13 / 15 * (SGN(XAVG(RSI1.1.40,2) - 50) * V40 + 13 / 15 * (SGN(XAVG(RSI1.1.41,2) - 50) * V41 + 13 / 15 * (SGN(XAVG(RSI1.1.42,2) - 50) * V42 + 13 / 15 * (SGN(XAVG(RSI1.1.43,2) - 50) * V43 + 13 / 15 * (SGN(XAVG(RSI1.1.44,2) - 50) * V44 + 13 / 15 * (SGN(XAVG(RSI1.1.45,2) - 50) * V45 + 13 / 15 * (SGN(XAVG(RSI1.1.46,2) - 50) * V46 + 13 / 15 * (SGN(XAVG(RSI1.1.47,2) - 50) * V47 + 13 / 15 * (SGN(XAVG(RSI1.1.48,2) - 50) * V48 + 13 / 15 * (SGN(XAVG(RSI1.1.49,2) - 50) * V49 + 13 / 15 * (SGN(XAVG(RSI1.1.50,2) - 50) * V50))))))))))))))))))))))))))))))))))))))))))))))))) / XAVGV14.2

And for 3-Bars Ago:

13.3453582702488 * (SGN(XAVG(RSI1.1.3,2) - 50) * V3 + 13 / 15 * (SGN(XAVG(RSI1.1.4,2) - 50) * V4 + 13 / 15 * (SGN(XAVG(RSI1.1.5,2) - 50) * V5 + 13 / 15 * (SGN(XAVG(RSI1.1.6,2) - 50) * V6 + 13 / 15 * (SGN(XAVG(RSI1.1.7,2) - 50) * V7 + 13 / 15 * (SGN(XAVG(RSI1.1.8,2) - 50) * V8 + 13 / 15 * (SGN(XAVG(RSI1.1.9,2) - 50) * V9 + 13 / 15 * (SGN(XAVG(RSI1.1.10,2) - 50) * V10 + 13 / 15 * (SGN(XAVG(RSI1.1.11,2) - 50) * V11 + 13 / 15 * (SGN(XAVG(RSI1.1.12,2) - 50) * V12 + 13 / 15 * (SGN(XAVG(RSI1.1.13,2) - 50) * V13 + 13 / 15 * (SGN(XAVG(RSI1.1.14,2) - 50) * V14 + 13 / 15 * (SGN(XAVG(RSI1.1.15,2) - 50) * V15 + 13 / 15 * (SGN(XAVG(RSI1.1.16,2) - 50) * V16 + 13 / 15 * (SGN(XAVG(RSI1.1.17,2) - 50) * V17 + 13 / 15 * (SGN(XAVG(RSI1.1.18,2) - 50) * V18 + 13 / 15 * (SGN(XAVG(RSI1.1.19,2) - 50) * V19 + 13 / 15 * (SGN(XAVG(RSI1.1.20,2) - 50) * V20 + 13 / 15 * (SGN(XAVG(RSI1.1.21,2) - 50) * V21 + 13 / 15 * (SGN(XAVG(RSI1.1.22,2) - 50) * V22 + 13 / 15 * (SGN(XAVG(RSI1.1.23,2) - 50) * V23 + 13 / 15 * (SGN(XAVG(RSI1.1.24,2) - 50) * V24 + 13 / 15 * (SGN(XAVG(RSI1.1.25,2) - 50) * V25 + 13 / 15 * (SGN(XAVG(RSI1.1.26,2) - 50) * V26 + 13 / 15 * (SGN(XAVG(RSI1.1.27,2) - 50) * V27 + 13 / 15 * (SGN(XAVG(RSI1.1.28,2) - 50) * V28 + 13 / 15 * (SGN(XAVG(RSI1.1.29,2) - 50) * V29 + 13 / 15 * (SGN(XAVG(RSI1.1.30,2) - 50) * V30 + 13 / 15 * (SGN(XAVG(RSI1.1.31,2) - 50) * V31 + 13 / 15 * (SGN(XAVG(RSI1.1.32,2) - 50) * V32 + 13 / 15 * (SGN(XAVG(RSI1.1.33,2) - 50) * V33 + 13 / 15 * (SGN(XAVG(RSI1.1.34,2) - 50) * V34 + 13 / 15 * (SGN(XAVG(RSI1.1.35,2) - 50) * V35 + 13 / 15 * (SGN(XAVG(RSI1.1.36,2) - 50) * V36 + 13 / 15 * (SGN(XAVG(RSI1.1.37,2) - 50) * V37 + 13 / 15 * (SGN(XAVG(RSI1.1.38,2) - 50) * V38 + 13 / 15 * (SGN(XAVG(RSI1.1.39,2) - 50) * V39 + 13 / 15 * (SGN(XAVG(RSI1.1.40,2) - 50) * V40 + 13 / 15 * (SGN(XAVG(RSI1.1.41,2) - 50) * V41 + 13 / 15 * (SGN(XAVG(RSI1.1.42,2) - 50) * V42 + 13 / 15 * (SGN(XAVG(RSI1.1.43,2) - 50) * V43 + 13 / 15 * (SGN(XAVG(RSI1.1.44,2) - 50) * V44 + 13 / 15 * (SGN(XAVG(RSI1.1.45,2) - 50) * V45 + 13 / 15 * (SGN(XAVG(RSI1.1.46,2) - 50) * V46 + 13 / 15 * (SGN(XAVG(RSI1.1.47,2) - 50) * V47 + 13 / 15 * (SGN(XAVG(RSI1.1.48,2) - 50) * V48 + 13 / 15 * (SGN(XAVG(RSI1.1.49,2) - 50) * V49 + 13 / 15 * (SGN(XAVG(RSI1.1.50,2) - 50) * V50 + 13 / 15 * (SGN(XAVG(RSI1.1.51,2) - 50) * V51))))))))))))))))))))))))))))))))))))))))))))))))) / XAVGV14.3

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
akspeculations
Posted : Wednesday, April 27, 2011 12:17:00 PM
Registered User
Joined: 3/27/2011
Posts: 56
Thank you very much. In any event this is multiple times better than what I have been able to scratch on as a PCF.
akspeculations
Posted : Wednesday, April 27, 2011 5:33:33 PM
Registered User
Joined: 3/27/2011
Posts: 56
Hey Bruce I've compared the values to that of what TC2000 produces and they're off only by +/- 15 hundredths. And mostly I've seen something to as little as a .04 difference. I would say this is pretty darn good. Just out of curiosity, what accounts for the obscurities?
Bruce_L
Posted : Thursday, April 28, 2011 9:02:03 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
There are actually numerous sources of error. I'll explore two of these in detail.

One source of error is the approximations used for the Exponential Moving Averages in both the numerator and the denominator.

My manual expansion in the numerator starts with the most significant term (the newest data) and works backwards until the point were additional data points should only negligibly contribute to the value of the EMA. The actual calculation most likely starts by calculating a Simple Moving Average based on the oldest data and continues its calculations until it gets to the newest data. The algorithms used are different, but should converge on the same value if "enough" data is used in the calculations.

There are also numerous EMAs calculated using either XAVGV or the XAVG() function. While these EMAs are most likely calculated from the oldest data point to the newest data point, the amount of data used in the calculations is almost certainly different than the amount of data used in the Plot.

The number of Bars of data used in calculating an EMA of Volume is generally more critical than when calculating an EMA of Price because Volume normally has far greater Volatility than Price.

Another source of error is what is done when the Price Net Change is zero. Do you Average Volume, negative Volume or zero in the numerator? In my mind, the most logical thing to do is to use zero. What I believe the original description of VZO says to do is to use negative Volume.

What the TC2000.com version 11 beta seems to do is go back until a Bar can be found where the Price Net Change is either positive or negative. It then uses Volume if the Price Net Change for that Bar is positive and negative Volume if the Price Net Change for that Bar is negative. It should probably be noted that this behavior will most likely change to match the original description of VZO. At that point, my approximation would need to be changed in order to continue to match the Charts.

I used the RSI function built into the Personal Criteria Formula Language to do this lookback. A 1-Period RSI returns 100 if the Net Change is positive, 0 if the Net Change is negative and 50 if the Net Change is zero. This means that if you subtract 50 from the 2-Period Exponential Moving Average of a 1-Period RSI, it could do the lookback for me. The newest Bar actually constitutes about  2/3 the Value of the EMA and the contribution of older Bars is such that each older Bar only has about 1/3 the weight of the next newer Bar, so if the EMA of the RSI is above 50, the most recent non-zero Net Change should be positive and if the EMA of the RSI is below 50, the most recent non-zero Net Change should be negative. But it is possible for the EMA  approximation built in the PCF Language to not look back far enough to make a correct determination.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
cliffhanger31
Posted : Saturday, May 7, 2011 11:47:56 PM
Registered User
Joined: 8/24/2007
Posts: 43

VZO - Volume Zone Oscillator - I copied and pasted your (Bruce) code into a new indicator and got a compile error. Any thoughts? 

Andreas

Bruce_L
Posted : Monday, May 9, 2011 8:59:16 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
cliffhanger31,
A compile error? Are you possibly trying to a Personal Criteria Formula in StockFinder? My Monday, March 21, 2011 10:23:21 AM ET post in the Volume Zone Oscillator: TC2007 topic has one interpretation of a Volume Zone Indicator for StockFinder.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.