Exponential
Calculations for PCFs
Special thanks to imcharodude who introduced the Group to the formula
for calculating Exponential Moving Averages (9/12/00 ejr39)
Calculating
Exponential Percentage
(message 11519)
"An exponential
(or exponentially weighted) moving average is calculated by applying a percentage
of today's closing price to yesterday's moving average value. Exponential moving
averages place more weight on recent prices."
From: http://www.equis.com/free/taaz/movingaverages.html
"The formula
for converting time periods to exponential percentages is:
(2 / (Time Periods + 1)) "
Calculate to 3 places after the decimal.
An example using
21 time periods (i.e. days in 1 trading month):
(2
/ (Time Periods + 1))
2 / (21+1) or 2 / 22 = 0.091
the result is the 21-day exponential percentage or
(ep) = 0.091
(1-(2/(21+1)))
1 - (ep) = 0.909
this result is the 21-day exponential percentage
subtracted from 1 or (ep1) = 0.909
An example using
12 time periods,
i.e. as used with the Indicator Tab# setting
. MACD Short: 12 Long: 26 - Exponential
(2
/ (Time Periods + 1))
2 / (12+1) or 2 / 13 = 0.154
the result is the 12-day exponential percentage or
(ep) = 0.154
(1-(2/(12+1)))
1 - (ep) = 0.846
this result is the 12-day exponential percentage
subtracted from 1 or (ep1) = 0.846
An example using
26 time periods,
i.e. as used with the Indicator Tab# setting
. MACD Short: 12 Long: 26 - Exponential
(2
/ (Time Periods + 1))
2 / (26+1) or 2 / 27 = 0.074
the result is the 26-day exponential percentage or
(ep) = 0.074
(1-(2/(26+1)))
1 - (ep) = 0.926
this result is the 26-day exponential percentage
subtracted from 1 or (ep1) = 0.926
Writing the 21-day EMA PCF
(message 11520)
For the 21-period
EMA, copy the following formula to a word processor:
(((((((((((((((((((((AVGC21.21
*ep1+C20*ep) *ep1+C19*ep) *ep1+C18*ep)
*ep1+C17*ep) *ep1+C16*ep) *ep1+C15*ep)
*ep1+C14*ep) *ep1+C13*ep) *ep1+C12*ep)
*ep1+C11*ep) *ep1+C10*ep) *ep1+C9*ep)
*ep1+C8*ep) *ep1+C7*ep) *ep1+C6*ep)
*ep1+C5*ep) *ep1+C4*ep) *ep1+C3*ep)
*ep1+C2*ep) *ep1+C1*ep) *ep1+C*ep)
Replace: the characters
‘ep’ with the result of ep.
. For the 21-day example, ep = 0.091
Replace: the characters ‘ep1’ with the result of ep1.
. For the 21-day example, ep1 = 0.909
Count the number
of ) or right parens after
each item in the list. The number of right
parens must equal the number of ( or left
parens in the top line.
Remove ALL spaces
and line returns from the formula.
Highlight an Editing
formula for window.
Copy the spaceless formula to the Editing formula for window.
Test.
If a Syntax Error occurs,
. be sure the number of left parens equals the number of right parens.
Calculate For: All Stocks
Update All Criteria.
Testing the Exponential Moving Average PCF
(message 11521)
Be sure that the
Price moving average is displayed as exponential:
Select a Chart Tab#
From the TC2000 menu bar,
Click [I] for the Editing Indicator Tab# window,
Top Window
. Prices - xxx Chart
. . Moving Average - 21 bars Exponential
During the testing phase, you may wish to uncheck the visibility of other moving
averages in the Editing Indicator Tab# window.
From the Sort dropdown
menu,
. Select: #0 21-day EMA
From the TC2000
menu bar,
. Click the plus magnifying glass
. . Set: Zoom = 8 or 9
Suggestion:
From the tools list,
. Select: Chart Display Options
. . Use Classic Telechart Scaling
Do the Sort Values
agree with the right tip of the 21-EMA line?
Keep in mind the mechanical distortion resulting from the chart graphing process.
If the Sort Values and the chart 21-EMA are erratic or grossly inaccurate, check
the PCF to be sure that there are 21 decending sequential entries.
When satisfied
with the results, return chart display options to your preferred settings.
Writing other Exponential Moving Average PCFs:
(message 11521)
Calculate the Exponential
Percentage for the moving average:
((( <= number
of left parens in this line must equal
the number of ) right parens in the formula.
AVGCnn <= simple moving average
.n <= as of or the same as nn
*ep1 + Cn-1 * ep) <= Cn-1 is the Close for the day
following .n
*ep1 + Cn-2 * ep) <= Cn-2 is the Close for the second
day following .n
include 1 decending sequential entry for each Close
following .n
*ep1+C*ep)
Replace ep with
the value from the Exponential Percentage calculation.
Replace ep1 with the value from the Exponential Percentage calculation.
Copy the spaceless
formula to the Editing formula for window.
[Test] [Save] [Update All Criteria]
Follow the previous
directions for Testing the Exponential Moving Average PCF.
|