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

Re: Trend Filter Needed



PureBytes Links

Trading Reference Links

<x-html><HTML>
<BODY BGCOLOR="#FFFFFF">
This is a modification of Wells Wilder's Parabolic which is
<BR>provided by Omega.&nbsp; You may find it very good for longer
<BR>term trends.

<P>You will be surprised how long you will have to make the
<BR>length parameter to get what you want.

<P>I've included an indicator which you can apply to charts
<BR>and see if it might work.&nbsp; This indicator calls the function
<BR>you would use if you find it works.

<P>Clyde Lee
<BR>&nbsp;

<P>Code follows:

<P>{
<BR>&nbsp;Indicator LeeXHLClose
<BR>&nbsp;
<BR>&nbsp;Indicator using&nbsp; LEEXHL2Clo function.

<P>&nbsp;Function for use in Trading systems written by:
<BR>&nbsp;Clyde Lee (FuturesMagic) Copyright (c) 1997
<BR>&nbsp;clydelee@xxxxxxx

<P>&nbsp;Major modification of:
<BR>&nbsp; Parabolic function by Omeaga Research
<BR>}

<P>Input: Length(156);

<P>If CurrentBar>1 then Plot1(LEEXHL2CLO(LENGTH)[1],"Plot1");
<BR>&nbsp;

<P>##############################################################
<BR>&nbsp;

<P>{
<BR>&nbsp;Function RSIScoreKnt

<P>&nbsp;Function for use in Trading systems written by:
<BR>&nbsp;Clyde Lee (FuturesMagic) Copyright (c) 1997
<BR>&nbsp;clydelee@xxxxxxx

<P>&nbsp;Major modification of:
<BR>&nbsp; Parabolic function by Omeaga Research
<BR>}

<P>Inputs:&nbsp; LenSmo(Numeric);
<BR>Vars:&nbsp; Position(-1), SAR(Close),
<BR>&nbsp;&nbsp; Hi(High),&nbsp; Lo(Low),
<BR>&nbsp;&nbsp; Alpha(0),&nbsp; xBeta(1),
<BR>&nbsp;&nbsp; Alpha1(0),&nbsp; xBeta1(1),
<BR>&nbsp;&nbsp; AlphaAdj(.2), Init(0);

<P>If Init=0 then begin
<BR>&nbsp;&nbsp; Init=1;&nbsp;&nbsp; Alpha=2/(1+AbsValue(LenSmo));&nbsp;
xBeta=1-Alpha;
<BR>&nbsp;&nbsp; AlphaAdj= Alpha&nbsp; /(1+AbsValue(LenSmo))*2.;&nbsp;&nbsp;&nbsp;
{.04;}
<BR>End;

<P>IF CurrentBar = 1 Then
<BR>&nbsp; Position = 1
<BR>Else if CurrentBar >1 then Begin
<BR>&nbsp; IF Close > Hi Then&nbsp;&nbsp;&nbsp;&nbsp; Hi = Close;
<BR>&nbsp; IF Close &lt; Lo Then&nbsp;&nbsp;&nbsp;&nbsp; Lo = Close;
<BR>&nbsp; IF Position = 1 Then begin
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF Close &lt;= SAR Then&nbsp;&nbsp;&nbsp;
Position = -1;&nbsp; {Reverse position}
<BR>&nbsp; End
<BR>&nbsp; Else Begin
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF Close >= SAR Then&nbsp;&nbsp;&nbsp;
Position = 1;&nbsp;&nbsp; {Reverse position}
<BR>&nbsp; End;
<BR>End;

<P>xBeta1 = xBeta1 - AlphaAdj;
<BR>Alpha1 = Alpha1 + AlphaAdj;

<P>IF Position = 1 Then Begin
<BR>&nbsp; IF Position[1] &lt;> 1 Then Begin
<BR>&nbsp;&nbsp;&nbsp; SAR = Lo;&nbsp;&nbsp;&nbsp; Lo = Close;&nbsp; Hi
= Close;
<BR>&nbsp;&nbsp;&nbsp; Alpha1=Alpha;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xBeta1=xBeta;
<BR>&nbsp; End
<BR>&nbsp; Else Begin
<BR>&nbsp;&nbsp;&nbsp;&nbsp; SAR = SAR*xBeta1+Close*Alpha1;
<BR>&nbsp; End;
<BR>&nbsp; IF SAR > Close Then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
SAR = Close;
<BR>&nbsp; IF SAR > Close[1] Then&nbsp;&nbsp;&nbsp; SAR = Close[1];
<BR>End
<BR>Else Begin
<BR>&nbsp; IF&nbsp; Position[1] &lt;> -1 Then Begin
<BR>&nbsp;&nbsp;&nbsp; SAR = Hi;&nbsp;&nbsp;&nbsp; Lo = Close;&nbsp;&nbsp;
Hi = Close;
<BR>&nbsp;&nbsp;&nbsp; Alpha1=Alpha;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xBeta1=xBeta;
<BR>&nbsp; End
<BR>&nbsp; Else Begin
<BR>&nbsp;&nbsp;&nbsp; SAR = SAR*xBeta1+Close*Alpha1;
<BR>&nbsp; End;
<BR>&nbsp; IF SAR &lt; Close Then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
SAR = Close;
<BR>&nbsp; IF SAR &lt; Close[1] Then&nbsp;&nbsp;&nbsp; SAR = Close[1];
<BR>End;

<P>LEEXHL2CLO = SAR;
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;

<P>DMI wrote:
<BLOCKQUOTE TYPE=CITE>&nbsp;<FONT COLOR="#000000"><FONT SIZE=-1>I am working
on a new trading system that would be applied to the Nasdaq Composite and
S&amp;P cash price. This system would be for trading mutual fund shares
and would be designed for long-term trends only.</FONT></FONT>&nbsp;<FONT COLOR="#000000"><FONT SIZE=-1>I
have part of the system completed with potentially beneficial results.
However, there are times when false signals occur. I know that creating
a system that is accurate 100% of the time is a bit difficult but am looking
for trend filters that might help reduce the whipsaw losses and non gains
problems. Any suggestions for a trending filter would be greatly appreciated.</FONT></FONT></BLOCKQUOTE>
&nbsp;
</BODY>
</HTML>
</x-html>
Attachment Converted: "c:\eudora\attach\Leexhlc.ela"

Attachment Converted: "c:\eudora\attach\vcard152.vcf"