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

Re: [amibroker] Trendline Indicator



PureBytes Links

Trading Reference Links

check out the linregslope indicator, for instance:
 
x = Cum(1);
lastx = LastValue( x ); Daysback = 10; aa = LastValue( LinRegIntercept( Close, Daysback) );
bb = LastValue( LinRegSlope( Close, Daysback ) );

y = Aa + bb * ( x - (Lastx - DaysBack) ); Plot( Close, "Close", colorBlack, styleCandle );
Plot( IIf( x >= (lastx - Daysback), y, -1e10 ), "LinReg", colorRed );
----- Original Message -----
From: convertah
Sent: Wednesday, August 13, 2008 6:55 PM
Subject: [amibroker] Trendline Indicator

Kind Greetings,

I have been trying to code an indicator that will render a trendline that will be used as a support-resistance reference line.

The trendline would be drawn through yesterdays 9:30AM candle (open+close)/2 and yesterdays 4:00PM candle
(open+close)/2 and extend into today.

I'm new to AFL and after l studied the users guide on AFL function references I realized I'm not sure where to even start. If someone could give me a little starting push it would be greatly appreciated.

Thank you,
All the best

Geary


__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___