Gold Customer
Joined: 11/25/2004 Posts: 10
|
I am attempting to create a PCF to calculate a 13 day moving average of a 13 day "Rate of Change" of an indicator. This is best described by an example.
In any middle window add a 34 day TSV for example. Now add a 13 day "ROC" of the 34 day TSV. Now add a 13 day moving average of the 13 day rate of change. No problems.
I have used both of the following to match the 13 DMA of the 13 day "ROC" plotted by TC2000. Unfortunately, the calculated "ROC' results in extended max and mins and is shifted to the right.
The formulas used are:
AVG(TSV34,13)-AVG(TSV34.12,13) or (by brute force)
((TSV34-TSV34.12)+(TSV34.1-TSV34.13)+(TSV34.2-TSV34.14)+(TSV34.3-TSV34.15)+(TSV34.4-TSV34.16)+(TSV34.5-TSV34.17)+(TSV34.6-TSV34.18)+(TSV34.7-TSV34.19)+(TSV34.8-TSV34.20)+(TSV34.9-TSV34.21)+(TSV34.10-TSV34.22)+(TSV34.11-TSV34.23)+(TSV34.12-TSV34.24))/13
Thesee give identical values and plots but both are different vs. TC2000 as noted above. I am sure that I am missing something simple. Does anyone have any suggestions?
Robin Hood
|