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

RE: [amibroker] Drawing Lines



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>A good start:
<FONT face=Arial color=#0000ff 
size=2> 

LineArray( x0, y0, x1, y1, extend = 0 )

generates array equivalent to trend line drawn from point x0, y0 
to point x1, y1. x coordinates are in bars (zero based), y coordinates are in 
dollars Note: x0 must be SMALLER than x1. Note 2: the function accepts only 
numbers therefore
generates single line. To produce multiple lines you have to call 
it many times with different co-ordinates.
if extend is 1 then line is right extended.
if extend is 2 then line is left extended
if extend is 3 then line is left and right extended

Example:
y0=LastValue<FONT 
size=2>(Trough<FONT 
size=2>(L,5<FONT 
size=2>,2));
y1=LastValue<FONT 
size=2>(Trough<FONT 
size=2>(L,5<FONT 
size=2>,1));
x0=BarCount 
- <FONT 
color=#ff00ff size=2>1 <FONT 
size=2>- <FONT color=#0000ff 
size=2>LastValue(<FONT color=#0000ff 
size=2>TroughBars(L,<FONT color=#ff00ff 
size=2>5,2<FONT 
size=2>));
x1=BarCount 
- <FONT 
color=#ff00ff size=2>1 <FONT 
size=2>- <FONT color=#0000ff 
size=2>LastValue(<FONT color=#0000ff 
size=2>TroughBars(L,<FONT color=#ff00ff 
size=2>5,1<FONT 
size=2>));
Line = <FONT 
color=#0000ff size=2>LineArray( x0, y0, x1, y1,<FONT 
face="Courier New" size=2> 1<FONT 
face="Courier New" size=2> );<FONT 
face="Courier New" size=2>
Plot<FONT 
size=2>(C, <FONT 
color=#ff00ff size=2>"C",<FONT face="Courier New" 
size=2> colorWhite,<FONT face="Courier New" 
size=2> styleCandle);<FONT 
face="Courier New" size=2>
Plot( 
Line, <FONT color=#ff00ff 
size=2>"Trend line", 
colorBlue 
);

new function sign( x )
(x can be number or array).
Returns 1 if x is positive, returns -1 if x is negative, and returns 0 if x 
is zero.

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: osondu2 
  [mailto:osondu2@xxxxxxxxx]Sent: November 21, 2003 7:12 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
  Drawing LinesHi,Does anybody know how to draw 
  lines with AFL from any x,y coordinate to 
  another.Thanks.Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.