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

[EquisMetaStock Group] Re: Question for Jose regarding th Linear Regression Trendline & Bands v3.0



PureBytes Links

Trading Reference Links


Steve, try this:

=================================
Linear Regression Trendline count
=================================
---8<----------------------------

{ "Linear Regression Trendline" indicator:
  http://users.bigpond.com/prominex/MetaStock/LinRegTrend.txt }

{ User input }
choose:=Input("Crossings:  [1]Count,  [2]Percentage",1,2,1);

{ Trendline Reference }
trend:=Fml("Linear Regression Trendline");

{ Stats }
crossing:=Cross(C,trend) OR Cross(trend,C);
barCount:=BarsSince(Cum(IsDefined(trend))=1);
crossCount:=Cum(crossing);
percentage:=crossCount/barCount*100;

{ Plot in own window }
If(choose=1,crossCount,percentage)

---8<----------------------------


jose '-)



--- In equismetastock@xxxxxxxxxxxxxxx, Stephen Dawson <dawsonsg@xxxx> 
wrote:
> 
> Hello Jose,
> 
> I have been having a play with your Linear Regression Trendline &
> Bands v3.0 code from your website. 
> 
> I was wondering if it is possible to somehow calculate the number
> of daily bars that the automatic trendline crosses (not the bands).
> 
> Regards
> Steve







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/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/