Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 2/23/2005 Posts: 13
|
I want to make an Exponential Moving average of the last 17 periods for the following formula:
Volume x (Close - Open)/(High - Low) where the Close is for the current bar and the Open is the open 17 bars ago and the High and Low are those of the last 17 bars.
This formula creates an error in syntax message.
XAVG(V*((C-O17)/(MAXH17-MINL17 )),17)
What is the correct PCF and Snap formulas for the WVAD? (I did not find them in the Knowledge Base nor in a Forum Search.)
Thanks.
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
The simplest way would be to create it for 1 day in a custom indicator:
V*((C-O)/(H-L))
Then use a smoothing period of 17 exp.
You can click on the indicator and use sort by actual value.
Thanks diceman
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
I could not find any reference to WVAD anywhere to confirm you formula.
Based on what you gave above, you can use the following as a 17-exponentially smoothed Custom Indicator:
V*((C-O17)/(MAXH17-MINL17 ))
please review this short video: Plotting Custom Indicators with Examples
- Craig Here to Help!
|
|
Registered User Joined: 2/23/2005 Posts: 13
|
Craig, thanks! I overlooked the easy way!
Diceman, thanks for your response! The caveat to using that variation of the formula is when the elements of the numerator or denominator are equal, which results in zero above or below the line. Thanks for the Sort reminder.
|
|
Registered User Joined: 2/23/2005 Posts: 13
|
Clarification: It is much more likely that the numerator or denominator will be zero in the formula (C-O)/(H-L) than in the other formula. That's the caveat.
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (SirInterestRates) Clarification: It is much more likely that the numerator or denominator will be zero in the formula (C-O)/(H-L) than in the other formula. That's the caveat.
SirInterestRates,
It appears that you may be deviating from the usual WVAD in order to make a division by zero less likely. If that is the case, plot the PCF:
V*(C-O)/(H-L+0.000001)
as a Cumulative Indicator and you will have the usual WVAD and no divide by zero.
Note: You could use the PCF:
V*(C-O)/(H-L-(H=L))
and have no inaccuracy.
Thanks, Jim Murphy
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (SirInterestRates) This formula creates an error in syntax message.
XAVG(V*((C-O17)/(MAXH17-MINL17 )),17)
What is the correct PCF and Snap formulas for the WVAD? Thanks.
SirInterestRates,
The PCF you request requires a series expansion of the EMA17, which is easy to do.
Is it just a coincidence that the EMA Period happens coincide with the other 17's?
Are you aware that the quantity:
(C-O17)/(MAXH17-MINL17)
is unbounded?
My guess is that if you really wanted to span 17 bars, you intended to use something like:
(C-O16)/(MAXH17-MINL17+0.000001)
The magnitude would then be bounded one. The O17 is not in the most recent 17 bars, but O16 is.
Thanks, Jim Murphy
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
Errata:
QUOTE (bustermu) The magnitude would then be bounded one.
should read:
The magnitude would then be bounded by one.
Sorry, Jim Murphy
|
|
Registered User Joined: 2/23/2005 Posts: 13
|
Thanks Jim (bustermu)! Thanks very much for suggesting the adding of 0.000001 to avoid dividing by zero! A simple solution! Thanks for pointing out that O16 is 17 bars ago when the current bar is counted and therefore is the first bar of the MAXH17 and MINL17 bar count. I considered O16, but failed to notice that MAXH/L are counting the current bar.
My approach is to apply the Fibonacci Series fractals and half fractals for smoothing over the same number of n-bars as the H/L fractals. My focus is the 4 Series of 4, 8, 17 and 34 periods and bars for daily/weekly/monthly charts. I analyze phase, direction, fractal crossovers, zero crossovers and series compacting of an indicator for decision-making.
I was interested in the WVAD because it seems to effectively add volume to price analysis. In my initial plotting this morning, I noticed that the EMA of TSVn plots very closely to the EMAn of (Volume x (Close - Open)/(High - Low))centered on zero.
Since my math is rusty about series expansions, how would an expansion formula look based on an EMAn that you mentioned? (of price and volume?)
Thanks much for your responses!
Erv
PS: Using the formula with the Open of the bar at the beginning of the fractal has provided some interesting results, especially of the 4 and 8 fractals.
|
|
Guest-1 |