Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/10/2012 Posts: 7
|
Hi,
I am trying to create the Effective Volume Formula from the book "Value in Time: Better Trading Through Volue". It's derived from William's A/D line. Here's what the book says:
Effective Volume Formula
The Effective Volume is calculated by using the following formula, which is a modified version of the Larry Williams accumulation/distribution (A/D) formula:
(Closei−1 − Closei) + PI / Highi − Lowi + PI * Volumei
where:
Closei −1 = Closing price corresponding to time interval (i − 1): TIi−1
Closei = Closing price corresponding to time interval i: TIi Highi = Max (Highi, Closei−1)
Lowi = Min (Lowi, Closei−1)
PI = Price interval (usually US $0.01)
As you can see, the Larry Williams formula was changed in three ways:
-
I replaced the open of the time interval with the close of the previous time interval.
-
I adapted the high and the low of the current time interval to the value of the close of the previous time interval.
-
I added the PI number, usually 0.01, to use the exact number of ticks between Closei−1 - Closei and between Highi - Lowi, and not just the mathematical difference between these values.
Can anyone show me how to do it?
Thank you.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I'm not sure I understand the description, but please try creating a Custom PCF Cumulative Indicator with the following settings to see if it does what you want:
- Period: 1
- Average Type: Doesn't matter (because the Period is 1).
- Up Condition: C > C - 1
- Down Condition: C < C - 1
- Value to Add/Subtract: V * (C - C1 + .01) / ((H - L + ABS(H - C1) + ABS(C1 - L)) / 2 + .01)
Keep in mind that this is a cumulative indicator, so its actual values will not match other sources. Only the magnitude of the changes from bar to bar will match. Also note that there is no way to exclude the first minute of each day from the calculations in TC2000.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/10/2012 Posts: 7
|
Hi Bruce,
Thank you for the prompt response. Fortunately, the author has provided a table in the book which we can use to validate our formula. Here's the data:
Open |
High |
Low |
Close |
Volume |
Effective Volume |
11.07 |
11.07 |
11.06 |
11.06 |
5,889 |
0 |
11.06 |
11.06 |
11.06 |
11.06 |
200 |
0 |
11.06 |
11.07 |
11.06 |
11.06 |
28,335 |
0 |
11.05 |
11.06 |
11.05 |
11.06 |
18,131 |
18,131 |
11.04 |
11.06 |
11.03 |
11.05 |
33,188 |
16,594 |
11.03 |
11.04 |
11.03 |
11.04 |
3,298 |
0 |
Can you input this data in Excel to see if our formula works? Alternatively you can provide me the formula and I'll do it myself. And again, thank you for your work.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The 18,131 and 16,594 values match, but there is nothing in your description or the resulting indicator which would force the 0 results when the current close is the same as the previous close.
We can force this to happen by altering the formula for Value to Add/Subtract:
ABS(C <> C1) * V * (C - C1 + .01) / ((H - L + ABS(H - C1) + ABS(C1 - L)) / 2 + .01)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/10/2012 Posts: 7
|
This should work. Thank you Bruce!
|
|
Registered User Joined: 1/27/2014 Posts: 1
|
hello sir ...
but your formula (ABS(C <> C1) * V * (C - C1 + .01) / ((H - L + ABS(H - C1) + ABS(C1 - L)) / 2 + .01)
differs with the pascals's effective volume example
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
In what way do you think the formula differs from the example given in awaisakbar's Wednesday, May 16, 2012 11:49:13 AM ET post?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/27/2008 Posts: 8
|
So how would you convert this formula to a percent form?
ABS(C <> C1) * V * (C - C1 + .01) / ((H - L + ABS(H - C1) + ABS(C1 - L)) / 2 + .01)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
To a percentage of what?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/27/2008 Posts: 8
|
Percent up or precent down, versus just the acutal volume number. Like 1% up or 1% down, if that makes sense. Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If I'm understanding correctly, we should be able to just take V out and multiply by 100.
100 * ABS(C <> C1) * (C - C1 + .01) / ((H - L + ABS(H - C1) + ABS(C1 - L)) / 2 + .01)
Or we could leave V and then calculate it as a percent of the previous volume.
100 * ABS(C <> C1) * V * (C - C1 + .01) / ((H - L + ABS(H - C1) + ABS(C1 - L)) / 2 + .01) / V1
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |