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

Re: [amibroker] horizontal line



PureBytes Links

Trading Reference Links

Hi Roberto
Here's a clip from one of my indicators that you may be able to use.  This can be compressed in fewer lines
of code by nesting the functions but it was done this way for readability.    
 
Note that as long as the barindicator BIX is in the range it will develop a value for YY.
 
JOE

Daysback = Param("DysBack",126,10,252,1);

LastBar = BarCount-1;

FirstBar = LastBar - DaysBack;

BI = BarIndex();

BIX = IIf(BI >= Firstbar,1,0);

Y = LastValue(Close);

YY = IIf(BIX>0, y, Null); // plot only from days back to last bar

Plot(yy,"LastClose",colorRed,styleThick);

Plot(Close,"Close",colorBlack,styleCandle);

 
 
 
 
----- Original Message -----
Sent: Saturday, August 25, 2007 6:07 AM
Subject: [amibroker] horizontal line

Hi there,
I would like to know how to programatically draw a horizontal line that last for x bars and not for all the chart. When I use the PLOT function it draws a line trough all the chart length.
Tia.

__._,_.___

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

__,_._,___