wilderSum
Yuanwei, You are correct. The initial seed value is the raw sum, starting with TTR_0.21-0. As it says in the TTR/CHANGES file (among other things): - Changed wilderSum to seed initial value with raw sum. This matches Wilder's original calculations. Thanks to Mahesh Bp for the report. HTH, -- Joshua Ulrich ?| ?FOSS Trading: www.fosstrading.com
On Wed, Feb 8, 2012 at 3:50 AM, yuanwei <zhuyuanwei8 at gmail.com> wrote:
Hi ?Joshua, ? ?Before I found your post here, I have viewed your source code for 'wilderSum'<http://cran.r-project.org/src/contrib/TTR_0.21-0.tar.gz> to figure out how wilderSum works - I re-write a piece of R code to implement the algorithm as in your source code, but failed to get the right result as wilderSum function in TTR. Glad to see your explanation here for wilderSum, but I am still confused by the source code: the initial value(sum) for the iterator seems to be a simple sum of first (n-1) X's... ? Thanks for your kind help in advance! yuanwei -- View this message in context: http://r.789695.n4.nabble.com/wilderSum-tp846599p4368945.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.