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

[amibroker] Re: afl help, suggestion needed



PureBytes Links

Trading Reference Links

Ian,

Thankyou very much.

brian_z

--- In amibroker@xxxxxxxxxxxxxxx, "Ian Watts" <idw456@xxx> wrote:
>
> Brian
> 
> The function was written by Thomasz and can be 
> found here:
>  http://www.traders.com/Documentation/
> FEEDbk_docs/Archive/122007/TradersTips/
> TradersTips.html#amibroker
> 
> 
> function RSquared(array, periods) 
> { 
> 	R = Correlation(BarIndex(), array, 
> periods );
> 	R2 = R * R;
> 	return R2; 
> }
> 
> R2 = RSquared(C, NoPeriods);
> LVR2 = LastValue(R2);
> Filter = LVR2 > 0.9;
> 
> I have changed it slightly to use R * R instead 
> of R^2 to speed up the calculation.
> 
> The exploration aims to find stocks that are 
> currently going up or down relatively 
> smoothly.  
> 
> All the Best
> 
> Ian
> 
> --- In amibroker@xxxxxxxxxxxxxxx, 
> "brian_z111" <brian_z111@> wrote:
> >
> > Ian Watts,
> > 
> > How can I do that in AFL?
> > Have you seen the R-Squared formula at the 
> AFL library - any comment 
> > on that?
> > 
> > Any hints greatly appreciated.
> > 
> > Thanks,
> > 
> > brian_z
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Ian 
> Watts" <idw456@> wrote:
> > >
> > > A method I use is to fit a least squares 
> line 
> > > to the last 20 or so bars.  Then calculate 
> R 
> > > Squared and select the stocks with the 
> highest 
> > > values of R Squared.
> > > 
> > > Regards
> > > 
> > > Ian
> > > 
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, 
> > > "safetrading" <safetrading@> wrote:
> > > >
> > > > With every strategy I have used, I have 
> > > always noticed that I get 
> > > > whipsawed out more often with stocks that 
> > > don't flow smoothly and 
> > > > therefore have tried to create a filter 
> that 
> > > does nothing more than 
> > > > find stocks which flow smoothly up and 
> down.
> > > > 
> > > > The best I have come up with is one that 
> > > simply limits the number of 
> > > > up and down fractals in a given time 
> period.  
> > > While this helps, it 
> > > > does not really produce what I was hoping 
> to 
> > > get.
> > > > 
> > > > Can anyone offer any help or suggestions 
> with 
> > > this?
> > > > 
> > > > Thanks,
> > > > 
> > > > Safetrading
> > > >
> > >
> >
>



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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

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