home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
t
/
tas501.zip
/
DM.TAS
< prev
next >
Wrap
Text File
|
1993-02-25
|
1KB
|
44 lines
#TITLE Simple version of Wilder's Dir Movement system - uses ADX
#output_file 'dm.lst'
#max_quotes 55
{ WILDER.TAS
Wilder's Directional Movement Trading Example
This script will indicate
a BUY signal
if the +DI(14) crosses above -DI(14) and ADXR > 25
a SELL signal
if the -DI(14) crosses above +DI(14) and ADXR > 25
}
pdi_array : array; { declare the +DI (Positive Directional Movement array}
mdi_array : array; { declare the -DI (Negative Directional Movement array}
pdi_array := pdi(14); { calculate +DI}
mdi_array := mdi(14); { calculate -DI}
adxr_14 := adxr(14);
adx_14 = adx(14);
dx_14 = dx(14);
if first_ticker then
begin
writeln('TICKER NAME ADXR DX ADX +DI -DI ACTION');
end;
write(ticker,' ',fullname,
int(adxr_14),
int(dx_14),
int(adx_14),
int(pdi_array[0]),
int(mdi_array[0]));
action = '';
if (adxr_14 > 25) then { AVG DX Rate of Change > 25 }
begin
if (over(pdi_array,mdi_array) = 0) then
action = '** BUY SIGNAL';
else
if (over(mdi_array,pdi_array) = 0) then
action = '** SELL SIGNAL';
end;
writeln(action);