home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
finance
/
tas515dm.zip
/
EXAMPLES.ZIP
/
GAPS.TAS
< prev
next >
Wrap
Text File
|
1991-11-30
|
4KB
|
124 lines
{ Written by Jim Camenos, May 29, 1991
Prodigy code VNGH10A
Lists tickers that Gapped Open and stayed Gapped for the day }
{
June 6, 1991 revision 1 - Its important to know where the gap
occurred. I'm using '+'s to identify the gap. +++ = gap happened
the day after a peak or trough, ++ = the gap less than 3% from the
peak or trough and + = a gap which is greater than 3% from the
peak or trough. A + may be a runaway gap or exhaustion gap.
A ++ might be a runaway gap or breakout gap. A +++ might be
a breakout gap.
The BUY and SELL remarks in the report are
purely based on pricing theory. Check your charts before
making any trading decisions.
The price to the left of the full name is what this program determined
as the trough or peak price. The price to the right of the full name
is todays closing, then the price gap and percentage.
June 7, 1991 revision 2 - Relating to the size of the gap. I dont know
if the size of the gap is important. The word 'GAP' appears with an
'*' following or no '*'. The '*' indicates that the move, eg, yesterdays
low to today high or vice versa for a down move, is greater than the
average trading range + 1 standand deviation.
June 7 1991 - Volume strength indicator is adding a 'V' to the word 'GAP'
which apprears on the analysis 'GAP*V' or 'GAP V'. The "V" indicates
that the volume on the day of the gap was greater than or equal to the
average daily volume + 2 standard deviations.
}
#max_quotes 50
#OUTPUT_FILE 'gaps.LST'
#scan_date 910610;
tday = date;
trd := ' ';
q = quote_count;
vx = sum(v,q)/q;
vs = std(v,q);
vs2 =vs+vs+vx;
if v >= vs2 then
vi = 'V' else
vi = ' ';
if first_ticker = 1 then
begin
writeln('\n','P/T : Peak or Trough from the Gap');
writeln('SV : "*" under "S" = gap > avg trading range + 1 Std Deviation');
writeln(' "V" under "V" = volume strength > avg daily volume + 2 Std Deviations');
writeln('123 : could be +, ++, +++. Refer to script documentation',);
writeln('Alert: Refer to script documentation','\n');
writeln('Dir Ticker P/T Full Name Gap SV Length123 Move Alert');
end;
gosub true_range;
if h[-1] > h[-2] and l[-1] > l[-2] and h > h[-1] and l > l[-1] then
begin
if (h[-1]-l[-1])>(h[-2]-l[-2]) then
a = (((h[-1]-l[-1])*1.40)+h[-1]) else
a = (((h[-2]-l[-2])*1.40)+h[-1]);
if h >= a and (c < h[-1] or c = l) then trd ='SELL';
end;
if h < h[-1] and l < l[-1] and l < l[-2] then
begin
a = l[-1]-((h[-1]-l[-1])*1.40);
if l <= a and (c > l[-1] or c = h) then trd='BUY ';
end;
if h[-1] <= h[-2] and l[-1] >= l[-2] then
if h < h[-1] and l < l[-1] and c < l[-1] then
trd = 'SELL' else
if h > h[-1] and l >= l[-1] and c > h[-1] then
trd = 'BUY ';
if l > h[-1] then begin
xtr1 = trough(l,1);
xtr2 = trough(l,2);
xtr1c = h[xtr1]*1.03;
if l[xtr1] > l[xtr2] and l > xtr1c then
xtrf = '+ '
if l > xtr1c then
xtrf = '+ ' else
xtrf = '++ ';
if xtr1 = -1 then
xtrf = '+++';
if (h-l[-1]) >= over_sd then
xsd = '*' else
xsd = ' ';
gap = l-h[-1];
gap_perc = (gap/h[-1])*100;
writeln(' UP ',ticker,l[xtr1],' ',fullname,c[0],' Gap',xsd,vi,gap,xtrf,' ',gap_perc,'%',' ',trd);
end;
if h < l[-1] then begin
xtr1 = peak(h,1);
xtr2 = peak(h,2);
xtr1c = l[xtr1]-(l[xtr1]*.03);
if h[xtr1] > h[xtr2] and h < xtr1c then
xtrf = '+ ' else
if h < xtr1c then
xtrf = '+ ' else
xtrf = '++ ';
if xtr1 = -1 then
xtrf = '+++';
if (h[-1]-l) >= over_sd then
xsd = '*' else
xsd = ' ';
gap = l[-1]-h;
gap_perc =(gap/l[-1])*100;
writeln(' DN ',ticker,h[xtr1],' ',fullname,c[0],' Gap',xsd,vi,gap,xtrf,' ',gap_perc,'%',' ',trd,);
;
end;
:true_range
tx : array;
tx = tr();
x = quote_count;
avg_tx = sum(tx,x)/x;
sd = std(tx,x);
over_sd = avg_tx+sd;
return;