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

[amibroker] Re: How do make this formula self adjust for entire data history?



PureBytes Links

Trading Reference Links

"SelectedValue" only works if I click on the chart.  I want these 
valude to adjust themselves like a MA would over time.

Thank you for trying to help.  Do you have any other ideas?

Thanks!!  :)

--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> that si because you ahve used LastValue, which is the last value
> 
> try selectedvalue
> 
> On 9/23/05, Rick <RickParsons@xxxx> wrote:
> > The following formula only gives me a plot for "PeriodsBack" from 
the
> > last date in file.  If I scroll back in time, the lines will not 
adjust
> > according to what is shown.
> >
> > I want to be able to backtest, so as the backtest goes thru time, 
I
> > want this formula to self adjust for each day.
> >
> > Thanks !!  :) :)
> >
> > PeriodsBack = Param("PeriodsBack", 96, 53, 200, 2);
> >
> > x = Cum(1);
> > lastx = LastValue( x );
> > aa = LastValue( LinRegIntercept( Close, Periodsback) );
> > bb = LastValue( LinRegSlope( Close, Periodsback ) );
> > y = Aa + bb * ( x - (Lastx - PeriodsBack) );
> > Plot( Close, "Close", colorBlack, styleCandle );
> > Plot( IIf( x >= (lastx - Periodsback), y, -1e10 ), "LinReg", 
colorRed );
> >
> >
> >
> >
> >
> > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> 
> 
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> 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/