home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / finance / tas206.zip / DM.TAS < prev    next >
Text File  |  1991-02-14  |  871b  |  26 lines

  1. #output_file 'dm.lst'
  2. { DM.TAS
  3.    Wilder's Directional Movement Trading Example
  4.    This script will indicate
  5.       a BUY signal
  6.          if the +DI(14) crosses above -DI(14) and ADXR > 25
  7.       a SELL signal
  8.          if the -DI(14) crosses above +DI(14) and ADXR > 25
  9. }
  10. pdi_array : array;   { declare the +DI (Positive Directional Movement array}
  11. mdi_array : array;   { declare the -DI (Negative Directional Movement array}
  12.  
  13. pdi_array := pdi(14);   { calculate +DI}
  14. mdi_array := mdi(14);   { calculate -DI}
  15.  
  16. adxr_14 := adxr(14);
  17. if (adxr_14 > 25)   then        { AVG DX Rate of Change > 25 }
  18. begin
  19.  
  20.    if (over(pdi_array,mdi_array) = 0) then
  21.       writeln(TICKER,' +DI crossed upward over -DI *** BUY SIGNAL ***')
  22.    else
  23.    if (over(mdi_array,pdi_array) = 0) then
  24.       writeln(TICKER,' +DI crossed downward over -DI *** SELL SIGNAL ***');
  25. end;
  26.