PureBytes Links
Trading Reference Links
|
Jack,
I indirectly answered the question of
why factor = 2 / (Length + 1) :)
due to the base case of 0 that the writer wanted to
have, than Length = 1 must somehow agree to
the current price only.
To resolve that notice when length = 1,
factor = 2 / (1 + 1) = 1, which will do the
trick of making the previous xaverage term
multiply by 0.
thus you must use 2 on top if you want
length = 0 works ....
SystemWriter comes from a time of dark ages
in mathematics I guess :)
Still have this damn thing - but cannot run it
on any of my computer in the office anymore,
even though they are more powerful ...
-Lawrence
--- Jack Griffin <jack_2231@xxxxxxxxx> wrote:
> --- Lawrence Chan <stnahc@xxxxxxxx> wrote:
> ...
> > OK - why Length + 1?
> >
> > In the time of SystemWriter the length can be 0.
> > plug the length 0 in and you will have a good time
> > :)
> >
> > The guy who wrote xaverage figured a base case of
> 0
> > is important to make the definition complete,
> > thats all. Thus the definition used in TS is wrong
> > :)
> >
> > When Length is huge and if it is not
> > single-precision,
> > it does not matter.
> >
> > -Lawrence
> >
>
> That explains the +1, though you have to admit it
> would be better to simple give zero, an error, or C
> when idiots ask for a zero-length m.a.
>
> Still no good explanation as the factor of 2 though.
>
> Thanks for the story!
>
> Cheers,
> Jack
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
=====
Lawrence Chan http://www.tickquest.com
Home of trading tools NeoBreadth and NeoTicker series
|