[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error in TS LinearRegSlope function


  • To: omega-list@xxxxxxxxxx
  • Subject: Re: error in TS LinearRegSlope function
  • From: alex@xxxxxxxxxxxxxx (Alex Matulich)
  • Date: Wed, 3 Jul 2002 08:23:59 -0700
  • In-reply-to: <9837400051.20020702223222@xxxxxxx>

PureBytes Links

Trading Reference Links

code@xxxxxxx wrote:
>According to the help files, the LinearRegSlope Len parameter is a
>numeric simple type input.

That's exactly how I was using it.

>Numeric simple inputs limit you to a number that doesn't change on a
>bar-to-bar basis.

I'm not changing it at all.  Notice the length parameter is a
constant, 6 in one case and 4 in another:

>AM> AD = 100*(adv-dec)/(adv+dec+unc);
>AM> mm1 = LinearRegSlope(AD, 6);
>AM> mm2 = LinearRegSlope(mm1, 4);

They don't change from bar to bar.  There is no restriction to using
two different lengths in two different calls.  You can do the same
with xAverage, for example.  And even so, from the numbers given in
the AD column below, there is *no* length parameter that can produce
a slope of -90.12 from the previous AD values.  The mm1 column is
incorrect.  The mm2 column, from the same function, is correct.
Strange, huh?

>AM> Here's a sample of what TradeStation 2000i calculated:
>
>AM> date          AD        mm1       mm2
>AM> 1000627     10.70      4.73      2.78
>AM> 1000628     19.55      7.91      3.60
>AM> 1000629     -0.57     61.10     18.57
>AM> 1000630      0.29     18.32      9.39
>AM> 1000703     35.64    -14.95    -11.13
>AM> 1000705      1.13    -53.88    -37.82
>AM> 1000706      9.92    -90.12    -36.43

-- 
  ,|___    Alex Matulich -- alex@xxxxxxxxxxxxxx
 // +__>   Director of Research and Development
 //  \ 
 // __)    Unicorn Research Corporation -- http://unicorn.us.com