Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 3/21/2006 Posts: 4,308
|
Using this formula for a our day Weighted Moving Average that I found on the internet, how would or could I convert this to use in telachart as an indicator 5 day wieghted moving average and then a 15 day wieghted moving average and then a 25 day wieghted moving average.
A 4 bar weighted moving average with prices of 1.2900, 1.2900, 1.2903, and 1.2904 would give a moving average of 1.2903 using the calculation ((4 * 1.2904) + (3 * 1.2903) + (2 * 1.2900) + (1 * 1.2900)) / (4 + 3 + 2+ 1) = 1.2903
|
|
Registered User Joined: 3/21/2006 Posts: 4,308
|
Also does anyone know how to construct a Volume Weighted MovingAveage?
|
|
Registered User Joined: 3/21/2006 Posts: 4,308
|
Sorry that is Volume Weighted MovingAverage?
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
"A 4 bar weighted moving average with prices of 1.2900, 1.2900, 1.2903, and 1.2904 would give a moving average of 1.2903 using the calculation ((4 * 1.2904) + (3 * 1.2903) + (2 * 1.2900) + (1 * 1.2900)) / (4 + 3 + 2+ 1) = 1.2903"
------------------------------------------------------------------
You would just replace the equation values with C, C1,C2,
(and so on)
Typically the divide by values are added elsewhere and
just put in as 1 number.
4 bar weighted average:
(this)
(C*4+C1*3+C2*2+C3*1)/10
(instead of this):
(C*4+C1*3+C2*2+C3*1)/(4+3+2+1)
-----------------------------------------
5 bar weighted average:
(C*5+C1*4+C2*3+C3*2+C4*1)/15
A 15 bar would be
(C*15+C2*14 AND SO ON UNTIL C14*1)/120
A 25 bar would be:
(C*25+C2*24 AND SO ON UNTIL C24*1)/325
------------------------------------------------------------------------------
The volume weighted average was used in VPCI
and usually takes the form:
VWMA 5
(C*V+C1*V1+C2*V2+C3*V3+C4*V4)/(AVGV5*5)
"each days close times its volume"/"the sum of volume"
(multiplying the volume average "AVGV5" by its length "*5"
creates the sum)
Thanks
diceman
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Oooops
The above should read:
A 15 bar would be
(C*15+C1*14 AND SO ON UNTIL C14*1)/120
A 25 bar would be:
(C*25+C1*24 AND SO ON UNTIL C24*1)/325
(using C1 as the second close instead of C2 as I have listed above)
Thanks
diceman
|
|
Registered User Joined: 3/21/2006 Posts: 4,308
|
Thank you diceman for your help. I like the Volume weighted Moving Averages. I found the weighted Moving Averages to be almost identical to the Exponential Moving Average of the same length.
As usual you came throgh for me..
Apsll.
|
|
Registered User Joined: 4/18/2005 Posts: 4,090
|
darnit! I just closed TC .. this looks cool. Tomorrow.
|
|
Registered User Joined: 3/21/2006 Posts: 4,308
|
Scott, the formula to construct a 30 day VWMA is as follows, make sure you use "plot using price scale" -
(C*V+C1*V1+C2*V2+C3*V3+C4*V4+C5*V5+C6*V6+C7*V7+C8*V8+C9*V9+C10*V10+C11*V11+C12*V12
+C13*V13+C14*V14+C15*V15+C16*V16+C17*V17+C18*V18+C19*V19+C20*V20+C21*V21+C22*V22
+C23*V23+C24*V24+C25*V25+C26*V26+C27*V27+C28*V28+C29*V29+C30*V30)/(AVGV31*31)
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
"Scott, the formula to construct a 30 day VWMA is as follows, make sure you use "plot using price scale" -
(C*V+C1*V1+C2*V2+C3*V3+C4*V4+C5*V5+C6*V6+C7*V7+C8*V8+C9*V9+C10*V10+C11*V11+C12*V12
+C13*V13+C14*V14+C15*V15+C16*V16+C17*V17+C18*V18+C19*V19+C20*V20+C21*V21+C22*V22
+C23*V23+C24*V24+C25*V25+C26*V26+C27*V27+C28*V28+C29*V29+C30*V30)/(AVGV31*31)"
---------------------------------------------------------------------------------
Because C=day 1 and C1=day2 ( its off by 1) A 30 day VWMA
would actually end on "C29*V29" and use (AVGV30*30) at the end.
What is shown above is actually a 31 day VWMA.
Thanks
diceman
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (Apsll) I found the weighted Moving Averages to be almost identical to the Exponential Moving Average of the same length.
Apsll,
We might expect a WMA to more closely resemble an EMA of the same Lag than an EMA of the same Period.
The WMA of Period 7 is:
(7*C0+6*C1+5*C2+4*C3+3*C4+2*C5+1*C6)/28
The EMA with the same Lag of 2 bars has Period 5.
Upon spacing through a few stocks, I believe most would conclude that the WMA7 more closely resembles the EMA5 than the EMA7.
Thanks,
Jim Murphy
|
|
Guest-1 |