home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / t / tas501.zip / RSIPT.TAS < prev    next >
Text File  |  1993-03-07  |  1KB  |  25 lines

  1. #TITLE Relative Strength Profit Test example (using script language)  
  2. {
  3.         RSIPT.TAS
  4.                 RSI PROFIT TEST SCRIPT EXAMPLE
  5.                 This script will signal a SELL when the
  6.                 RSI(14) crosses under 'rsi_upper' and a BUY when
  7.                 RSI(14) crosses above 'rsi_lower'.
  8. }
  9. #PROFIT_TEST LONG 20000          { long positions with $20000}
  10. #OUTPUT_FILE 'RSIPT.LST'
  11. RSI_VALUES : ARRAY;             { array containing plotted points }
  12. RSI_RANGE = 7;                  { Number of Days in RSI calculation}
  13. RSI_UPPER := 70;                { Upper range of RSI - point to SELL
  14.                                   Change this if
  15.                                   you want to test different value}
  16. RSI_LOWER := 30;                { Lower range of RSI - point to BUY
  17.                                   Change this if
  18.                                   you want to test different value}
  19. PLOT BEGIN      { This begins the "plot" of the RSI }
  20.         RSI_VALUES := RSI(RSI_RANGE);  { COMPUTE THE RSI(xx) PLOT }
  21. END;
  22. BUY WHEN RSI_VALUES[-1] < RSI_LOWER
  23. AND RSI_VALUES > RSI_LOWER;
  24. SELL WHEN RSI_VALUES[-1] > RSI_UPPER  AND RSI_VALUES < RSI_UPPER;
  25.