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

Re: [EquisMetaStock Group] Re: Dave Landry -- Linear Regression Trendline



PureBytes Links

Trading Reference Links


Thanks very much, Jose.

I encounter a problem using the trendline formula as an exploration filter: 
"This function is not allowed in this type of formula." Cursor flashes 
after "equals" in pds:=Input("Linear Regression Trendline. Is there a 
simple way to fix this? I imagine that the message applies to all such 
functions.

Philip


>The LinReg trendline code at
>http://www.metastocktools.com/MetaStock/LinRegTrend.txt
>will give you the code you need for just the Lin Reg trendline.
>
>To count trendline/bar crosses:
>
>===========================================
>Linear Regression Trendline Bar Cross Count
>===========================================
>---8<--------------------------------------
>{ http://www.metastocktools.com/#metastock }
>
>{ Message only }
>message:=Input("references 'Linear Regression Trendline' indicator",0,
>0,0);
>
>{ Lin Reg Trendline reference }
>trend:=Fml("Linear Regression Trendline");
>
>{ Trendline/bar cross count }
>crs:=trend>=L AND trend<=H;
>crossCount:=BarsSince(crs AND Ref(crs,-1)=0)+1;
>validCrossCount:=If(crs,crossCount,0);
>
>{ Plot in own window }
>validCrossCount
>
>---8<--------------------------------------
>
>
>Bear in mind that trendlines adjust themselves to the last bar of
>data, so that they look great in hindsight, but may not be so useful
>in real trading.
>
>
>jose '-)
>http://www.metastocktools.com
>
>
>
>
>--- In equismetastock@xxxxxxxxxxxxxxx, Philip Schmitz <pschmi02@xxxx>
>wrote:
> >
> > Greetings All,
> >
> > Dave Landry uses the 20-period Linear Regression Trendline to define
> > trend, just the trendline itself with no channels around it.
> > According to Landry's definition, a "persistent trend" is present
> > when (among other things) the 20-period LinReg Trendline goes
> > through all of the bars. Bars that fall entirely above the trendline
> > don't matter. I'm intrigued by the idea because of its simplicity,
> > and when you look at price action that fits that definition it is in
> > fact a nice tight trend.
> >
> > I've found Jose's formula for the the whole bit, channels and all,
> > but I can't find a formula for the trendline itself. I'd like to be
> > able to use the formula as an exploration filter along with the
> > requirement of the bars not falling below it.
> >
> > Any suggestions?
> >
> > TIA,
> > Philip
>
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/