You neeed to use linearray function to draw a line.
Find first visible bar using:
bi = BarIndex();
Firstbar = status("FirstVisibleBar") - bi[0];
Line = linearray(FirstBar,ATR_value,Barcount-1,ATR_Value,0,0);
Plot(Line, .... )
Check help file for details
Ara
----- Original Message -----
From: "foxblade2000invest" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, July 30, 2008 9:00 AM
Subject: [amibroker] Code to draw a line
> Could someone help?
>
> I'd like a line (well) to be drawn automatically on my chart - the
> line would be at the last close price, minus 1,2 and 3 ATR(20)'s?.
> Ideally the line would go from left to right across all the scren,
> whatever the timescale being viewd?
>
> Could anyone suggest some code or point me in the right direction.
>
> Thanks in advance for any help.
>
> Cheers,
> Rich
>
>
> ------------------------------------
>
> 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
>
>
>