home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
finance
/
tas515dm.zip
/
EXAMPLES.ZIP
/
B_S_LINE.TAS
< prev
next >
Wrap
Text File
|
1992-08-12
|
1KB
|
39 lines
{***************** B_S_LINE.TAS 08/10/92 **********************}
{ This subroutine will draw vertical buy sell lines on the graph }
{ just plotted. This sub is called by GOSUB B_S_LINE immediately }
{ after GRAPH(.....) call}
{******************* IMPORTANT FOR USE OF THIS SUB ***************}
{IMPORTANT...This sub NEEDS AS INPUT a position array called POS }
{ YOU need set up this position array is 1 when you are long and}
{ -1 when short as input to this sub}
{***************** IMPORTANT END ********************************}
{ ******** Written by DENNIS MEYERS *********}
:b_s_line
{if lsw=0 got next} {****** if buy sell line switch <>0 then draw b/s line
s}
x_pos : array;
n_arrows=0;
for i=2; i<=qe; i=i+1; begin
if pos[i] <> pos[i-1] then begin
n_arrows=n_arrows + 1;
x_pos[n_arrows]=i;
{writeln( int(n_arrows), ' arrow position=',int(x_pos[n_arrows]),
' arrow=',int(pos[i]));}
end; {arrow x position}
end; {for loop}
if n_arrows=0 goto next;
xmax=c[1];
xmin=c[1];
for i=2; i<=qe; i=i+1; begin
if c[i]>xmax xmax=c[i];
if c[i]<xmin xmin=c[i];
end;{xmax,xmin for loop}
for i=1; i<=n_arrows; i=i+1; begin
k=x_pos[i];
color=2;
if pos[k]=-1 then color=4;
drawline(color,k-0.05,xmin,k+0.05,xmax,k-0.5,k+0.5);
end; {for loop}
:next
return;