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

RE: Linear Regression



PureBytes Links

Trading Reference Links


>From: Brian Keith Voiles <admagic@xxxxxxxx>
>To: "Jody Ellis" <ellis_jody@xxxxxxxxxxx>
>Subject: RE: Linear Regression
>Date: Tue, 31 Jul 2001 19:07:33 -0600
>
>Could someone please post this again.
>I missed the fact that it was to help in defining a sideways market.
>And right now that is my system's biggest challenge.
>Thanks,
>Brian
>

Here is the message I replied to:

Thanks to all who suggested the Linear Regression Slope to determine the
angle at which a moving average is rising or falling.

FYI, I use a proprietary MA that turns "sideways" during a price channel and
trends up or down during price trends.  Using the Linear Regression Slope
was an attempt to define "sideways".

I came up with the following EL formula that defines "sideways" as a
difference of less than .03 points between the previous close and the
current close.  When the MA is trending up or down with prices, the MA is
Yellow.  When the MA is trending sideways, the MA is black.

    If ((Value1[1] + .03) < Value1) or ((Value1[1]-.03) > Value1) then
        SetPlotColor(2, Yellow)
        Else

    If (Value1[1]>= Value1 [2]-.03 and Value1[1] <= (Value1 + .03)) then
    SetPlotColor(2, Black);

It seems to work well.

Gerald Marisch


>
>At 06:51 PM 7/31/2001, you wrote:
>>Hi Gerald,
>>
>>In regards to the code you posted for defining a sideways market, I was
>>wondering if this was designed just for a specific security? Because you
>>have included a paramater of 0.03 points in the formula. Is there a way to
>>normalise this indicator so it will work the same for all securities? I
>>previously have tried to divide the result by the closing price or average
>>true range but I am not satisfied. Do you have any ideas on how to make
>>indicators totally adaptable?
>>
>>Regards,
>>
>>Jody.
>